4.12 problem 33

4.12.1 Solving as riccati ode
4.12.2 Maple step by step solution

Internal problem ID [10440]
Internal file name [OUTPUT/9388_Monday_June_06_2022_02_21_15_PM_99041241/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: 33.
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 \,x^{n} {\mathrm e}^{2 \lambda x} y^{2}-\left (b \,x^{n} {\mathrm e}^{\lambda x}-\lambda \right ) y=c \,x^{n}} \]

4.12.1 Solving as riccati ode

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

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

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

Summary

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

Verification of solutions

\[ y = \frac {{\mathrm e}^{-\lambda x} \left (\tan \left (\frac {\sqrt {4 a \,b^{2} c -b^{4}}\, \left (b n \left (-\lambda x \right )^{-n} \Gamma \left (n , -\lambda x \right ) x^{n}-x^{n} \left (-\lambda x \right )^{-n} \Gamma \left (1+n \right ) b +b \,x^{n} {\mathrm e}^{\lambda x}+\lambda c_{3} \right )}{2 b^{2} \lambda }\right ) \sqrt {4 a \,b^{2} c -b^{4}}-b^{2}\right )}{2 a b} \] Verified OK.

4.12.2 Maple step by step solution

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

Solution by Maple

Time used: 0.032 (sec). Leaf size: 114

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

\[ y \left (x \right ) = \frac {\left (\tan \left (\frac {\sqrt {4 a \,b^{2} c -b^{4}}\, \left (x^{n} \left (-x \lambda \right )^{-n} \Gamma \left (n , -x \lambda \right ) b n -x^{n} \left (-x \lambda \right )^{-n} \Gamma \left (n +1\right ) b +{\mathrm e}^{x \lambda } x^{n} b +\lambda c_{1} \right )}{2 b^{2} \lambda }\right ) \sqrt {4 a \,b^{2} c -b^{4}}-b^{2}\right ) {\mathrm e}^{-x \lambda }}{2 a b} \]

Solution by Mathematica

Time used: 3.112 (sec). Leaf size: 102

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

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