29.8.25 problem 230

Internal problem ID [4830]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 8
Problem number : 230
Date solved : Sunday, March 30, 2025 at 04:02:41 AM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 24
ode:=(x+a)*diff(y(x),x)+b*x^2+y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-b \,x^{3}+3 c_1}{3 a +3 x} \]
Mathematica. Time used: 0.047 (sec). Leaf size: 25
ode=(a+x) D[y[x],x]+b x^2+y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {-b x^3+3 c_1}{3 (a+x)} \]
Sympy. Time used: 0.227 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(b*x**2 + (a + x)*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} - \frac {b x^{3}}{3}}{a + x} \]