75.3.8 problem 8

Internal problem ID [19912]
Book : A short course on differential equations. By Donald Francis Campbell. Maxmillan company. London. 1907
Section : Chapter III. Ordinary differential equations of the first order and first degree. Exercises at page 33
Problem number : 8
Date solved : Thursday, October 02, 2025 at 05:00:55 PM
CAS classification : [_linear]

\begin{align*} x \left (-x^{2}+1\right ) y^{\prime }+\left (2 x^{2}-1\right ) y&=a \,x^{3} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 20
ode:=x*(-x^2+1)*diff(y(x),x)+(2*x^2-1)*y(x) = a*x^3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \left (c_1 \sqrt {x -1}\, \sqrt {x +1}+a \right ) \]
Mathematica. Time used: 0.031 (sec). Leaf size: 23
ode=x*(1-x^2)*D[y[x],x]+(2*x^2-1)*y[x]==a*x^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x \left (a+c_1 \sqrt {1-x^2}\right ) \end{align*}
Sympy. Time used: 25.022 (sec). Leaf size: 338
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a*x**3 + x*(1 - x**2)*Derivative(y(x), x) + (2*x**2 - 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \begin {cases} \frac {C_{1} \sqrt {1 - x^{2}} \sqrt {x^{2} - 1}}{2 x \sqrt {1 - x^{2}} + 2 i x \sqrt {x^{2} - 1} - 2 \sqrt {1 - x^{2}} \sqrt {x^{2} - 1} \left (\begin {cases} - \frac {x}{\sqrt {x^{2} - 1}} & \text {for}\: \left |{x^{2}}\right | > 1 \\\frac {i x}{\sqrt {1 - x^{2}}} & \text {otherwise} \end {cases}\right ) + \sqrt {1 - x^{2}} \sqrt {x^{2} - 1} \left (\begin {cases} - \frac {2 x}{\sqrt {x^{2} - 1}} + \frac {1}{x \sqrt {x^{2} - 1}} & \text {for}\: \left |{x^{2}}\right | > 1 \\- \frac {2 i x^{2} \sqrt {1 - x^{2}}}{x^{3} - x} + \frac {i \sqrt {1 - x^{2}}}{x^{3} - x} & \text {otherwise} \end {cases}\right )} + \frac {a \sqrt {1 - x^{2}}}{2 x \sqrt {1 - x^{2}} + 2 i x \sqrt {x^{2} - 1} - 2 \sqrt {1 - x^{2}} \sqrt {x^{2} - 1} \left (\begin {cases} - \frac {x}{\sqrt {x^{2} - 1}} & \text {for}\: \left |{x^{2}}\right | > 1 \\\frac {i x}{\sqrt {1 - x^{2}}} & \text {otherwise} \end {cases}\right ) + \sqrt {1 - x^{2}} \sqrt {x^{2} - 1} \left (\begin {cases} - \frac {2 x}{\sqrt {x^{2} - 1}} + \frac {1}{x \sqrt {x^{2} - 1}} & \text {for}\: \left |{x^{2}}\right | > 1 \\- \frac {2 i x^{2} \sqrt {1 - x^{2}}}{x^{3} - x} + \frac {i \sqrt {1 - x^{2}}}{x^{3} - x} & \text {otherwise} \end {cases}\right )} & \text {for}\: x > -1 \wedge x < 1 \\\text {NaN} & \text {otherwise} \end {cases} \]