29.17.2 problem 461

Internal problem ID [5059]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 17
Problem number : 461
Date solved : Sunday, March 30, 2025 at 06:34:13 AM
CAS classification : [_rational, _Bernoulli]

\begin{align*} 2 y y^{\prime }&=x y^{2}+x^{3} \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 43
ode:=2*y(x)*diff(y(x),x) = x*y(x)^2+x^3; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \sqrt {{\mathrm e}^{\frac {x^{2}}{2}} c_1 -x^{2}-2} \\ y &= -\sqrt {{\mathrm e}^{\frac {x^{2}}{2}} c_1 -x^{2}-2} \\ \end{align*}
Mathematica. Time used: 7.669 (sec). Leaf size: 57
ode=2 y[x] D[y[x],x]==x y[x]^2+x^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\sqrt {-x^2+c_1 e^{\frac {x^2}{2}}-2} \\ y(x)\to \sqrt {-x^2+c_1 e^{\frac {x^2}{2}}-2} \\ \end{align*}
Sympy. Time used: 0.584 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 - x*y(x)**2 + 2*y(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {C_{1} e^{\frac {x^{2}}{2}} - x^{2} - 2}, \ y{\left (x \right )} = \sqrt {C_{1} e^{\frac {x^{2}}{2}} - x^{2} - 2}\right ] \]