60.1.154 problem 157

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

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

Maple. Time used: 0.026 (sec). Leaf size: 280
ode:=(x^2-1)*diff(y(x),x)+a*(y(x)^2-2*x*y(x)+1) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {2 \left (-\frac {\left (-\frac {x}{2}-\frac {1}{2}\right )^{-2 a} \left (x +1\right ) \left (x -1\right )^{2} \operatorname {HeunCPrime}\left (0, 2 a -1, 0, 0, a^{2}-a +\frac {1}{2}, \frac {2}{x +1}\right )}{8}-\operatorname {HeunCPrime}\left (0, -2 a +1, 0, 0, a^{2}-a +\frac {1}{2}, \frac {2}{x +1}\right ) c_1 \left (x -1\right )^{2}+\left (c_1 \left (\frac {x +1}{x -1}\right )^{-a} \left (\left (a -\frac {1}{2}\right ) x -\frac {a}{2}+\frac {1}{2}\right ) \operatorname {hypergeom}\left (\left [-a +1, -a +1\right ], \left [-2 a +2\right ], -\frac {2}{x -1}\right )+\frac {a \left (-\frac {x}{2}-\frac {1}{2}\right )^{-2 a} \operatorname {hypergeom}\left (\left [a , a\right ], \left [2 a \right ], -\frac {2}{x -1}\right ) \left (\frac {x +1}{x -1}\right )^{a} \left (x -1\right )}{16}\right ) \left (x +1\right )^{2}\right ) \left (\frac {x +1}{x -1}\right )^{a} \left (-\frac {x}{2}-\frac {1}{2}\right )^{2 a}}{\left (\operatorname {hypergeom}\left (\left [-a +1, -a +1\right ], \left [-2 a +2\right ], -\frac {2}{x -1}\right ) c_1 \left (-\frac {x}{2}-\frac {1}{2}\right )^{2 a}+\frac {\operatorname {hypergeom}\left (\left [a , a\right ], \left [2 a \right ], -\frac {2}{x -1}\right ) \left (\frac {x +1}{x -1}\right )^{2 a} \left (x -1\right )}{8}\right ) \left (x +1\right )^{2} a} \]
Mathematica. Time used: 0.357 (sec). Leaf size: 47
ode=(x^2-1)*D[y[x],x] + a*(y[x]^2-2*x*y[x]+1)==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {\operatorname {LegendreQ}(a,x)+c_1 \operatorname {LegendreP}(a,x)}{\operatorname {LegendreQ}(a-1,x)+c_1 \operatorname {LegendreP}(a-1,x)} \\ y(x)\to \frac {\operatorname {LegendreP}(a,x)}{\operatorname {LegendreP}(a-1,x)} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(a*(-2*x*y(x) + y(x)**2 + 1) + (x**2 - 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out