3.18 problem 72

3.18.1 Solving as riccati ode
3.18.2 Maple step by step solution

Internal problem ID [3336]
Internal file name [OUTPUT/2828_Sunday_June_05_2022_08_41_15_AM_57142199/index.tex]

Book: Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section: Various 3
Problem number: 72.
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 }-\left (3-\cot \left (x \right )\right ) y-y^{2} \sin \left (x \right )=-4 \csc \left (x \right )} \]

3.18.1 Solving as riccati ode

In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= y^{2} \sin \left (x \right )-y \cot \left (x \right )-4 \csc \left (x \right )+3 y \end {align*}

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

Substituting the above terms back in equation (2) gives \begin {align*} \sin \left (x \right ) u^{\prime \prime }\left (x \right )-\left (\cos \left (x \right )+\left (3-\cot \left (x \right )\right ) \sin \left (x \right )\right ) u^{\prime }\left (x \right )-4 \csc \left (x \right ) \sin \left (x \right )^{2} 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 {3 \arcsin \left (\cos \left (x \right )\right )}{2}} \left (c_{1} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}}+c_{2} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}\right ) \] The above shows that \[ u^{\prime }\left (x \right ) = \frac {3 \left (c_{2} \left (\operatorname {csgn}\left (\sin \left (x \right )\right )+\frac {5}{3}\right ) \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}+c_{1} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}} \left (\operatorname {csgn}\left (\sin \left (x \right )\right )-\frac {5}{3}\right )\right ) {\mathrm e}^{-\frac {3 \arcsin \left (\cos \left (x \right )\right )}{2}}}{2} \] Using the above in (1) gives the solution \[ y = -\frac {3 \left (c_{2} \left (\operatorname {csgn}\left (\sin \left (x \right )\right )+\frac {5}{3}\right ) \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}+c_{1} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}} \left (\operatorname {csgn}\left (\sin \left (x \right )\right )-\frac {5}{3}\right )\right )}{2 \sin \left (x \right ) \left (c_{1} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}}+c_{2} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}\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 {3 \csc \left (x \right ) \left (\left (\operatorname {csgn}\left (\sin \left (x \right )\right )+\frac {5}{3}\right ) \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}+c_{3} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}} \left (\operatorname {csgn}\left (\sin \left (x \right )\right )-\frac {5}{3}\right )\right )}{2 c_{3} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}}+2 \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}} \] Simplifying the solution \(y = -\frac {3 \csc \left (x \right ) \left (\left (\operatorname {csgn}\left (\sin \left (x \right )\right )+\frac {5}{3}\right ) \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}+c_{3} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}} \left (\operatorname {csgn}\left (\sin \left (x \right )\right )-\frac {5}{3}\right )\right )}{2 c_{3} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}}+2 \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}}\) to \(y = -\frac {3 \csc \left (x \right ) \left (\frac {8 \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}}{3}-\frac {2 c_{3} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}}}{3}\right )}{2 c_{3} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}}+2 \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}}\)

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= -\frac {3 \csc \left (x \right ) \left (\frac {8 \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}}{3}-\frac {2 c_{3} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}}}{3}\right )}{2 c_{3} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}}+2 \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}} \\ \end{align*}

Figure 128: Slope field plot

Verification of solutions

\[ y = -\frac {3 \csc \left (x \right ) \left (\frac {8 \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}}{3}-\frac {2 c_{3} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}}}{3}\right )}{2 c_{3} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}}+2 \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}} \] Verified OK.

3.18.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }-\left (3-\cot \left (x \right )\right ) y-y^{2} \sin \left (x \right )=-4 \csc \left (x \right ) \\ \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 }=-4 \csc \left (x \right )+\left (3-\cot \left (x \right )\right ) y+y^{2} \sin \left (x \right ) \end {array} \]

Maple trace Kovacic algorithm successful

`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) = -(sin(x)*cot(x)-cos(x)-3*sin(x))*(diff(y(x), x))/sin(x)+4*csc(x)*sin(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 
         -> Trying a Liouvillian solution using Kovacics algorithm 
            A Liouvillian solution exists 
            Group is reducible or imprimitive 
         <- Kovacics algorithm successful 
         Change of variables used: 
            [x = arccos(t)] 
         Linear ODE actually solved: 
            (4*t^2-4)*u(t)+(-3*(-t^2+1)^(1/2)*t^2+t^3+3*(-t^2+1)^(1/2)-t)*diff(u(t),t)+(t^4-2*t^2+1)*diff(diff(u(t),t),t) = 0 
      <- change of variables successful 
   <- Riccati to 2nd Order successful`
 

Solution by Maple

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

dsolve(diff(y(x),x)+4*csc(x) = (3-cot(x))*y(x)+y(x)^2*sin(x),y(x), singsol=all)
 

\[ y \left (x \right ) = -\frac {3 \csc \left (x \right ) \left (c_{1} \left (\operatorname {csgn}\left (\sin \left (x \right )\right )+\frac {5}{3}\right ) \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}+\left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}} \left (\operatorname {csgn}\left (\sin \left (x \right )\right )-\frac {5}{3}\right )\right )}{2 c_{1} \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{-\frac {5 i}{2}}+2 \left (\cos \left (x \right )+i \sin \left (x \right )\right )^{\frac {5 i}{2}}} \]

Solution by Mathematica

Time used: 0.264 (sec). Leaf size: 32

DSolve[y'[x]+4 Csc[x]==(3-Cot[x])y[x]+y[x]^2 Sin[x],y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \left (-4+\frac {1}{\frac {1}{5}+c_1 e^{5 x}}\right ) \csc (x) \\ y(x)\to -4 \csc (x) \\ \end{align*}