19.12 problem 12

19.12.1 Solving as riccati ode
19.12.2 Maple step by step solution

Internal problem ID [10604]
Internal file name [OUTPUT/9552_Monday_June_06_2022_03_08_37_PM_49442143/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: 12.
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 }-a \,{\mathrm e}^{\lambda x} y^{2}-a \,{\mathrm e}^{\lambda x} f \left (x \right ) y=\lambda f \left (x \right )} \]

19.12.1 Solving as riccati ode

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

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

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

Summary

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

Verification of solutions

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

19.12.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }-a \,{\mathrm e}^{\lambda x} y^{2}-a \,{\mathrm e}^{\lambda x} f \left (x \right ) y=\lambda 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 }=a \,{\mathrm e}^{\lambda x} y^{2}+a \,{\mathrm e}^{\lambda x} f \left (x \right ) y+\lambda 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 
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*exp(lambda*x)*f(x)+lambda)*(diff(y(x), x))-exp(lambda*x)*a*lambda*f 
      Methods for second order ODEs: 
      --- Trying classification methods --- 
      trying a symmetry of the form [xi=0, eta=F(x)] 
      checking if the LODE is missing y 
      -> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power @ Moebius 
      -> trying a solution of the form r0(x) * Y + r1(x) * Y where Y = exp(int(r(x), dx)) * 2F1([a1, a2], [b1], f) 
      -> Trying changes of variables to rationalize or make the ODE simpler 
         trying a symmetry of the form [xi=0, eta=F(x)] 
         <- linear_1 successful 
         Change of variables used: 
            [x = ln(t)/lambda] 
         Linear ODE actually solved: 
            a*f(ln(t)/lambda)*u(t)-a*t*f(ln(t)/lambda)*diff(u(t),t)+t*lambda*diff(diff(u(t),t),t) = 0 
      <- change of variables successful 
   <- Riccati to 2nd Order successful`
 

Solution by Maple

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

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

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

Solution by Mathematica

Time used: 4.45 (sec). Leaf size: 166

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

\begin{align*} y(x)\to -\frac {\lambda e^{-2 \lambda x} \left (\exp \left (-\int _1^{e^{x \lambda }}-\frac {a f\left (\frac {\log (K[1])}{\lambda }\right )}{\lambda }dK[1]\right )+e^{\lambda x} \int _1^{e^{x \lambda }}\frac {\exp \left (-\int _1^{K[2]}-\frac {a f\left (\frac {\log (K[1])}{\lambda }\right )}{\lambda }dK[1]\right )}{K[2]^2}dK[2]+c_1 e^{\lambda x}\right )}{a \left (\int _1^{e^{x \lambda }}\frac {\exp \left (-\int _1^{K[2]}-\frac {a f\left (\frac {\log (K[1])}{\lambda }\right )}{\lambda }dK[1]\right )}{K[2]^2}dK[2]+c_1\right )} \\ y(x)\to -\frac {\lambda e^{\lambda (-x)}}{a} \\ \end{align*}