29.12.32 problem 351

Internal problem ID [4951]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 12
Problem number : 351
Date solved : Sunday, March 30, 2025 at 04:17:46 AM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

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

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