Message Boards Message Boards

0
|
5340 Views
|
7 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Duplicate solutions from DSolve[ ]?

I'm new to Mathematica. Why does it return solutions that appear to be duplicative? For example,

POSTED BY: Jay Gourley
7 Replies

There's a factor of $(-1)^{k/3}$ for $k=0,1,2$ in the exponents. Mathematica is finding complex solutions to the ODE as well as real ones. I typed

FullSimplify[DSolve[{D[u[x,t],t]+t^2 D[u[x,t],x]==u[x,t],u[x,0]==Exp[2x]},u,{x,t}]]
TeXForm[u[x,t]/.%]

to obtain the $\TeX$ code which produces $$\left\{e^{-\frac{2 t^3}{3}+\sqrt[3]{t^3}+2 x},e^{-\frac{2 t^3}{3}-\sqrt[3]{-1} \sqrt[3]{t^3}+2 x},e^{-\frac{2t^3}{3}+(-1)^{2/3} \sqrt[3]{t^3}+2 x}\right\}$$ Maybe this is nicer to parse visually. It's also not simplifying $\sqrt[3]{t^3}$ because $\sqrt[3]\cdot$ is a multivalued function. There are ways to specify that $x,t$ and $u$ should be real, but I'm struggling to do that with the methods I know.

POSTED BY: Adam Mendenhall

It would seem that the first solution is genuine, while the others are wrong, at least for t>0:

eqs = {D[u[x, t], t] + t^2 D[u[x, t], x] == u[x, t], 
   u[x, 0] == Exp[2 x]};
sol = DSolve[eqs, u, {x, t}];
Simplify[eqs /. sol, t > 0]

 {{True, True}, {False, True}, {False, True}}
POSTED BY: Gianluca Gorni

For t<0 it is the third solution that is correct. The second solution seems correct when t is imaginary and negative:

Simplify[eqs /. sol /. t -> I*t, t < 0]
POSTED BY: Gianluca Gorni

Thanks, Gianluca Gorni and Adam Mendenhall. I get the same three solutions, which are identical in real numbers, even if I specify a real domain. What am I doing wrong?

Add notebook doesn't seem to be working for me right now. I attached the .nb.

Attachments:
POSTED BY: Jay Gourley

The three solutions are not identical. Try this:

N[u[0, 1] /. sol]

You are doing nothing wrong. It is Mathematica that is messing up things by representing t as (-t^3)^(1/3), an expression that has three possible values, each agreeing with t in a different subdomain. You get a single correct expression of the solution with

PowerExpand[sol[[1]]]
POSTED BY: Gianluca Gorni

Is there a way to limit results to real values? I've tried Assumptions and Assuming without the desired outcome.

POSTED BY: Jay Gourley

I don't know. My guess is that the internal algorithm goes through solving a cubic equation, and it leaves to the user to sort out which branches to choose.

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

Group Abstract Group Abstract