2.78 problem 78

2.78.1 Solving as homogeneousTypeD2 ode
2.78.2 Solving as riccati ode
2.78.3 Maple step by step solution

Internal problem ID [10407]
Internal file name [OUTPUT/9355_Monday_June_06_2022_02_18_02_PM_79181218/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. 1.2.2. Equations Containing Power Functions
Problem number: 78.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "riccati", "homogeneousTypeD2"

Maple gives the following as the ode type

[[_homogeneous, `class D`], _rational, _Riccati]

\[ \boxed {\left (x^{n} a +b \,x^{m}+c \right ) \left (y^{\prime } x -y\right )+s \,x^{k} \left (y^{2}-\lambda \,x^{2}\right )=0} \]

2.78.1 Solving as homogeneousTypeD2 ode

Using the change of variables \(y = u \left (x \right ) x\) on the above ode results in new ode in \(u \left (x \right )\) \begin {align*} \left (x^{n} a +b \,x^{m}+c \right ) \left (\left (u^{\prime }\left (x \right ) x +u \left (x \right )\right ) x -u \left (x \right ) x \right )+s \,x^{k} \left (u \left (x \right )^{2} x^{2}-\lambda \,x^{2}\right ) = 0 \end {align*}

In canonical form the ODE is \begin {align*} u' &= F(x,u)\\ &= f( x) g(u)\\ &= -\frac {s \,x^{k} \left (u^{2}-\lambda \right )}{x^{n} a +b \,x^{m}+c} \end {align*}

Where \(f(x)=-\frac {s \,x^{k}}{x^{n} a +b \,x^{m}+c}\) and \(g(u)=u^{2}-\lambda \). Integrating both sides gives \begin{align*} \frac {1}{u^{2}-\lambda } \,du &= -\frac {s \,x^{k}}{x^{n} a +b \,x^{m}+c} \,d x \\ \int { \frac {1}{u^{2}-\lambda } \,du} &= \int {-\frac {s \,x^{k}}{x^{n} a +b \,x^{m}+c} \,d x} \\ -\frac {\operatorname {arctanh}\left (\frac {u}{\sqrt {\lambda }}\right )}{\sqrt {\lambda }}&=\int -\frac {s \,x^{k}}{x^{n} a +b \,x^{m}+c}d x +c_{2} \\ \end{align*} The solution is \[ -\frac {\operatorname {arctanh}\left (\frac {u \left (x \right )}{\sqrt {\lambda }}\right )}{\sqrt {\lambda }}-\left (\int -\frac {s \,x^{k}}{x^{n} a +b \,x^{m}+c}d x \right )-c_{2} = 0 \] Replacing \(u(x)\) in the above solution by \(\frac {y}{x}\) results in the solution for \(y\) in implicit form \begin {align*} -\frac {\operatorname {arctanh}\left (\frac {y}{x \sqrt {\lambda }}\right )}{\sqrt {\lambda }}-\left (\int -\frac {s \,x^{k}}{x^{n} a +b \,x^{m}+c}d x \right )-c_{2} = 0\\ -\frac {\operatorname {arctanh}\left (\frac {y}{x \sqrt {\lambda }}\right )}{\sqrt {\lambda }}+s \left (\int \frac {x^{k}}{x^{n} a +b \,x^{m}+c}d x \right )-c_{2} = 0 \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} -\frac {\operatorname {arctanh}\left (\frac {y}{x \sqrt {\lambda }}\right )}{\sqrt {\lambda }}+s \left (\int \frac {x^{k}}{x^{n} a +b \,x^{m}+c}d x \right )-c_{2} &= 0 \\ \end{align*}

Verification of solutions

\[ -\frac {\operatorname {arctanh}\left (\frac {y}{x \sqrt {\lambda }}\right )}{\sqrt {\lambda }}+s \left (\int \frac {x^{k}}{x^{n} a +b \,x^{m}+c}d x \right )-c_{2} = 0 \] Verified OK.

