2.16.6 Problem 25

2.16.6.1 Maple
2.16.6.2 Mathematica
2.16.6.3 Sympy

Internal problem ID [13440]
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 : 25
Date solved : Friday, December 19, 2025 at 04:23:45 AM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

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

This is a Riccati ODE. Comparing the ODE to solve

\[ y' = \arctan \left (x \right )^{n} x^{2 m} a^{2} \lambda +2 \arctan \left (x \right )^{n} x^{m} a b \lambda -2 \arctan \left (x \right )^{n} x^{m} a \lambda y +b^{2} \lambda \arctan \left (x \right )^{n}-2 \arctan \left (x \right )^{n} b \lambda y +\lambda \arctan \left (x \right )^{n} y^{2}+\frac {a m \,x^{m}}{x} \]
With Riccati ODE standard form
\[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows that \(f_0(x)=\arctan \left (x \right )^{n} x^{2 m} a^{2} \lambda +2 \arctan \left (x \right )^{n} x^{m} a b \lambda +b^{2} \lambda \arctan \left (x \right )^{n}+a m \,x^{m -1}\), \(f_1(x)=-2 \arctan \left (x \right )^{n} x^{m} a \lambda -2 \arctan \left (x \right )^{n} \lambda b\) and \(f_2(x)=\arctan \left (x \right )^{n} \lambda \). Let
\begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{\arctan \left (x \right )^{n} \lambda u} \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 {\arctan \left (x \right )^{n} n \lambda }{\left (x^{2}+1\right ) \arctan \left (x \right )}\\ f_1 f_2 &=\left (-2 \arctan \left (x \right )^{n} x^{m} a \lambda -2 \arctan \left (x \right )^{n} \lambda b \right ) \arctan \left (x \right )^{n} \lambda \\ f_2^2 f_0 &=\arctan \left (x \right )^{2 n} \lambda ^{2} \left (\arctan \left (x \right )^{n} x^{2 m} a^{2} \lambda +2 \arctan \left (x \right )^{n} x^{m} a b \lambda +b^{2} \lambda \arctan \left (x \right )^{n}+a m \,x^{m -1}\right ) \end{align*}

Substituting the above terms back in equation (2) gives

\[ \arctan \left (x \right )^{n} \lambda u^{\prime \prime }\left (x \right )-\left (\frac {\arctan \left (x \right )^{n} n \lambda }{\left (x^{2}+1\right ) \arctan \left (x \right )}+\left (-2 \arctan \left (x \right )^{n} x^{m} a \lambda -2 \arctan \left (x \right )^{n} \lambda b \right ) \arctan \left (x \right )^{n} \lambda \right ) u^{\prime }\left (x \right )+\arctan \left (x \right )^{2 n} \lambda ^{2} \left (\arctan \left (x \right )^{n} x^{2 m} a^{2} \lambda +2 \arctan \left (x \right )^{n} x^{m} a b \lambda +b^{2} \lambda \arctan \left (x \right )^{n}+a m \,x^{m -1}\right ) u \left (x \right ) = 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 ) = \operatorname {DESol}\left (\left \{\textit {\_Y}^{\prime \prime }\left (x \right )-\frac {\left (\frac {\arctan \left (x \right )^{n} n \lambda }{\left (x^{2}+1\right ) \arctan \left (x \right )}+\left (-2 \arctan \left (x \right )^{n} x^{m} a \lambda -2 \arctan \left (x \right )^{n} \lambda b \right ) \arctan \left (x \right )^{n} \lambda \right ) \arctan \left (x \right )^{-n} \textit {\_Y}^{\prime }\left (x \right )}{\lambda }+\arctan \left (x \right )^{n} \lambda \left (\arctan \left (x \right )^{n} x^{2 m} a^{2} \lambda +2 \arctan \left (x \right )^{n} x^{m} a b \lambda +b^{2} \lambda \arctan \left (x \right )^{n}+a m \,x^{m -1}\right ) \textit {\_Y} \left (x \right )\right \}, \left \{\textit {\_Y} \left (x \right )\right \}\right ) \end{equation}
Unable to solve. Terminating.

Unable to solve. Terminating.

2.16.6.1 Maple. Time used: 0.008 (sec). Leaf size: 24
ode:=diff(y(x),x) = lambda*arctan(x)^n*(y(x)-a*x^m-b)^2+a*m*x^(m-1); 
dsolve(ode,y(x), singsol=all);
 
\[ y = a \,x^{m}+b +\frac {1}{c_1 -\lambda \int \arctan \left (x \right )^{n}d x} \]

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: 
   <- Riccati particular case Kamke (d) successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=\lambda \arctan \left (x \right )^{13440} \left (y \left (x \right )-a \,x^{m}-b \right )^{2}+a m \,x^{m -1} \\ \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 )=\lambda \arctan \left (x \right )^{13440} \left (y \left (x \right )-a \,x^{m}-b \right )^{2}+a m \,x^{m -1} \end {array} \]
2.16.6.2 Mathematica. Time used: 0.774 (sec). Leaf size: 44
ode=D[y[x],x]==\[Lambda]*ArcTan[x]^n*(y[x]-a*x^m-b)^2+a*m*x^(m-1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{-\int _1^x\lambda \arctan (K[2])^ndK[2]+c_1}+a x^m+b\\ y(x)&\to a x^m+b \end{align*}
2.16.6.3 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
lambda_ = symbols("lambda_") 
m = symbols("m") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-a*m*x**(m - 1) - lambda_*(-a*x**m - b + y(x))**2*atan(x)**n + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out