29.1.10 problem 9

Internal problem ID [4617]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 1
Problem number : 9
Date solved : Tuesday, March 04, 2025 at 06:56:46 PM
CAS classification : [_linear]

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

Maple. Time used: 0.003 (sec). Leaf size: 31
ode:=diff(y(x),x) = x^2*(a*x^3+b*y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {-a \,x^{3} b +{\mathrm e}^{\frac {b \,x^{3}}{3}} c_{1} b^{2}-3 a}{b^{2}} \]
Mathematica. Time used: 0.156 (sec). Leaf size: 32
ode=D[y[x],x]==x^2*(a*x^3+b*y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {a \left (b x^3+3\right )}{b^2}+c_1 e^{\frac {b x^3}{3}} \]
Sympy. Time used: 0.343 (sec). Leaf size: 49
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-x**2*(a*x**3 + b*y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \begin {cases} \frac {C_{1}}{b x^{3}} - \frac {a x^{3}}{2 b} & \text {for}\: b^{2} = 0 \\\text {NaN} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} C_{1} e^{\frac {b x^{3}}{3}} - \frac {a x^{3}}{b} - \frac {3 a}{b^{2}} & \text {for}\: b^{2} \neq 0 \\\text {NaN} & \text {otherwise} \end {cases}\right ] \]