19.8 problem 8

19.8.1 Solving as riccati ode
19.8.2 Maple step by step solution

Internal problem ID [10600]
Internal file name [OUTPUT/9548_Monday_June_06_2022_03_07_32_PM_96364581/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: 8.
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 } x -x^{2 n} f \left (x \right ) y^{2}-\left (a \,x^{n} f \left (x \right )-n \right ) y=f \left (x \right ) b} \]

19.8.1 Solving as riccati ode

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

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

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

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

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

Summary

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

Verification of solutions

\[ y = -\frac {\left (f \left (x \right )^{2} x^{n} a +3 n f \left (x \right )+f^{\prime }\left (x \right ) x \right ) x^{-2 n}}{2 f \left (x \right )^{2}} \] Verified OK.

19.8.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime } x -x^{2 n} f \left (x \right ) y^{2}-\left (a \,x^{n} f \left (x \right )-n \right ) y=f \left (x \right ) b \\ \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^{2 n} f \left (x \right ) y^{2}+\left (a \,x^{n} f \left (x \right )-n \right ) y+f \left (x \right ) b}{x} \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.031 (sec). Leaf size: 65

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

\[ y \left (x \right ) = -\frac {\left (a^{2}+\tanh \left (\frac {\sqrt {a^{2} \left (a^{2}-4 b \right )}\, \left (a \left (\int f \left (x \right ) x^{n -1}d x \right )+c_{1} \right )}{2 a^{2}}\right ) \sqrt {a^{2} \left (a^{2}-4 b \right )}\right ) x^{-n}}{2 a} \]

Solution by Mathematica

Time used: 2.272 (sec). Leaf size: 82

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

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