23.1.372 problem 357

Internal problem ID [4979]
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 : 357
Date solved : Tuesday, September 30, 2025 at 09:08:40 AM
CAS classification : [_linear]

\begin{align*} x \left (-x^{2}+1\right ) y^{\prime }&=a \,x^{2}+y \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 49
ode:=x*(-x^2+1)*diff(y(x),x) = x^2*a+y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \left (-\frac {a \sqrt {x^{2}-1}\, \ln \left (x +\sqrt {x^{2}-1}\right )}{\left (x -1\right ) \left (x +1\right )}+\frac {c_1}{\sqrt {x -1}\, \sqrt {x +1}}\right ) \]
Mathematica. Time used: 0.196 (sec). Leaf size: 73
ode=x*(1-x^2)*D[y[x],x]==a*x^2+y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \exp \left (\int _1^x\frac {1}{K[1]-K[1]^3}dK[1]\right ) \left (\int _1^x\frac {a \exp \left (-\int _1^{K[2]}\frac {1}{K[1]-K[1]^3}dK[1]\right ) K[2]}{1-K[2]^2}dK[2]+c_1\right ) \end{align*}
Sympy. Time used: 2.159 (sec). Leaf size: 58
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a*x**2 + x*(1 - x**2)*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \begin {cases} \frac {C_{1} x}{\sqrt {x^{2} - 1}} - \frac {a x \log {\left (x + \sqrt {x^{2} - 1} \right )}}{\sqrt {x^{2} - 1}} - \frac {a x \log {\left (2 \right )}}{\sqrt {x^{2} - 1}} & \text {for}\: x > -1 \wedge x < 1 \\\text {NaN} & \text {otherwise} \end {cases} \]