29.12.35 problem 354

Internal problem ID [4954]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 12
Problem number : 354
Date solved : Sunday, March 30, 2025 at 04:21:04 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.049 (sec). Leaf size: 25
ode=x(1-x^2)D[y[x],x]==a x^2+y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {x (a \arcsin (x)+c_1)}{\sqrt {1-x^2}} \]
Sympy. Time used: 3.596 (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} \]