3.21 problem 21

3.21.1 Solving as riccati ode
3.21.2 Maple step by step solution

Internal problem ID [10428]
Internal file name [OUTPUT/9376_Monday_June_06_2022_02_20_48_PM_50645941/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: 21.
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 {\left ({\mathrm e}^{\lambda x} a +b \,{\mathrm e}^{\mu x}+c \right ) \left (y^{\prime }-y^{2}\right )=-a \,\lambda ^{2} {\mathrm e}^{\lambda x}-b \,\mu ^{2} {\mathrm e}^{\mu x}} \]

3.21.1 Solving as riccati ode

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

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

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

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

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

Summary

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

Verification of solutions

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

3.21.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left ({\mathrm e}^{\lambda x} a +b \,{\mathrm e}^{\mu x}+c \right ) \left (y^{\prime }-y^{2}\right )=-a \,\lambda ^{2} {\mathrm e}^{\lambda x}-b \,\mu ^{2} {\mathrm e}^{\mu 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 }=\frac {b \,{\mathrm e}^{\mu x} y^{2}-b \,\mu ^{2} {\mathrm e}^{\mu x}+a \,{\mathrm e}^{\lambda x} y^{2}-a \,\lambda ^{2} {\mathrm e}^{\lambda x}+c y^{2}}{{\mathrm e}^{\lambda x} a +b \,{\mathrm e}^{\mu x}+c} \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) = (a*lambda^2*exp(lambda*x)+mu^2*exp(x*mu)*b)*y(x)/(exp(lambda*x)*a+b*ex 
      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: 176

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

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

Solution by Mathematica

Time used: 24.922 (sec). Leaf size: 393

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

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