1.194 problem 195

1.194.1 Solving as riccati ode
1.194.2 Maple step by step solution

Internal problem ID [8531]
Internal file name [OUTPUT/7464_Sunday_June_05_2022_10_55_38_PM_5927866/index.tex]

Book: Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section: Chapter 1, linear first order
Problem number: 195.
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 {\sin \left (x \right ) y^{\prime }-y^{2} \sin \left (x \right )^{2}+\left (\cos \left (x \right )-3 \sin \left (x \right )\right ) y=-4} \]

1.194.1 Solving as riccati ode

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

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

Substituting the above terms back in equation (2) gives \begin {align*} \sin \left (x \right ) u^{\prime \prime }\left (x \right )-3 \sin \left (x \right ) u^{\prime }\left (x \right )-4 \sin \left (x \right ) u \left (x \right ) &=0 \end {align*}

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

\[ u \left (x \right ) = c_{1} {\mathrm e}^{-x}+c_{2} {\mathrm e}^{4 x} \] The above shows that \[ u^{\prime }\left (x \right ) = -c_{1} {\mathrm e}^{-x}+4 c_{2} {\mathrm e}^{4 x} \] Using the above in (1) gives the solution \[ y = -\frac {-c_{1} {\mathrm e}^{-x}+4 c_{2} {\mathrm e}^{4 x}}{\sin \left (x \right ) \left (c_{1} {\mathrm e}^{-x}+c_{2} {\mathrm e}^{4 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 {\csc \left (x \right ) \left (-4 \,{\mathrm e}^{5 x}+c_{3} \right )}{{\mathrm e}^{5 x}+c_{3}} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {\csc \left (x \right ) \left (-4 \,{\mathrm e}^{5 x}+c_{3} \right )}{{\mathrm e}^{5 x}+c_{3}} \\ \end{align*}

Figure 213: Slope field plot

Verification of solutions

\[ y = \frac {\csc \left (x \right ) \left (-4 \,{\mathrm e}^{5 x}+c_{3} \right )}{{\mathrm e}^{5 x}+c_{3}} \] Verified OK.

1.194.2 Maple step by step solution

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

Solution by Maple

Time used: 0.031 (sec). Leaf size: 26

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

\[ y \left (x \right ) = -\frac {4 \csc \left (x \right ) \left (c_{1} {\mathrm e}^{5 x}+1\right )}{c_{1} {\mathrm e}^{5 x}-4} \]

Solution by Mathematica

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

DSolve[Sin[x]*y'[x] - y[x]^2*Sin[x]^2 + (Cos[x] - 3*Sin[x])*y[x] + 4==0,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*}