29.13.12 problem 366

Internal problem ID [4966]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 13
Problem number : 366
Date solved : Tuesday, March 04, 2025 at 07:38:43 PM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

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

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