2.11.11 Problem 37
Internal
problem
ID
[13399]
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-3.
Equations
with
tangent.
Problem
number
:
37
Date
solved
:
Wednesday, December 31, 2025 at 02:26:06 PM
CAS
classification
:
[_Riccati]
2.11.11.1 Solved using first_order_ode_riccati_by_guessing_particular_solution
16.348 (sec)
Entering first order ode riccati guess solver
\begin{align*}
\left (a \tan \left (\lambda x \right )+b \right ) y^{\prime }&=y^{2}+k \tan \left (\mu x \right ) y-d^{2}+k d \tan \left (\mu x \right ) \\
\end{align*}
This is a Riccati ODE. Comparing the above ODE to
solve with the Riccati standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows that \begin{align*} f_0(x) & =\frac {k d \tan \left (\mu x \right )}{a \tan \left (\lambda x \right )+b}-\frac {d^{2}}{a \tan \left (\lambda x \right )+b}\\ f_1(x) & =\frac {k \tan \left (\mu x \right )}{a \tan \left (\lambda x \right )+b}\\ f_2(x) &=\frac {1}{a \tan \left (\lambda x \right )+b} \end{align*}
Using trial and error, the following particular solution was found
\[
y_p = -d
\]
Since a particular solution is
known, then the general solution is given by \begin{align*} y &= y_p + \frac { \phi (x) }{ c_1 - \int { \phi (x) f_2 \,dx} } \end{align*}
Where
\begin{align*} \phi (x) &= e^{ \int 2 f_2 y_p + f_1 \,dx } \end{align*}
Evaluating the above gives the general solution as
\[
y = -d +\frac {{\mathrm e}^{\frac {\left (-2 i d +k \right ) x}{i b +a}-\frac {2 k x}{i b +a}-\frac {i k \ln \left ({\mathrm e}^{2 i \mu x}+1\right )}{\left (i b +a \right ) \mu }+\int \frac {2 a \left (-2 i d \,{\mathrm e}^{2 i \mu x}+k \,{\mathrm e}^{2 i \mu x}-2 i d -k \right )}{\left ({\mathrm e}^{2 i \lambda x} a +i b \,{\mathrm e}^{2 i \lambda x}-a +i b \right ) \left (a \,{\mathrm e}^{2 i \mu x}+i b \,{\mathrm e}^{2 i \mu x}+a +i b \right )}d x}}{c_1 -\int \frac {{\mathrm e}^{\frac {\left (-2 i d +k \right ) x}{i b +a}-\frac {2 k x}{i b +a}-\frac {i k \ln \left ({\mathrm e}^{2 i \mu x}+1\right )}{\left (i b +a \right ) \mu }+\int \frac {2 a \left (-2 i d \,{\mathrm e}^{2 i \mu x}+k \,{\mathrm e}^{2 i \mu x}-2 i d -k \right )}{\left ({\mathrm e}^{2 i \lambda x} a +i b \,{\mathrm e}^{2 i \lambda x}-a +i b \right ) \left (a \,{\mathrm e}^{2 i \mu x}+i b \,{\mathrm e}^{2 i \mu x}+a +i b \right )}d x}}{a \tan \left (\lambda x \right )+b}d x}
\]
Summary of solutions found
\begin{align*}
y &= -d +\frac {{\mathrm e}^{\frac {\left (-2 i d +k \right ) x}{i b +a}-\frac {2 k x}{i b +a}-\frac {i k \ln \left ({\mathrm e}^{2 i \mu x}+1\right )}{\left (i b +a \right ) \mu }+\int \frac {2 a \left (-2 i d \,{\mathrm e}^{2 i \mu x}+k \,{\mathrm e}^{2 i \mu x}-2 i d -k \right )}{\left ({\mathrm e}^{2 i \lambda x} a +i b \,{\mathrm e}^{2 i \lambda x}-a +i b \right ) \left (a \,{\mathrm e}^{2 i \mu x}+i b \,{\mathrm e}^{2 i \mu x}+a +i b \right )}d x}}{c_1 -\int \frac {{\mathrm e}^{\frac {\left (-2 i d +k \right ) x}{i b +a}-\frac {2 k x}{i b +a}-\frac {i k \ln \left ({\mathrm e}^{2 i \mu x}+1\right )}{\left (i b +a \right ) \mu }+\int \frac {2 a \left (-2 i d \,{\mathrm e}^{2 i \mu x}+k \,{\mathrm e}^{2 i \mu x}-2 i d -k \right )}{\left ({\mathrm e}^{2 i \lambda x} a +i b \,{\mathrm e}^{2 i \lambda x}-a +i b \right ) \left (a \,{\mathrm e}^{2 i \mu x}+i b \,{\mathrm e}^{2 i \mu x}+a +i b \right )}d x}}{a \tan \left (\lambda x \right )+b}d x} \\
\end{align*}
2.11.11.2 ✓ Maple. Time used: 0.010 (sec). Leaf size: 351
ode:=(a*tan(lambda*x)+b)*diff(y(x),x) = y(x)^2+k*tan(mu*x)*y(x)-d^2+k*d*tan(mu*x);
dsolve(ode,y(x), singsol=all);
\[
y = \frac {-\left (\sec \left (\lambda x \right )^{2}\right )^{\frac {d a}{\lambda \left (a^{2}+b^{2}\right )}} \left (a \tan \left (\lambda x \right )+b \right )^{-\frac {2 d a}{\lambda \left (a^{2}+b^{2}\right )}} {\mathrm e}^{\frac {-2 d b \arctan \left (\tan \left (\lambda x \right )\right )+k \int \frac {\tan \left (\mu x \right )}{a \tan \left (\lambda x \right )+b}d x \lambda \left (a^{2}+b^{2}\right )}{\lambda \left (a^{2}+b^{2}\right )}}-d \left (\int \left (a \tan \left (\lambda x \right )+b \right )^{\frac {\left (-a^{2}-b^{2}\right ) \lambda -2 a d}{\lambda \left (a^{2}+b^{2}\right )}} \left (\sec \left (\lambda x \right )^{2}\right )^{\frac {d a}{\lambda \left (a^{2}+b^{2}\right )}} {\mathrm e}^{\frac {-2 d b \arctan \left (\tan \left (\lambda x \right )\right )+k \int \frac {\tan \left (\mu x \right )}{a \tan \left (\lambda x \right )+b}d x \lambda \left (a^{2}+b^{2}\right )}{\lambda \left (a^{2}+b^{2}\right )}}d x -c_1 \right )}{\int \left (a \tan \left (\lambda x \right )+b \right )^{\frac {\left (-a^{2}-b^{2}\right ) \lambda -2 a d}{\lambda \left (a^{2}+b^{2}\right )}} \left (\sec \left (\lambda x \right )^{2}\right )^{\frac {d a}{\lambda \left (a^{2}+b^{2}\right )}} {\mathrm e}^{\frac {-2 d b \arctan \left (\tan \left (\lambda x \right )\right )+k \int \frac {\tan \left (\mu x \right )}{a \tan \left (\lambda x \right )+b}d x \lambda \left (a^{2}+b^{2}\right )}{\lambda \left (a^{2}+b^{2}\right )}}d x -c_1}
\]
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 (b) successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left (a \tan \left (\lambda x \right )+b \right ) \left (\frac {d}{d x}y \left (x \right )\right )=y \left (x \right )^{2}+k \tan \left (\mu x \right ) y \left (x \right )-d^{2}+k d \tan \left (\mu x \right ) \\ \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 {y \left (x \right )^{2}+k \tan \left (\mu x \right ) y \left (x \right )-d^{2}+k d \tan \left (\mu x \right )}{a \tan \left (\lambda x \right )+b} \end {array} \]
2.11.11.3 ✓ Mathematica. Time used: 20.04 (sec). Leaf size: 800
ode=(a*Tan[\[Lambda]*x]+b)*D[y[x],x]==y[x]^2+k*Tan[\[Mu]*x]*y[x]-d^2+k*d*Tan[\[Mu]*x];
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*} \text {Solution too large to show}\end{align*}
2.11.11.4 ✗ Sympy
from sympy import *
x = symbols("x")
a = symbols("a")
b = symbols("b")
d = symbols("d")
k = symbols("k")
lambda_ = symbols("lambda_")
mu = symbols("mu")
y = Function("y")
ode = Eq(d**2 - d*k*tan(mu*x) - k*y(x)*tan(mu*x) + (a*tan(lambda_*x) + b)*Derivative(y(x), x) - y(x)**2,0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
TypeError : Invalid NaN comparison