29.21.8 problem 584

Internal problem ID [5178]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 21
Problem number : 584
Date solved : Sunday, March 30, 2025 at 06:48:14 AM
CAS classification : [[_homogeneous, `class G`], _exact, _rational, _Bernoulli]

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

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