1
$\begingroup$

The initial value problem: $dy/dx=x\sqrt{y},\;y(0)=1$ has the unique solution$$y=\frac 1{16}(x^4+8x^2+16)$$Mathematica's DSolve returns two solutions; the above and$$y=\frac 1{16}(x^4-8x^2+16)$$This second "solution" is erroneous.

$\endgroup$
2

1 Answer 1

5
$\begingroup$
eqns = {y'[x] == x Sqrt[y[x]], y[0] == 1};

sol = DSolve[eqns, y, x]

(*  {{y -> Function[{x}, 1/16 (16 - 8 x^2 + x^4)]}, {y -> 
   Function[{x}, 1/16 (16 + 8 x^2 + x^4)]}}  *)

The second solution is valid for all real x

eqns /. sol // FullSimplify[#, Element[x, Reals]] &

(*  {{x^3 == x (4 + Abs[-4 + x^2]), True}, {True, True}}  *)

Reduce[x^3 == x (4 + Abs[-4 + x^2]), x, Reals]

(*  x <= -2 || x == 0 || x >= 2  *)

The first solutions is valid on the domain x <= -2 || x == 0 || x >= 2

eqns /. sol // FullSimplify[#, x <= -2 || x == 0 || x >= 2] &

(*  {{True, True}, {True, True}}  *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.