60.1.150 problem 153

Internal problem ID [10164]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 153
Date solved : Sunday, March 30, 2025 at 03:21:01 PM
CAS classification : [_linear]

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

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