2.2.52 Problem 55

2.2.52.1 Maple
2.2.52.2 Mathematica
2.2.52.3 Sympy

Internal problem ID [13258]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 1, section 1.2. Riccati Equation. 1.2.2. Equations Containing Power Functions
Problem number : 55
Date solved : Friday, December 19, 2025 at 02:09:42 AM
CAS classification : [_rational, _Riccati]

\begin{align*} \left (x^{2}-1\right ) y^{\prime }+\lambda \left (y^{2}-2 y x +1\right )&=0 \\ \end{align*}
Entering first order ode riccati solver
\begin{align*} \left (x^{2}-1\right ) y^{\prime }+\lambda \left (y^{2}-2 y x +1\right )&=0 \\ \end{align*}
In canonical form the ODE is
\begin{align*} y' &= F(x,y)\\ &= -\frac {\lambda \left (-2 x y +y^{2}+1\right )}{x^{2}-1} \end{align*}

This is a Riccati ODE. Comparing the ODE to solve

\[ y' = \frac {2 \lambda x y}{x^{2}-1}-\frac {\lambda \,y^{2}}{x^{2}-1}-\frac {\lambda }{x^{2}-1} \]
With Riccati ODE standard form
\[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows that \(f_0(x)=-\frac {\lambda }{x^{2}-1}\), \(f_1(x)=\frac {2 \lambda x}{x^{2}-1}\) and \(f_2(x)=-\frac {\lambda }{x^{2}-1}\). Let
\begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{-\frac {\lambda u}{x^{2}-1}} \tag {1} \end{align*}

Using the above substitution in the given ODE results (after some simplification) in a second order ODE to solve for \(u(x)\) which is

\begin{align*} f_2 u''(x) -\left ( f_2' + f_1 f_2 \right ) u'(x) + f_2^2 f_0 u(x) &= 0 \tag {2} \end{align*}

But

\begin{align*} f_2' &=\frac {2 \lambda x}{\left (x^{2}-1\right )^{2}}\\ f_1 f_2 &=-\frac {2 \lambda ^{2} x}{\left (x^{2}-1\right )^{2}}\\ f_2^2 f_0 &=-\frac {\lambda ^{3}}{\left (x^{2}-1\right )^{3}} \end{align*}

Substituting the above terms back in equation (2) gives

\[ -\frac {\lambda u^{\prime \prime }\left (x \right )}{x^{2}-1}-\left (\frac {2 \lambda x}{\left (x^{2}-1\right )^{2}}-\frac {2 \lambda ^{2} x}{\left (x^{2}-1\right )^{2}}\right ) u^{\prime }\left (x \right )-\frac {\lambda ^{3} u \left (x \right )}{\left (x^{2}-1\right )^{3}} = 0 \]
Unable to solve. Will ask Maple to solve this ode now.

The solution for \(u \left (x \right )\) is

\begin{equation} \tag{3} u \left (x \right ) = c_1 \left (x^{2}-1\right )^{\frac {\lambda }{2}} \operatorname {LegendreP}\left (\lambda -1, x\right )+c_2 \left (x^{2}-1\right )^{\frac {\lambda }{2}} \operatorname {LegendreQ}\left (\lambda -1, x\right ) \end{equation}
Taking derivative gives
\begin{equation} \tag{4} u^{\prime }\left (x \right ) = \frac {c_1 \left (x^{2}-1\right )^{\frac {\lambda }{2}} \lambda x \operatorname {LegendreP}\left (\lambda -1, x\right )}{x^{2}-1}+\frac {c_1 \left (x^{2}-1\right )^{\frac {\lambda }{2}} \left (\lambda \operatorname {LegendreP}\left (\lambda , x\right )-\lambda x \operatorname {LegendreP}\left (\lambda -1, x\right )\right )}{x^{2}-1}+\frac {c_2 \left (x^{2}-1\right )^{\frac {\lambda }{2}} \lambda x \operatorname {LegendreQ}\left (\lambda -1, x\right )}{x^{2}-1}+\frac {c_2 \left (x^{2}-1\right )^{\frac {\lambda }{2}} \left (\lambda \operatorname {LegendreQ}\left (\lambda , x\right )-\lambda x \operatorname {LegendreQ}\left (\lambda -1, x\right )\right )}{x^{2}-1} \end{equation}
Substituting equations (3,4) into (1) results in
\begin{align*} y &= \frac {-u'}{f_2 u} \\ y &= \frac {-u'}{-\frac {\lambda u}{x^{2}-1}} \\ y &= \frac {\operatorname {LegendreP}\left (\lambda , x\right ) c_1 +\operatorname {LegendreQ}\left (\lambda , x\right ) c_2}{\operatorname {LegendreP}\left (\lambda -1, x\right ) c_1 +\operatorname {LegendreQ}\left (\lambda -1, x\right ) c_2} \\ \end{align*}
Doing change of constants, the above solution becomes
\[ y = \frac {\left (\frac {\left (x^{2}-1\right )^{\frac {\lambda }{2}} \lambda x \operatorname {LegendreP}\left (\lambda -1, x\right )}{x^{2}-1}+\frac {\left (x^{2}-1\right )^{\frac {\lambda }{2}} \left (\lambda \operatorname {LegendreP}\left (\lambda , x\right )-\lambda x \operatorname {LegendreP}\left (\lambda -1, x\right )\right )}{x^{2}-1}+\frac {c_3 \left (x^{2}-1\right )^{\frac {\lambda }{2}} \lambda x \operatorname {LegendreQ}\left (\lambda -1, x\right )}{x^{2}-1}+\frac {c_3 \left (x^{2}-1\right )^{\frac {\lambda }{2}} \left (\lambda \operatorname {LegendreQ}\left (\lambda , x\right )-\lambda x \operatorname {LegendreQ}\left (\lambda -1, x\right )\right )}{x^{2}-1}\right ) \left (x^{2}-1\right )}{\lambda \left (\left (x^{2}-1\right )^{\frac {\lambda }{2}} \operatorname {LegendreP}\left (\lambda -1, x\right )+c_3 \left (x^{2}-1\right )^{\frac {\lambda }{2}} \operatorname {LegendreQ}\left (\lambda -1, x\right )\right )} \]
Simplifying the above gives
\begin{align*} y &= \frac {\operatorname {LegendreQ}\left (\lambda , x\right ) c_3 +\operatorname {LegendreP}\left (\lambda , x\right )}{\operatorname {LegendreQ}\left (\lambda -1, x\right ) c_3 +\operatorname {LegendreP}\left (\lambda -1, x\right )} \\ \end{align*}
The solution
\[ y = \frac {\operatorname {LegendreQ}\left (\lambda , x\right ) c_3 +\operatorname {LegendreP}\left (\lambda , x\right )}{\operatorname {LegendreQ}\left (\lambda -1, x\right ) c_3 +\operatorname {LegendreP}\left (\lambda -1, x\right )} \]
was found not to satisfy the ode or the IC. Hence it is removed.
2.2.52.1 Maple. Time used: 0.011 (sec). Leaf size: 280
ode:=(x^2-1)*diff(y(x),x)+lambda*(y(x)^2-2*y(x)*x+1) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {2 \left (-\frac {x}{2}-\frac {1}{2}\right )^{2 \lambda } \left (\left (-\frac {x}{2}-\frac {1}{2}\right )^{-2 \lambda } \left (x +1\right ) \left (x -1\right )^{2} \operatorname {HeunCPrime}\left (0, 2 \lambda -1, 0, 0, \lambda ^{2}-\lambda +\frac {1}{2}, \frac {2}{x +1}\right )+8 \operatorname {HeunCPrime}\left (0, -2 \lambda +1, 0, 0, \lambda ^{2}-\lambda +\frac {1}{2}, \frac {2}{x +1}\right ) c_1 \left (x -1\right )^{2}-8 \left (\left (\left (\lambda -\frac {1}{2}\right ) x -\frac {\lambda }{2}+\frac {1}{2}\right ) \left (\frac {x +1}{x -1}\right )^{-\lambda } c_1 \operatorname {hypergeom}\left (\left [-\lambda +1, -\lambda +1\right ], \left [-2 \lambda +2\right ], -\frac {2}{x -1}\right )+\frac {\left (-\frac {x}{2}-\frac {1}{2}\right )^{-2 \lambda } \lambda \operatorname {hypergeom}\left (\left [\lambda , \lambda \right ], \left [2 \lambda \right ], -\frac {2}{x -1}\right ) \left (\frac {x +1}{x -1}\right )^{\lambda } \left (x -1\right )}{16}\right ) \left (x +1\right )^{2}\right ) \left (\frac {x +1}{x -1}\right )^{\lambda }}{\left (x +1\right )^{2} \lambda \left (8 \operatorname {hypergeom}\left (\left [-\lambda +1, -\lambda +1\right ], \left [-2 \lambda +2\right ], -\frac {2}{x -1}\right ) c_1 \left (-\frac {x}{2}-\frac {1}{2}\right )^{2 \lambda }+\operatorname {hypergeom}\left (\left [\lambda , \lambda \right ], \left [2 \lambda \right ], -\frac {2}{x -1}\right ) \left (\frac {x +1}{x -1}\right )^{2 \lambda } \left (x -1\right )\right )} \]

Maple trace

Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
trying inverse linear 
trying homogeneous types: 
trying Chini 
differential order: 1; looking for linear symmetries 
trying exact 
Looking for potential symmetries 
trying Riccati 
trying Riccati sub-methods: 
   <- Abel AIR successful: ODE belongs to the 2F1 3-parameter class
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left (x^{2}-1\right ) \left (\frac {d}{d x}y \left (x \right )\right )+\lambda \left (y \left (x \right )^{2}-2 x y \left (x \right )+1\right )=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=-\frac {\lambda \left (y \left (x \right )^{2}-2 x y \left (x \right )+1\right )}{x^{2}-1} \end {array} \]
2.2.52.2 Mathematica. Time used: 0.27 (sec). Leaf size: 47
ode=(x^2-1)*D[y[x],x]+\[Lambda]*(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}(\lambda ,x)+c_1 \operatorname {LegendreP}(\lambda ,x)}{\operatorname {LegendreQ}(\lambda -1,x)+c_1 \operatorname {LegendreP}(\lambda -1,x)}\\ y(x)&\to \frac {\operatorname {LegendreP}(\lambda ,x)}{\operatorname {LegendreP}(\lambda -1,x)} \end{align*}
2.2.52.3 Sympy
from sympy import * 
x = symbols("x") 
lambda_ = symbols("lambda_") 
y = Function("y") 
ode = Eq(lambda_*(-2*x*y(x) + y(x)**2 + 1) + (x**2 - 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
RecursionError : maximum recursion depth exceeded