61.12.3 problem 40

Internal problem ID [12135]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 1, section 1.2. Riccati Equation. subsection 1.2.6-4. Equations with cotangent.
Problem number : 40
Date solved : Wednesday, March 05, 2025 at 04:41:56 PM
CAS classification : [_Riccati]

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

Maple. Time used: 0.003 (sec). Leaf size: 291
ode:=diff(y(x),x) = y(x)^2-2*a*b*cot(a*x)*y(x)+b^2-a^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\cos \left (a x \right ) \left (a b +\sqrt {\left (b^{2}-1\right ) a^{2}+b^{2}}\right ) \operatorname {LegendreP}\left (\frac {-a +2 \sqrt {\left (b^{2}-1\right ) a^{2}+b^{2}}}{2 a}, b -\frac {1}{2}, \cos \left (a x \right )\right )+c_{1} \cos \left (a x \right ) \left (a b +\sqrt {\left (b^{2}-1\right ) a^{2}+b^{2}}\right ) \operatorname {LegendreQ}\left (\frac {-a +2 \sqrt {\left (b^{2}-1\right ) a^{2}+b^{2}}}{2 a}, b -\frac {1}{2}, \cos \left (a x \right )\right )+\left (\operatorname {LegendreQ}\left (\frac {a +2 \sqrt {\left (b^{2}-1\right ) a^{2}+b^{2}}}{2 a}, b -\frac {1}{2}, \cos \left (a x \right )\right ) c_{1} +\operatorname {LegendreP}\left (\frac {a +2 \sqrt {\left (b^{2}-1\right ) a^{2}+b^{2}}}{2 a}, b -\frac {1}{2}, \cos \left (a x \right )\right )\right ) \left (-\sqrt {\left (b^{2}-1\right ) a^{2}+b^{2}}+\left (b -1\right ) a \right )\right ) \csc \left (a x \right )}{\operatorname {LegendreQ}\left (\frac {-a +2 \sqrt {\left (b^{2}-1\right ) a^{2}+b^{2}}}{2 a}, b -\frac {1}{2}, \cos \left (a x \right )\right ) c_{1} +\operatorname {LegendreP}\left (\frac {-a +2 \sqrt {\left (b^{2}-1\right ) a^{2}+b^{2}}}{2 a}, b -\frac {1}{2}, \cos \left (a x \right )\right )} \]
Mathematica
ode=D[y[x],x]==y[x]^2-2*a*b*Cot[a*x]*y[x]+b^2-a^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(a**2 + 2*a*b*y(x)/tan(a*x) - b**2 - y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE a**2 + 2*a*b*y(x)/tan(a*x) - b**2 - y(x)**2 + Derivative(y(x), x) cannot be solved by the lie group method