61.16.2 problem 20

Internal problem ID [12174]
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.7-3. Equations containing arctangent.
Problem number : 20
Date solved : Wednesday, March 05, 2025 at 05:14:28 PM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=y^{2}+\lambda x \arctan \left (x \right )^{n} y+\lambda \arctan \left (x \right )^{n} \end{align*}

Maple. Time used: 0.009 (sec). Leaf size: 78
ode:=diff(y(x),x) = y(x)^2+lambda*x*arctan(x)^n*y(x)+arctan(x)^n*lambda; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{\int \frac {\arctan \left (x \right )^{n} \lambda \,x^{2}-2}{x}d x} x +\int {\mathrm e}^{\int \frac {\arctan \left (x \right )^{n} \lambda \,x^{2}-2}{x}d x}d x -c_{1}}{\left (c_{1} -\int {\mathrm e}^{\int \frac {\arctan \left (x \right )^{n} \lambda \,x^{2}-2}{x}d x}d x \right ) x} \]
Mathematica. Time used: 2.423 (sec). Leaf size: 120
ode=D[y[x],x]==y[x]^2+\[Lambda]*x*ArcTan[x]^n*y[x]+\[Lambda]*ArcTan[x]^n; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {\exp \left (-\int _1^x-\lambda \arctan (K[1])^n K[1]dK[1]\right )+x \int _1^x\frac {\exp \left (-\int _1^{K[2]}-\lambda \arctan (K[1])^n K[1]dK[1]\right )}{K[2]^2}dK[2]+c_1 x}{x^2 \left (\int _1^x\frac {\exp \left (-\int _1^{K[2]}-\lambda \arctan (K[1])^n K[1]dK[1]\right )}{K[2]^2}dK[2]+c_1\right )} \\ y(x)\to -\frac {1}{x} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
cg = symbols("cg") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-cg*x*y(x)*atan(x)**n - cg*atan(x)**n - y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -cg*x*y(x)*atan(x)**n - cg*atan(x)**n - y(x)**2 + Derivative(y(x), x) cannot be solved by the lie group method