1.6 problem 6

1.6.1 Solving as separable ode
1.6.2 Maple step by step solution

Internal problem ID [3151]
Internal file name [OUTPUT/2643_Sunday_June_05_2022_08_37_59_AM_34888727/index.tex]

Book: Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section: Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number: 6.
ODE order: 1.
ODE degree: 1.

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

Maple gives the following as the ode type

[_separable]

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

1.6.1 Solving as separable ode

In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= f( x) g(y)\\ &= -x \cos \left (y \right )^{2} \cot \left (y \right ) \end {align*}

Where \(f(x)=-x\) and \(g(y)=\cos \left (y \right )^{2} \cot \left (y \right )\). Integrating both sides gives \begin{align*} \frac {1}{\cos \left (y \right )^{2} \cot \left (y \right )} \,dy &= -x \,d x \\ \int { \frac {1}{\cos \left (y \right )^{2} \cot \left (y \right )} \,dy} &= \int {-x \,d x} \\ \frac {1}{2 \cot \left (y \right )^{2}}&=-\frac {x^{2}}{2}+c_{1} \\ \end{align*} Which results in \begin{align*} y &= \operatorname {arccot}\left (\frac {1}{\sqrt {-x^{2}+2 c_{1}}}\right ) \\ y &= \pi -\operatorname {arccot}\left (\frac {1}{\sqrt {-x^{2}+2 c_{1}}}\right ) \\ \end{align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \operatorname {arccot}\left (\frac {1}{\sqrt {-x^{2}+2 c_{1}}}\right ) \\ \tag{2} y &= \pi -\operatorname {arccot}\left (\frac {1}{\sqrt {-x^{2}+2 c_{1}}}\right ) \\ \end{align*}

Figure 6: Slope field plot

Verification of solutions

\[ y = \operatorname {arccot}\left (\frac {1}{\sqrt {-x^{2}+2 c_{1}}}\right ) \] Verified OK.

\[ y = \pi -\operatorname {arccot}\left (\frac {1}{\sqrt {-x^{2}+2 c_{1}}}\right ) \] Verified OK.

1.6.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & x \cos \left (y\right )^{2}+\tan \left (y\right ) y^{\prime }=0 \\ \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 \cos \left (y\right )^{2}}{\tan \left (y\right )} \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {y^{\prime } \tan \left (y\right )}{\cos \left (y\right )^{2}}=-x \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \frac {y^{\prime } \tan \left (y\right )}{\cos \left (y\right )^{2}}d x =\int -x d x +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \frac {\tan \left (y\right )^{2}}{2}=-\frac {x^{2}}{2}+c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & \left \{y=-\arctan \left (\sqrt {-x^{2}+2 c_{1}}\right ), y=\arctan \left (\sqrt {-x^{2}+2 c_{1}}\right )\right \} \end {array} \]

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
<- separable successful`
 

Solution by Maple

Time used: 0.0 (sec). Leaf size: 35

dsolve(x*cos(y(x))^2+tan(y(x))*diff(y(x),x)=0,y(x), singsol=all)
 

\begin{align*} y \left (x \right ) &= \operatorname {arccot}\left (\frac {1}{\sqrt {-x^{2}-2 c_{1}}}\right ) \\ y \left (x \right ) &= \frac {\pi }{2}+\arctan \left (\frac {1}{\sqrt {-x^{2}-2 c_{1}}}\right ) \\ \end{align*}

Solution by Mathematica

Time used: 1.202 (sec). Leaf size: 103

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

\begin{align*} y(x)\to -\sec ^{-1}\left (-\sqrt {-x^2+8 c_1}\right ) \\ y(x)\to \sec ^{-1}\left (-\sqrt {-x^2+8 c_1}\right ) \\ y(x)\to -\sec ^{-1}\left (\sqrt {-x^2+8 c_1}\right ) \\ y(x)\to \sec ^{-1}\left (\sqrt {-x^2+8 c_1}\right ) \\ y(x)\to -\frac {\pi }{2} \\ y(x)\to \frac {\pi }{2} \\ \end{align*}