4.6 problem 27

4.6.1 Solving as riccati ode
4.6.2 Maple step by step solution

Internal problem ID [10434]
Internal file name [OUTPUT/9382_Monday_June_06_2022_02_21_00_PM_76993873/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: 27.
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 b \,x^{n} {\mathrm e}^{\lambda x} y=b n \,x^{-1+n}} \]

4.6.1 Solving as riccati ode

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

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

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

Summary

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

Verification of solutions

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

4.6.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 b \,x^{n} {\mathrm e}^{\lambda x} y=b n \,x^{-1+n} \\ \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 b \,x^{n} {\mathrm e}^{\lambda x} y+b n \,x^{-1+n} \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) = (-exp(lambda*x)*x^n*a*b+lambda)*(diff(y(x), x))-exp(lambda*x)*y(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)] 
         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 a symmetry of the form [xi=0, eta=F(x)] 
            trying 2nd order exact linear 
            <- 2nd order exact_linear successful 
         Change of variables used: 
            [x = ln(t)/lambda] 
         Linear ODE actually solved: 
            b*(ln(t)/lambda)^n/ln(t)*lambda*n*a*u(t)+t*(ln(t)/lambda)^n*a*b*lambda*diff(u(t),t)+lambda^2*t*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: 88

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

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

Solution by Mathematica

Time used: 63.132 (sec). Leaf size: 188

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

\[ y(x)\to \frac {a b c_1 \left (\frac {\log \left (e^{\lambda x}\right )}{\lambda }\right )^n \int _1^{e^{x \lambda }}\exp \left (\frac {a b \Gamma (n+1,-\log (K[1])) (-\log (K[1]))^{-n} \left (\frac {\log (K[1])}{\lambda }\right )^n}{\lambda }\right )dK[1]-c_1 \lambda \exp \left (\frac {a b \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 )+a b \left (\frac {\log \left (e^{\lambda x}\right )}{\lambda }\right )^n}{a+a c_1 \int _1^{e^{x \lambda }}\exp \left (\frac {a b \Gamma (n+1,-\log (K[1])) (-\log (K[1]))^{-n} \left (\frac {\log (K[1])}{\lambda }\right )^n}{\lambda }\right )dK[1]} \]