Group Abstract Group Abstract

Message Boards Message Boards

0
|
460 Views
|
9 Replies
|
8 Total Likes
View groups...
Share
Share this post:

How to obtain an answer of a partial differential equation from a symbolic computation using DSolve

Posted 1 month ago

Given a mathematical expression EQ. I want to obtain either f[x,t] , Xi[1][x,t] or Xi[2][t] using the command DSolve. See below my attempts, Input: EQ=r Xi[1][x, t] + r x Derivative[1][Xi[2]][t] - \!\(\*SuperscriptBox[\(Xi[1]\), TagBox[ RowBox[{"(", RowBox[{"0", ",", "1"}], ")"}], Derivative], MultilineFunction->None]\)[x, t] + x^2 \[Sigma]^2 \!\(\*SuperscriptBox[\(f\), TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None]\)[x, t] - r x \!\(\*SuperscriptBox[\(Xi[1]\), TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None]\)[x, t] - 1/2 x^2 \[Sigma]^2 \!\(\*SuperscriptBox[\(Xi[1]\), TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None]\)[x, t] Input: DSolve[EQ] == 0, f[x, t], {x, t}]

First attempt output: {{f[x, t] -> C[1][t] + Inactive[Integrate][(-2 r Xi[1][K[1], t] - 2 r K[1] Derivative[1][Xi[2]][t] + 2 \!\(\*SuperscriptBox[\(Xi[1]\), TagBox[ RowBox[{"(", RowBox[{"0", ",", "1"}], ")"}], Derivative], MultilineFunction->None]\)[K[1], t] + 2 r K[1] \!\(\*SuperscriptBox[\(Xi[1]\), TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None]\)[K[1], t] + \[Sigma]^2 K[1]^2 \!\(\*SuperscriptBox[\(Xi[1]\), TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None]\)[K[1], t])/( 2 \[Sigma]^2 K[1]^2), {K[1], 1, x}]}}

Second attempt input: DSolve[EDsI[[5]] == 0, Xi[1][x, t], {x, t}]
Second attempt output: DSolve[r Xi[1][x, t] + r x Derivative[1][Xi[2]][t] - \!\(\*SuperscriptBox[\(Xi[1]\), TagBox[ RowBox[{"(", RowBox[{"0", ",", "1"}], ")"}], Derivative], MultilineFunction->None]\)[x, t] + x^2 \[Sigma]^2 \!\(\*SuperscriptBox[\(f\), TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None]\)[x, t] - r x \!\(\*SuperscriptBox[\(Xi[1]\), TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None]\)[x, t] - 1/2 x^2 \[Sigma]^2 \!\(\*SuperscriptBox[\(Xi[1]\), TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None]\)[x, t] == 0, Xi[1][x, t], {x, t}]

Third attempt input: DSolve[EDsI[[5]] == 0, Xi[2][t], {t}] Third attempt output: {{Xi[2][t] -> C[1] + Inactive[Integrate][(-2 r Xi[1][x, K[1]] + 2 \!\(\*SuperscriptBox[\(Xi[1]\), TagBox[ RowBox[{"(", RowBox[{"0", ",", "1"}], ")"}], Derivative], MultilineFunction->None]\)[x, K[1]] - 2 x^2 \[Sigma]^2 \!\(\*SuperscriptBox[\(f\), TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None]\)[x, K[1]] + 2 r x \!\(\*SuperscriptBox[\(Xi[1]\), TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None]\)[x, K[1]] + x^2 \[Sigma]^2 \!\(\*SuperscriptBox[\(Xi[1]\), TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None]\)[x, K[1]])/(2 r x), {K[1], 1, t}]}} Please advise further on what to do if there is no more obtain the correct solution using DSolve fro the expression.

POSTED BY: Nomsa Ledwaba
9 Replies

The solution for f[x,t] contains a symbolic integral because, basically, the equation is of the form y'[x] == h[x], whose solutions are the primitives of h[x]. If you know nothing about h[x] you must leave the symbolic integration as it is. If you know Xi[1], for example, you can replace it into the solution formula this way:

DSolve[EQ == 0, f[x, t], {x, t}] /.
  {Xi[1] -> Function[{x, t}, x + t]} //
 Activate

As for the failed solutions with respect to Xi[1] and Xi[2], Mathematica gives back the input because it cannot find a symbolic solution, I suppose.

POSTED BY: Gianluca Gorni

The solution with respect to f is perfectly fine. As for the rest, you don't explain what EDsI is.

POSTED BY: Gianluca Gorni

Try this:

DSolve[EDsI[[6]] == 0, Xi[1], {x, t}]

instead of

DSolve[EDsI[[6]] == 0, Xi[1][x, t], {x, t}]

otherwise you cannot replace into derivatives of Xi[1].

POSTED BY: Gianluca Gorni

Can you clarify what the question was?

POSTED BY: Gianluca Gorni
Posted 1 month ago

I have added a notebook for clarity towards my earlier question. Please may you advise further.

POSTED BY: Nomsa Ledwaba

We advise adding notebook of your code or attaching it to avoid any misunderstanding. The code currently is not properly formatted.

POSTED BY: EDITORIAL BOARD
Posted 1 month ago

I have been debugging to my ability. The last updated line , that is substituting the Xi[1][x,t] into the equation with partial derivatives still not give an answer. Please advise further.

Attachments:
POSTED BY: Nomsa Ledwaba
Posted 1 month ago

I substituted f[x,t] in my further computations, everything worked well and obtained Xi[1][x,t] as shown on the notebook. Nonetheless, for further computation whereby I substituted both f[x,t] and Xi[1][x,t] , I still fail to obtain Xi[2][t] . Similarly, substituting both f[x,t] and Xi[2]t] , I still fail to obtain Xi[1][x, t] . Please advise further.

Attachments:
POSTED BY: Nomsa Ledwaba
Posted 1 month ago

Pardon me please for my mistake. That EDsI[[5]] must be replaced by EQ. AS for the solution for f[x,t]], as it appears it is tricky to substitute for further computation. Does that mean it must be integrated first where there is integral, therefore substitute it for further computation? Please advise.

POSTED BY: Nomsa Ledwaba
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard