2.51 problem Problem 19(d)

2.51.1 Solving as second order integrable as is ode
2.51.2 Solving as type second_order_integrable_as_is (not using ABC version)

Internal problem ID [12271]
Internal file name [OUTPUT/10924_Thursday_September_28_2023_01_09_05_AM_43949395/index.tex]

Book: APPLIED DIFFERENTIAL EQUATIONS The Primary Course by Vladimir A. Dobrushkin. CRC Press 2015
Section: Chapter 4, Second and Higher Order Linear Differential Equations. Problems page 221
Problem number: Problem 19(d).
ODE order: 2.
ODE degree: 1.

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

Maple gives the following as the ode type

[[_2nd_order, _exact, _nonlinear], [_2nd_order, _reducible, _mu_y_y1], [_2nd_order, _reducible, _mu_xy]]

\[ \boxed {y y^{\prime \prime } \sin \left (x \right )+\left (y^{\prime } \sin \left (x \right )+y \cos \left (x \right )\right ) y^{\prime }=\cos \left (x \right )} \]

2.51.1 Solving as second order integrable as is ode

Integrating both sides of the ODE w.r.t \(x\) gives \begin {align*} \int \left (y y^{\prime \prime } \sin \left (x \right )+\left (y^{\prime } \sin \left (x \right )+y \cos \left (x \right )\right ) y^{\prime }\right )d x &= \int \cos \left (x \right )d x\\ y y^{\prime } \sin \left (x \right ) = \sin \left (x \right ) + c_{1} \end {align*}

Which is now solved for \(y\). In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= f( x) g(y)\\ &= \frac {\sin \left (x \right )+c_{1}}{y \sin \left (x \right )} \end {align*}

Where \(f(x)=\frac {\sin \left (x \right )+c_{1}}{\sin \left (x \right )}\) and \(g(y)=\frac {1}{y}\). Integrating both sides gives \begin{align*} \frac {1}{\frac {1}{y}} \,dy &= \frac {\sin \left (x \right )+c_{1}}{\sin \left (x \right )} \,d x \\ \int { \frac {1}{\frac {1}{y}} \,dy} &= \int {\frac {\sin \left (x \right )+c_{1}}{\sin \left (x \right )} \,d x} \\ \frac {y^{2}}{2}&=c_{1} \ln \left (-\cot \left (x \right )+\csc \left (x \right )\right )+x +c_{2} \\ \end{align*} The solution is \[ \frac {y^{2}}{2}-c_{1} \ln \left (-\cot \left (x \right )+\csc \left (x \right )\right )-x -c_{2} = 0 \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} \frac {y^{2}}{2}-c_{1} \ln \left (-\cot \left (x \right )+\csc \left (x \right )\right )-x -c_{2} &= 0 \\ \end{align*}

Verification of solutions

\[ \frac {y^{2}}{2}-c_{1} \ln \left (-\cot \left (x \right )+\csc \left (x \right )\right )-x -c_{2} = 0 \] Verified OK.

2.51.2 Solving as type second_order_integrable_as_is (not using ABC version)

Writing the ode as \[ y y^{\prime \prime } \sin \left (x \right )+\left (y^{\prime } \sin \left (x \right )+y \cos \left (x \right )\right ) y^{\prime } = \cos \left (x \right ) \] Integrating both sides of the ODE w.r.t \(x\) gives \begin {align*} \int \left (y y^{\prime \prime } \sin \left (x \right )+\left (y^{\prime } \sin \left (x \right )+y \cos \left (x \right )\right ) y^{\prime }\right )d x &= \int \cos \left (x \right )d x\\ y y^{\prime } \sin \left (x \right ) = \sin \left (x \right ) +c_{1} \end {align*}

Which is now solved for \(y\). In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= f( x) g(y)\\ &= \frac {\sin \left (x \right )+c_{1}}{y \sin \left (x \right )} \end {align*}

Where \(f(x)=\frac {\sin \left (x \right )+c_{1}}{\sin \left (x \right )}\) and \(g(y)=\frac {1}{y}\). Integrating both sides gives \begin{align*} \frac {1}{\frac {1}{y}} \,dy &= \frac {\sin \left (x \right )+c_{1}}{\sin \left (x \right )} \,d x \\ \int { \frac {1}{\frac {1}{y}} \,dy} &= \int {\frac {\sin \left (x \right )+c_{1}}{\sin \left (x \right )} \,d x} \\ \frac {y^{2}}{2}&=c_{1} \ln \left (-\cot \left (x \right )+\csc \left (x \right )\right )+x +c_{2} \\ \end{align*} The solution is \[ \frac {y^{2}}{2}-c_{1} \ln \left (-\cot \left (x \right )+\csc \left (x \right )\right )-x -c_{2} = 0 \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} \frac {y^{2}}{2}-c_{1} \ln \left (-\cot \left (x \right )+\csc \left (x \right )\right )-x -c_{2} &= 0 \\ \end{align*}

Verification of solutions

\[ \frac {y^{2}}{2}-c_{1} \ln \left (-\cot \left (x \right )+\csc \left (x \right )\right )-x -c_{2} = 0 \] Verified OK.

Maple trace Kovacic algorithm successful

`Methods for second order ODEs: 
--- Trying classification methods --- 
trying 2nd order Liouville 
trying 2nd order WeierstrassP 
trying 2nd order JacobiSN 
differential order: 2; trying a linearization to 3rd order 
trying 2nd order ODE linearizable_by_differentiation 
trying 2nd order, 2 integrating factors of the form mu(x,y) 
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 quadrature 
   checking if the LODE has constant coefficients 
   checking if the LODE is of Euler type 
   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 
      Reducible group (found an exponential solution) 
      Group is reducible, not completely reducible 
   <- Kovacics algorithm successful 
   Change of variables used: 
      [x = 1/2*arccos(t)] 
   Linear ODE actually solved: 
      u(t)+(t^2-2*t+1)*diff(u(t),t)+(2*t^3-2*t^2-2*t+2)*diff(diff(u(t),t),t) = 0 
<- change of variables successful 
`, `-> Computing symmetries using: way = HINT 
<- 2nd order, 2 integrating factors of the form mu(x,y) successful`
 

Solution by Maple

Time used: 0.282 (sec). Leaf size: 898

dsolve(y(x)*diff(y(x),x$2)*sin(x)+ ( diff(y(x),x)*sin(x)+y(x)*cos(x) )*diff(y(x),x)=cos(x),y(x), singsol=all)
 

