29.10.12 problem 278

Internal problem ID [4878]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 10
Problem number : 278
Date solved : Tuesday, March 04, 2025 at 07:25:19 PM
CAS classification : [_linear]

\begin{align*} \left (-x^{2}+1\right ) y^{\prime }+1&=x y \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 45
ode:=(-x^2+1)*diff(y(x),x)+1 = x*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {\ln \left (x +\sqrt {x^{2}-1}\right ) \sqrt {x^{2}-1}}{\left (x -1\right ) \left (x +1\right )}+\frac {c_{1}}{\sqrt {x -1}\, \sqrt {x +1}} \]
Mathematica. Time used: 0.034 (sec). Leaf size: 30
ode=(1-x^2)D[y[x],x]+1==x y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {\log \left (\sqrt {x^2-1}+x\right )+c_1}{\sqrt {x^2-1}} \]
Sympy. Time used: 0.338 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*y(x) + (1 - x**2)*Derivative(y(x), x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \log {\left (x + \sqrt {x^{2} - 1} \right )}}{\sqrt {x^{2} - 1}} \]