3.5 problem 5

3.5.1 Solving as riccati ode
3.5.2 Maple step by step solution

Internal problem ID [10412]
Internal file name [OUTPUT/9360_Monday_June_06_2022_02_18_11_PM_50198122/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.3. Equations Containing Exponential Functions
Problem number: 5.
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}-y b=a \left (\lambda -b \right ) {\mathrm e}^{\lambda x}-a^{2} {\mathrm e}^{2 \lambda x}} \]

3.5.1 Solving as riccati ode

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

This is a Riccati ODE. Comparing the ODE to solve \[ y' = -a \,{\mathrm e}^{\lambda x} b +a \lambda \,{\mathrm e}^{\lambda x}-a^{2} {\mathrm e}^{2 \lambda x}+y b +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)=-a \,{\mathrm e}^{\lambda x} b +a \lambda \,{\mathrm e}^{\lambda x}-a^{2} {\mathrm e}^{2 \lambda x}\), \(f_1(x)=b\) 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 &=b\\ f_2^2 f_0 &=-a \,{\mathrm e}^{\lambda x} b +a \lambda \,{\mathrm e}^{\lambda x}-a^{2} {\mathrm e}^{2 \lambda x} \end {align*}

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

Summary

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

Verification of solutions

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

3.5.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }-y^{2}-y b =a \left (\lambda -b \right ) {\mathrm e}^{\lambda x}-a^{2} {\mathrm e}^{2 \lambda x} \\ \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}+y b +a \left (\lambda -b \right ) {\mathrm e}^{\lambda x}-a^{2} {\mathrm e}^{2 \lambda x} \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: 
   trying Riccati_symmetries 
   trying Riccati to 2nd Order 
   -> Calling odsolve with the ODE`, diff(diff(y(x), x), x) = (diff(y(x), x))*b+(a*b*exp(lambda*x)-a*lambda*exp(lambda*x)+a^2*exp(2* 
      Methods for second order ODEs: 
      --- Trying classification methods --- 
      trying a symmetry of the form [xi=0, eta=F(x)] 
      <- linear_1 successful 
   <- Riccati to 2nd Order successful`
 

Solution by Maple

Time used: 0.015 (sec). Leaf size: 80

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

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

Solution by Mathematica

Time used: 3.226 (sec). Leaf size: 191

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

\begin{align*} y(x)\to \frac {-2^{b/\lambda } \left (b-a e^{\lambda x}\right ) \left (\frac {a e^{\lambda x}}{\lambda }\right )^{b/\lambda } L_{-\frac {b}{\lambda }}^{\frac {b}{\lambda }}\left (\frac {2 a e^{x \lambda }}{\lambda }\right )+a e^{\lambda x} \left (2^{\frac {b+\lambda }{\lambda }} \left (\frac {a e^{\lambda x}}{\lambda }\right )^{b/\lambda } L_{-\frac {b+\lambda }{\lambda }}^{\frac {b+\lambda }{\lambda }}\left (\frac {2 a e^{x \lambda }}{\lambda }\right )+c_1\right )}{2^{b/\lambda } \left (\frac {a e^{\lambda x}}{\lambda }\right )^{b/\lambda } L_{-\frac {b}{\lambda }}^{\frac {b}{\lambda }}\left (\frac {2 a e^{x \lambda }}{\lambda }\right )+c_1} \\ y(x)\to a e^{\lambda x} \\ \end{align*}