11.4 problem 30

11.4.1 Solving as riccati ode
11.4.2 Maple step by step solution

Internal problem ID [10527]
Internal file name [OUTPUT/9475_Monday_June_06_2022_02_47_17_PM_43109865/index.tex]

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: 30.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "riccati"

Maple gives the following as the ode type

[[_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

\[ \boxed {y^{\prime }-y^{2} a -2 y \tan \left (x \right ) a b=b \left (a b -1\right ) \tan \left (x \right )^{2}} \]

11.4.1 Solving as riccati ode

In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= \tan \left (x \right )^{2} a \,b^{2}+2 b \tan \left (x \right ) y a -\tan \left (x \right )^{2} b +a \,y^{2} \end {align*}

This is a Riccati ODE. Comparing the ODE to solve \[ y' = \tan \left (x \right )^{2} a \,b^{2}+2 b \tan \left (x \right ) y a -\tan \left (x \right )^{2} b +a \,y^{2} \] With Riccati ODE standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \] Shows that \(f_0(x)=\tan \left (x \right )^{2} a \,b^{2}-\tan \left (x \right )^{2} b\), \(f_1(x)=2 b \tan \left (x \right ) a\) and \(f_2(x)=a\). Let \begin {align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{a 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' &=0\\ f_1 f_2 &=2 b \tan \left (x \right ) a^{2}\\ f_2^2 f_0 &=a^{2} \left (\tan \left (x \right )^{2} a \,b^{2}-\tan \left (x \right )^{2} b \right ) \end {align*}

Substituting the above terms back in equation (2) gives \begin {align*} a u^{\prime \prime }\left (x \right )-2 b \tan \left (x \right ) a^{2} u^{\prime }\left (x \right )+a^{2} \left (\tan \left (x \right )^{2} a \,b^{2}-\tan \left (x \right )^{2} b \right ) u \left (x \right ) &=0 \end {align*}

Solving the above ODE (this ode solved using Maple, not this program), gives

\[ u \left (x \right ) = \cos \left (x \right )^{-a b} \left (c_{1} \sinh \left (\sqrt {-a b}\, x \right )+c_{2} \cosh \left (\sqrt {-a b}\, x \right )\right ) \] The above shows that \[ u^{\prime }\left (x \right ) = \cos \left (x \right )^{-a b} \left (\left (a b c_{2} \tan \left (x \right )+\sqrt {-a b}\, c_{1} \right ) \cosh \left (\sqrt {-a b}\, x \right )+\sinh \left (\sqrt {-a b}\, x \right ) \left (a b c_{1} \tan \left (x \right )+c_{2} \sqrt {-a b}\right )\right ) \] Using the above in (1) gives the solution \[ y = -\frac {\left (a b c_{2} \tan \left (x \right )+\sqrt {-a b}\, c_{1} \right ) \cosh \left (\sqrt {-a b}\, x \right )+\sinh \left (\sqrt {-a b}\, x \right ) \left (a b c_{1} \tan \left (x \right )+c_{2} \sqrt {-a b}\right )}{a \left (c_{1} \sinh \left (\sqrt {-a b}\, x \right )+c_{2} \cosh \left (\sqrt {-a b}\, x \right )\right )} \] Dividing both numerator and denominator by \(c_{1}\) gives, after renaming the constant \(\frac {c_{2}}{c_{1}}=c_{3}\) the following solution

\[ y = \frac {\left (-a b c_{3} \tan \left (x \right )-\sqrt {-a b}\right ) \sinh \left (\sqrt {-a b}\, x \right )-\left (b \tan \left (x \right ) a +\sqrt {-a b}\, c_{3} \right ) \cosh \left (\sqrt {-a b}\, x \right )}{\left (c_{3} \sinh \left (\sqrt {-a b}\, x \right )+\cosh \left (\sqrt {-a b}\, x \right )\right ) a} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {\left (-a b c_{3} \tan \left (x \right )-\sqrt {-a b}\right ) \sinh \left (\sqrt {-a b}\, x \right )-\left (b \tan \left (x \right ) a +\sqrt {-a b}\, c_{3} \right ) \cosh \left (\sqrt {-a b}\, x \right )}{\left (c_{3} \sinh \left (\sqrt {-a b}\, x \right )+\cosh \left (\sqrt {-a b}\, x \right )\right ) a} \\ \end{align*}

Verification of solutions

\[ y = \frac {\left (-a b c_{3} \tan \left (x \right )-\sqrt {-a b}\right ) \sinh \left (\sqrt {-a b}\, x \right )-\left (b \tan \left (x \right ) a +\sqrt {-a b}\, c_{3} \right ) \cosh \left (\sqrt {-a b}\, x \right )}{\left (c_{3} \sinh \left (\sqrt {-a b}\, x \right )+\cosh \left (\sqrt {-a b}\, x \right )\right ) a} \] Verified OK.

11.4.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }-y^{2} a -2 y \tan \left (x \right ) a b =b \left (a b -1\right ) \tan \left (x \right )^{2} \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & y^{\prime }=y^{2} a +2 y \tan \left (x \right ) a b +b \left (a b -1\right ) \tan \left (x \right )^{2} \end {array} \]

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 polynomial solution successful`
 

Solution by Maple

Time used: 0.0 (sec). Leaf size: 87

dsolve(diff(y(x),x)=a*y(x)^2+2*a*b*tan(x)*y(x)+b*(a*b-1)*tan(x)^2,y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {2 c_{1} a b -2 i \tan \left (x \right ) a^{\frac {3}{2}} b^{\frac {3}{2}} c_{1} +i \sqrt {a}\, \sqrt {b}\, {\mathrm e}^{-2 i \sqrt {a}\, \sqrt {b}\, x}-\tan \left (x \right ) {\mathrm e}^{-2 i \sqrt {a}\, \sqrt {b}\, x} a b}{a \left (2 i c_{1} \sqrt {a}\, \sqrt {b}+{\mathrm e}^{-2 i \sqrt {a}\, \sqrt {b}\, x}\right )} \]

Solution by Mathematica

Time used: 12.833 (sec). Leaf size: 37

DSolve[y'[x]==a*y[x]^2+2*a*b*Tan[x]*y[x]+b*(a*b-1)*Tan[x]^2,y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to -b \tan (x)+\sqrt {\frac {b}{a}} \tan \left (a x \sqrt {\frac {b}{a}}+c_1\right ) \]