1.104 problem 104

1.104.1 Solving as riccati ode
1.104.2 Maple step by step solution

Internal problem ID [8441]
Internal file name [OUTPUT/7374_Sunday_June_05_2022_10_53_51_PM_23151426/index.tex]

Book: Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section: Chapter 1, linear first order
Problem number: 104.
ODE order: 1.
ODE degree: 1.

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

Maple gives the following as the ode type

[_rational, [_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

\[ \boxed {x y^{\prime }+a x y^{2}+2 y=-b x} \]

1.104.1 Solving as riccati ode

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

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

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

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {\left (x c_{3} \sqrt {-a b}-1\right ) \cosh \left (\sqrt {-a b}\, x \right )+\sinh \left (\sqrt {-a b}\, x \right ) \left (\sqrt {-a b}\, x -c_{3} \right )}{x a \left (c_{3} \sinh \left (\sqrt {-a b}\, x \right )+\cosh \left (\sqrt {-a b}\, x \right )\right )} \\ \end{align*}

Verification of solutions

\[ y = \frac {\left (x c_{3} \sqrt {-a b}-1\right ) \cosh \left (\sqrt {-a b}\, x \right )+\sinh \left (\sqrt {-a b}\, x \right ) \left (\sqrt {-a b}\, x -c_{3} \right )}{x a \left (c_{3} \sinh \left (\sqrt {-a b}\, x \right )+\cosh \left (\sqrt {-a b}\, x \right )\right )} \] Verified OK.

1.104.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & x y^{\prime }+a x y^{2}+2 y=-b x \\ \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 {-a x y^{2}-2 y-b x}{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 
differential order: 1; looking for linear symmetries 
trying exact 
Looking for potential symmetries 
trying Riccati 
trying Riccati sub-methods: 
   <- Riccati particular polynomial solution successful`
 

Solution by Maple

Time used: 0.016 (sec). Leaf size: 86

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

\[ y \left (x \right ) = \frac {-2 b a c_{1} x -i \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{-2 i \sqrt {a}\, \sqrt {b}\, x} x -2 i c_{1} \sqrt {a}\, \sqrt {b}-{\mathrm e}^{-2 i \sqrt {a}\, \sqrt {b}\, x}}{x a \left (2 i c_{1} \sqrt {a}\, \sqrt {b}+{\mathrm e}^{-2 i \sqrt {a}\, \sqrt {b}\, x}\right )} \]

Solution by Mathematica

Time used: 2.922 (sec). Leaf size: 43

DSolve[x*y'[x] + a*x*y[x]^2 + 2*y[x] + b*x==0,y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to -\frac {1}{a x}-\sqrt {\frac {b}{a}} \tan \left (a x \sqrt {\frac {b}{a}}-c_1\right ) \]