4.5 problem 26

4.5.1 Solving as riccati ode
4.5.2 Maple step by step solution

Internal problem ID [10433]
Internal file name [OUTPUT/9381_Monday_June_06_2022_02_20_59_PM_24609640/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-2. Equations with power and exponential functions
Problem number: 26.
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 \,x^{n} y \,{\mathrm e}^{\lambda x}=-x^{n} a} \]

4.5.1 Solving as riccati ode

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

This is a Riccati ODE. Comparing the ODE to solve \[ y' = -\lambda \,{\mathrm e}^{\lambda x} y^{2}+x^{n} a y \,{\mathrm e}^{\lambda x}-x^{n} a \] With Riccati ODE standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \] Shows that \(f_0(x)=-x^{n} a\), \(f_1(x)={\mathrm e}^{\lambda x} x^{n} a\) 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 &=-{\mathrm e}^{2 \lambda x} x^{n} a \lambda \\ f_2^2 f_0 &=-{\mathrm e}^{2 \lambda x} x^{n} a \,\lambda ^{2} \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 (-{\mathrm e}^{2 \lambda x} x^{n} a \lambda -{\mathrm e}^{\lambda x} \lambda ^{2}\right ) u^{\prime }\left (x \right )-{\mathrm e}^{2 \lambda x} x^{n} a \,\lambda ^{2} 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 {\mathrm e}^{\lambda x} x^{n}d x \right )}d x \right ) c_{2} +c_{1} \lambda \right )}{\lambda } \] The above shows that \[ u^{\prime }\left (x \right ) = \frac {{\mathrm e}^{\lambda x} \left (\int {\mathrm e}^{-\lambda x +a \left (\int {\mathrm e}^{\lambda x} x^{n}d x \right )}d x \right ) c_{2} \lambda +{\mathrm e}^{\lambda x} c_{1} \lambda ^{2}+c_{2} {\mathrm e}^{a \left (\int {\mathrm e}^{\lambda x} x^{n}d x \right )}}{\lambda } \] Using the above in (1) gives the solution \[ y = \frac {\left ({\mathrm e}^{\lambda x} \left (\int {\mathrm e}^{-\lambda x +a \left (\int {\mathrm e}^{\lambda x} x^{n}d x \right )}d x \right ) c_{2} \lambda +{\mathrm e}^{\lambda x} c_{1} \lambda ^{2}+c_{2} {\mathrm e}^{a \left (\int {\mathrm e}^{\lambda x} x^{n}d x \right )}\right ) {\mathrm e}^{-2 \lambda x}}{\lambda \left (\left (\int {\mathrm e}^{-\lambda x +a \left (\int {\mathrm e}^{\lambda x} x^{n}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 ({\mathrm e}^{\lambda x} \left (\int {\mathrm e}^{-\lambda x +a \left (\int {\mathrm e}^{\lambda x} x^{n}d x \right )}d x \right ) \lambda +{\mathrm e}^{\lambda x} c_{3} \lambda ^{2}+{\mathrm e}^{a \left (\int {\mathrm e}^{\lambda x} x^{n}d x \right )}\right ) {\mathrm e}^{-2 \lambda x}}{\lambda \left (\int {\mathrm e}^{-\lambda x +a \left (\int {\mathrm e}^{\lambda x} x^{n}d x \right )}d x +\lambda c_{3} \right )} \]

Summary

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

Verification of solutions

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

4.5.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 \,x^{n} y \,{\mathrm e}^{\lambda x}=-x^{n} a \\ \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 \,x^{n} y \,{\mathrm e}^{\lambda x}-x^{n} a \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*x^n*exp(lambda*x)+lambda)*(diff(y(x), x))-a*lambda*exp(lambda*x)*x^ 
      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*(ln(t)/lambda)^n*u(t)-a*(ln(t)/lambda)^n*t*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)=-lambda*exp(lambda*x)*y(x)^2+a*x^(n)*exp(lambda*x)*y(x)-a*x^n,y(x), singsol=all)
 

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

Solution by Mathematica

Time used: 6.627 (sec). Leaf size: 185

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

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