9.4 problem 4

9.4.1 Solving as riccati ode
9.4.2 Maple step by step solution

Internal problem ID [10501]
Internal file name [OUTPUT/9449_Monday_June_06_2022_02_36_09_PM_13360096/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-1. Equations with sine
Problem number: 4.
ODE order: 1.
ODE degree: 1.

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

Maple gives the following as the ode type

[_Riccati]

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

9.4.1 Solving as riccati ode

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

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

Substituting the above terms back in equation (2) gives \begin {align*} u^{\prime \prime }\left (x \right )-\sin \left (\beta x \right ) a u^{\prime }\left (x \right )+\left (a b \sin \left (\beta x \right )-b^{2}\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 ) = \left (-i c_{2} \beta \left (\int {\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}d x \right )+c_{1} \right ) {\mathrm e}^{b x} \] The above shows that \[ u^{\prime }\left (x \right ) = \left (-i \left (\int {\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}d x \right ) c_{2} b \beta -i c_{2} \beta \,{\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}+c_{1} b \right ) {\mathrm e}^{b x} \] Using the above in (1) gives the solution \[ y = -\frac {-i \left (\int {\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}d x \right ) c_{2} b \beta -i c_{2} \beta \,{\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}+c_{1} b}{-i c_{2} \beta \left (\int {\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}d x \right )+c_{1}} \] 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 (\int {\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}d x \right ) b \beta -i b c_{3} -{\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }} \beta }{\beta \left (\int {\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}d x \right )+i c_{3}} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {-\left (\int {\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}d x \right ) b \beta -i b c_{3} -{\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }} \beta }{\beta \left (\int {\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}d x \right )+i c_{3}} \\ \end{align*}

Verification of solutions

\[ y = \frac {-\left (\int {\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}d x \right ) b \beta -i b c_{3} -{\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }} \beta }{\beta \left (\int {\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}d x \right )+i c_{3}} \] Verified OK.

9.4.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }-y^{2}-a \sin \left (\beta x \right ) y=a b \sin \left (\beta x \right )-b^{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 \sin \left (\beta x \right ) y+a b \sin \left (\beta x \right )-b^{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 case Kamke (b) successful`
 

Solution by Maple

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

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

\[ y \left (x \right ) = \frac {b \left (\int {\mathrm e}^{\frac {-2 b \beta x -a \cos \left (x \beta \right )}{\beta }}d x \right )-c_{1} b +{\mathrm e}^{\frac {-2 b \beta x -a \cos \left (x \beta \right )}{\beta }}}{-\left (\int {\mathrm e}^{\frac {-2 b \beta x -a \cos \left (x \beta \right )}{\beta }}d x \right )+c_{1}} \]

Solution by Mathematica

Time used: 9.066 (sec). Leaf size: 187

DSolve[y'[x]==y[x]^2+a*Sin[\[Beta]*x]*y[x]+a*b*Sin[\[Beta]*x]-b^2,y[x],x,IncludeSingularSolutions -> True]
 

\[ \text {Solve}\left [\int _1^x-\frac {e^{-\frac {a \cos (\beta K[1])}{\beta }-2 b K[1]} (-b+a \sin (\beta K[1])+y(x))}{a \beta (b+y(x))}dK[1]+\int _1^{y(x)}\left (\frac {e^{-2 b x-\frac {a \cos (x \beta )}{\beta }}}{a \beta (b+K[2])^2}-\int _1^x\left (\frac {e^{-\frac {a \cos (\beta K[1])}{\beta }-2 b K[1]} (-b+K[2]+a \sin (\beta K[1]))}{a \beta (b+K[2])^2}-\frac {e^{-\frac {a \cos (\beta K[1])}{\beta }-2 b K[1]}}{a \beta (b+K[2])}\right )dK[1]\right )dK[2]=c_1,y(x)\right ] \]