\begin{align*} y \left (x \right ) &= -\frac {\sqrt {12}\, \sqrt {\left (-{\mathrm e}^{2 i x}+1\right )^{3} \left (-\frac {i}{3}+\frac {{\mathrm e}^{3 i x} \pi \left (\operatorname {csgn}\left (i {\mathrm e}^{-i x}\right ) \operatorname {csgn}\left (i \left ({\mathrm e}^{i x}-1\right )^{2}\right )-1\right ) \operatorname {csgn}\left (i {\mathrm e}^{-i x} \left ({\mathrm e}^{i x}-1\right )^{2}\right )}{2}-\frac {{\mathrm e}^{3 i x} \pi \left (\operatorname {csgn}\left (i {\mathrm e}^{-i x}\right ) \operatorname {csgn}\left (i \left ({\mathrm e}^{i x}+1\right )^{2}\right )+1\right ) \operatorname {csgn}\left (i {\mathrm e}^{-i x} \left ({\mathrm e}^{i x}+1\right )^{2}\right )}{2}+\frac {{\mathrm e}^{3 i x} \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{i x}-1\right )^{2}\right )}{2}-\frac {{\mathrm e}^{3 i x} \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{i x}+1\right )^{2}\right )}{2}+6 \left (1-{\mathrm e}^{6 i x}+3 \,{\mathrm e}^{4 i x}-3 \,{\mathrm e}^{2 i x}\right ) \left (\int \cos \left (x \right ) \cot \left (x \right )^{4} \operatorname {arctanh}\left (\cos \left (x \right )\right )d x \right )+\frac {21 \left (1-{\mathrm e}^{6 i x}+3 \,{\mathrm e}^{4 i x}-3 \,{\mathrm e}^{2 i x}\right ) \left (\int \cot \left (x \right ) \csc \left (x \right )^{3} \operatorname {arctanh}\left (\cos \left (x \right )\right )d x \right )}{4}+12 \left (-1+{\mathrm e}^{6 i x}-3 \,{\mathrm e}^{4 i x}+3 \,{\mathrm e}^{2 i x}\right ) \left (\int \cot \left (x \right )^{3} \csc \left (x \right ) \operatorname {arctanh}\left (\cos \left (x \right )\right )d x \right )-{\mathrm e}^{3 i x} \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{i x}-1\right )\right )+{\mathrm e}^{3 i x} \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{i x}+1\right )\right )-2 i {\mathrm e}^{3 i x} \ln \left ({\mathrm e}^{i x}+1\right )+2 i {\mathrm e}^{3 i x} \ln \left ({\mathrm e}^{i x}-1\right )+{\mathrm e}^{2 i x} \left (i+18 \left (-c_{2} +\sin \left (x \right )\right ) \operatorname {arctanh}\left (\cos \left (x \right )\right )+18 c_{1} \right )+18 \left (\left (c_{2} -\sin \left (x \right )\right ) \operatorname {arctanh}\left (\cos \left (x \right )\right )-c_{1} \right ) {\mathrm e}^{4 i x}+6 \left (\left (-c_{2} +\sin \left (x \right )\right ) \operatorname {arctanh}\left (\cos \left (x \right )\right )+c_{1} \right ) {\mathrm e}^{6 i x}+6 \left (c_{2} -\sin \left (x \right )\right ) \operatorname {arctanh}\left (\cos \left (x \right )\right )-6 c_{1} \right )}}{-6+6 \,{\mathrm e}^{6 i x}-18 \,{\mathrm e}^{4 i x}+18 \,{\mathrm e}^{2 i x}} \\ y \left (x \right ) &= \frac {\sqrt {12}\, \sqrt {\left (-{\mathrm e}^{2 i x}+1\right )^{3} \left (-\frac {i}{3}+\frac {{\mathrm e}^{3 i x} \pi \left (\operatorname {csgn}\left (i {\mathrm e}^{-i x}\right ) \operatorname {csgn}\left (i \left ({\mathrm e}^{i x}-1\right )^{2}\right )-1\right ) \operatorname {csgn}\left (i {\mathrm e}^{-i x} \left ({\mathrm e}^{i x}-1\right )^{2}\right )}{2}-\frac {{\mathrm e}^{3 i x} \pi \left (\operatorname {csgn}\left (i {\mathrm e}^{-i x}\right ) \operatorname {csgn}\left (i \left ({\mathrm e}^{i x}+1\right )^{2}\right )+1\right ) \operatorname {csgn}\left (i {\mathrm e}^{-i x} \left ({\mathrm e}^{i x}+1\right )^{2}\right )}{2}+\frac {{\mathrm e}^{3 i x} \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{i x}-1\right )^{2}\right )}{2}-\frac {{\mathrm e}^{3 i x} \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{i x}+1\right )^{2}\right )}{2}+6 \left (1-{\mathrm e}^{6 i x}+3 \,{\mathrm e}^{4 i x}-3 \,{\mathrm e}^{2 i x}\right ) \left (\int \cos \left (x \right ) \cot \left (x \right )^{4} \operatorname {arctanh}\left (\cos \left (x \right )\right )d x \right )+\frac {21 \left (1-{\mathrm e}^{6 i x}+3 \,{\mathrm e}^{4 i x}-3 \,{\mathrm e}^{2 i x}\right ) \left (\int \cot \left (x \right ) \csc \left (x \right )^{3} \operatorname {arctanh}\left (\cos \left (x \right )\right )d x \right )}{4}+12 \left (-1+{\mathrm e}^{6 i x}-3 \,{\mathrm e}^{4 i x}+3 \,{\mathrm e}^{2 i x}\right ) \left (\int \cot \left (x \right )^{3} \csc \left (x \right ) \operatorname {arctanh}\left (\cos \left (x \right )\right )d x \right )-{\mathrm e}^{3 i x} \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{i x}-1\right )\right )+{\mathrm e}^{3 i x} \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{i x}+1\right )\right )-2 i {\mathrm e}^{3 i x} \ln \left ({\mathrm e}^{i x}+1\right )+2 i {\mathrm e}^{3 i x} \ln \left ({\mathrm e}^{i x}-1\right )+{\mathrm e}^{2 i x} \left (i+18 \left (-c_{2} +\sin \left (x \right )\right ) \operatorname {arctanh}\left (\cos \left (x \right )\right )+18 c_{1} \right )+18 \left (\left (c_{2} -\sin \left (x \right )\right ) \operatorname {arctanh}\left (\cos \left (x \right )\right )-c_{1} \right ) {\mathrm e}^{4 i x}+6 \left (\left (-c_{2} +\sin \left (x \right )\right ) \operatorname {arctanh}\left (\cos \left (x \right )\right )+c_{1} \right ) {\mathrm e}^{6 i x}+6 \left (c_{2} -\sin \left (x \right )\right ) \operatorname {arctanh}\left (\cos \left (x \right )\right )-6 c_{1} \right )}}{-6+6 \,{\mathrm e}^{6 i x}-18 \,{\mathrm e}^{4 i x}+18 \,{\mathrm e}^{2 i x}} \\ \end{align*}

Solution by Mathematica

Time used: 0.159 (sec). Leaf size: 50

DSolve[y[x]*y''[x]*Sin[x]+ ( y'[x]*Sin[x]+y[x]*Cos[x] )*y'[x]==Cos[x],y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to -\sqrt {2} \sqrt {c_1 \text {arctanh}(\cos (x))+x+c_2} \\ y(x)\to \sqrt {2} \sqrt {c_1 \text {arctanh}(\cos (x))+x+c_2} \\ \end{align*}