2.78.2 Solving as riccati ode

In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= -\frac {-x^{k} \lambda s \,x^{2}+y^{2} x^{k} s -x^{n} a y -b \,x^{m} y -y c}{x \left (x^{n} a +b \,x^{m}+c \right )} \end {align*}

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

Substituting the above terms back in equation (2) gives \begin {align*} -\frac {s \,x^{k} u^{\prime \prime }\left (x \right )}{x \left (x^{n} a +b \,x^{m}+c \right )}-\left (-\frac {s k \,x^{k}}{x^{2} \left (x^{n} a +b \,x^{m}+c \right )}+\frac {s \,x^{k}}{x^{2} \left (x^{n} a +b \,x^{m}+c \right )}+\frac {s \,x^{k} \left (\frac {x^{n} n a}{x}+\frac {b \,x^{m} m}{x}\right )}{x \left (x^{n} a +b \,x^{m}+c \right )^{2}}+\frac {\left (-x^{n} a -b \,x^{m}-c \right ) s \,x^{k}}{x^{2} \left (x^{n} a +b \,x^{m}+c \right )^{2}}\right ) u^{\prime }\left (x \right )+\frac {s^{3} x^{3 k} \lambda u \left (x \right )}{x \left (x^{n} a +b \,x^{m}+c \right )^{3}} &=0 \end {align*}

Solving the above ODE (this ode solved using Maple, not this program), gives

\[ u \left (x \right ) = c_{1} {\mathrm e}^{i s \left (\int x^{k} \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}d x \right )}+c_{2} {\mathrm e}^{-i s \left (\int x^{k} \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}d x \right )} \] The above shows that \[ u^{\prime }\left (x \right ) = i s \,x^{k} \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}\, \left (c_{1} {\mathrm e}^{i s \left (\int x^{k} \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}d x \right )}-c_{2} {\mathrm e}^{-i s \left (\int x^{k} \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}d x \right )}\right ) \] Using the above in (1) gives the solution \[ y = \frac {i \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}\, \left (c_{1} {\mathrm e}^{i s \left (\int x^{k} \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}d x \right )}-c_{2} {\mathrm e}^{-i s \left (\int x^{k} \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}d x \right )}\right ) x \left (x^{n} a +b \,x^{m}+c \right )}{c_{1} {\mathrm e}^{i s \left (\int x^{k} \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}d x \right )}+c_{2} {\mathrm e}^{-i s \left (\int x^{k} \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}d x \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 {i \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}\, \left (c_{3} {\mathrm e}^{i s \left (\int x^{k} \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}d x \right )}-{\mathrm e}^{-i s \left (\int x^{k} \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}d x \right )}\right ) x \left (x^{n} a +b \,x^{m}+c \right )}{c_{3} {\mathrm e}^{i s \left (\int x^{k} \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}d x \right )}+{\mathrm e}^{-i s \left (\int x^{k} \sqrt {-\frac {\lambda }{a^{2} x^{2 n}+2 b \,x^{m +n} a +2 x^{n} a c +x^{2 m} b^{2}+2 x^{m} b c +c^{2}}}d x \right )}} \]

Summary

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

Verification of solutions

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

2.78.3 Maple step by step solution

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

Solution by Maple

Time used: 0.015 (sec). Leaf size: 37

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

\[ y \left (x \right ) = \tanh \left (s \sqrt {\lambda }\, \left (\int \frac {x^{k}}{a \,x^{n}+b \,x^{m}+c}d x +c_{1} \right )\right ) x \sqrt {\lambda } \]

Solution by Mathematica

Time used: 22.652 (sec). Leaf size: 53

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

\[ y(x)\to \sqrt {\lambda } (-x) \tanh \left (\sqrt {\lambda } \left (\int _1^x-\frac {s K[1]^k}{b K[1]^m+a K[1]^n+c}dK[1]+c_1\right )\right ) \]