23.1.237 problem 233

Internal problem ID [4844]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 233
Date solved : Tuesday, September 30, 2025 at 08:44:04 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.021 (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]
 
\begin{align*} y(x)&\to \frac {-b x^3+3 c_1}{3 (a+x)} \end{align*}
Sympy. Time used: 0.145 (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} \]