3.14 problem 14

3.14.1 Solving as riccati ode
3.14.2 Maple step by step solution

Internal problem ID [10421]
Internal file name [OUTPUT/9369_Monday_June_06_2022_02_19_06_PM_308271/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: 14.
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 }+{\mathrm e}^{\lambda x} y^{2} \lambda -a \,{\mathrm e}^{\mu x} y=-a \,{\mathrm e}^{\left (\mu -\lambda \right ) x}} \]

3.14.1 Solving as riccati ode

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

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

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

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

\[ u \left (x \right ) = c_{1} {\mathrm e}^{\lambda x}+c_{2} \operatorname {hypergeom}\left (\left [-\frac {\lambda }{\mu }\right ], \left [\frac {\mu -\lambda }{\mu }\right ], \frac {a \,{\mathrm e}^{\mu x}}{\mu }\right ) \] The above shows that \[ u^{\prime }\left (x \right ) = -\frac {\left (c_{2} \operatorname {hypergeom}\left (\left [\frac {\mu -\lambda }{\mu }\right ], \left [\frac {-\lambda +2 \mu }{\mu }\right ], \frac {a \,{\mathrm e}^{\mu x}}{\mu }\right ) a \,{\mathrm e}^{\mu x}-{\mathrm e}^{\lambda x} c_{1} \left (\mu -\lambda \right )\right ) \lambda }{\mu -\lambda } \] Using the above in (1) gives the solution \[ y = -\frac {\left (c_{2} \operatorname {hypergeom}\left (\left [\frac {\mu -\lambda }{\mu }\right ], \left [\frac {-\lambda +2 \mu }{\mu }\right ], \frac {a \,{\mathrm e}^{\mu x}}{\mu }\right ) a \,{\mathrm e}^{\mu x}-{\mathrm e}^{\lambda x} c_{1} \left (\mu -\lambda \right )\right ) {\mathrm e}^{-\lambda x}}{\left (\mu -\lambda \right ) \left (c_{1} {\mathrm e}^{\lambda x}+c_{2} \operatorname {hypergeom}\left (\left [-\frac {\lambda }{\mu }\right ], \left [\frac {\mu -\lambda }{\mu }\right ], \frac {a \,{\mathrm e}^{\mu x}}{\mu }\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 {-\operatorname {hypergeom}\left (\left [\frac {\mu -\lambda }{\mu }\right ], \left [\frac {-\lambda +2 \mu }{\mu }\right ], \frac {a \,{\mathrm e}^{\mu x}}{\mu }\right ) a \,{\mathrm e}^{\left (\mu -\lambda \right ) x}+c_{3} \left (\mu -\lambda \right )}{\left (\mu -\lambda \right ) \left (c_{3} {\mathrm e}^{\lambda x}+\operatorname {hypergeom}\left (\left [-\frac {\lambda }{\mu }\right ], \left [\frac {\mu -\lambda }{\mu }\right ], \frac {a \,{\mathrm e}^{\mu x}}{\mu }\right )\right )} \]

Summary

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

Verification of solutions

\[ y = \frac {-\operatorname {hypergeom}\left (\left [\frac {\mu -\lambda }{\mu }\right ], \left [\frac {-\lambda +2 \mu }{\mu }\right ], \frac {a \,{\mathrm e}^{\mu x}}{\mu }\right ) a \,{\mathrm e}^{\left (\mu -\lambda \right ) x}+c_{3} \left (\mu -\lambda \right )}{\left (\mu -\lambda \right ) \left (c_{3} {\mathrm e}^{\lambda x}+\operatorname {hypergeom}\left (\left [-\frac {\lambda }{\mu }\right ], \left [\frac {\mu -\lambda }{\mu }\right ], \frac {a \,{\mathrm e}^{\mu x}}{\mu }\right )\right )} \] Verified OK.

3.14.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }+{\mathrm e}^{\lambda x} y^{2} \lambda -a \,{\mathrm e}^{\mu x} y=-a \,{\mathrm e}^{\left (\mu -\lambda \right ) 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 }=-{\mathrm e}^{\lambda x} y^{2} \lambda +a \,{\mathrm e}^{\mu x} y-a \,{\mathrm e}^{\left (\mu -\lambda \right ) 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 
   <- Riccati to 2nd Order successful`
 

Solution by Maple

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

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

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

Solution by Mathematica

Time used: 4.358 (sec). Leaf size: 147

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

\begin{align*} y(x)\to \frac {e^{\lambda (-x)} \left (-\lambda \left (-\frac {a e^{\mu x}}{\mu }\right )^{\lambda /\mu } \Gamma \left (-\frac {\lambda }{\mu },-\frac {a e^{x \mu }}{\mu }\right )+\mu e^{\frac {a e^{\mu x}}{\mu }}+c_1 \lambda \left (e^{\mu x}\right )^{\lambda /\mu }\right )}{\lambda \left (-\left (-\frac {a e^{\mu x}}{\mu }\right )^{\lambda /\mu } \Gamma \left (-\frac {\lambda }{\mu },-\frac {a e^{x \mu }}{\mu }\right )+c_1 \left (e^{\mu x}\right )^{\lambda /\mu }\right )} \\ y(x)\to e^{\lambda (-x)} \\ \end{align*}