19.17 problem 17

19.17.1 Solving as riccati ode
19.17.2 Maple step by step solution

Internal problem ID [10609]
Internal file name [OUTPUT/9557_Monday_June_06_2022_03_08_52_PM_9131604/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.8-1. Equations containing arbitrary functions (but not containing their derivatives).
Problem number: 17.
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} f \left (x \right ) y^{2}-\left (a f \left (x \right )-\lambda \right ) y=b \,{\mathrm e}^{-\lambda x} f \left (x \right )} \]

19.17.1 Solving as riccati ode

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

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

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

Summary

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

Verification of solutions

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

19.17.2 Maple step by step solution

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

Solution by Maple

Time used: 0.031 (sec). Leaf size: 59

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

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

Solution by Mathematica

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

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

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