1.63 problem 64

1.63.1 Solving as linear ode
1.63.2 Maple step by step solution

Internal problem ID [3208]
Internal file name [OUTPUT/2700_Sunday_June_05_2022_08_38_58_AM_75200012/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: 64.
ODE order: 1.
ODE degree: 1.

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

Maple gives the following as the ode type

[_linear]

\[ \boxed {y^{\prime }-3 y \tan \left (x \right )=1} \]

1.63.1 Solving as linear ode

Entering Linear first order ODE solver. In canonical form a linear first order is \begin {align*} y^{\prime } + p(x)y &= q(x) \end {align*}

Where here \begin {align*} p(x) &=-3 \tan \left (x \right )\\ q(x) &=1 \end {align*}

Hence the ode is \begin {align*} y^{\prime }-3 y \tan \left (x \right ) = 1 \end {align*}

The integrating factor \(\mu \) is \begin{align*} \mu &= {\mathrm e}^{\int -3 \tan \left (x \right )d x} \\ &= \cos \left (x \right )^{3} \\ \end{align*} The ode becomes \begin {align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \mu \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (\cos \left (x \right )^{3} y\right ) &= \cos \left (x \right )^{3}\\ \mathrm {d} \left (\cos \left (x \right )^{3} y\right ) &= \cos \left (x \right )^{3}\mathrm {d} x \end {align*}

Integrating gives \begin {align*} \cos \left (x \right )^{3} y &= \int {\cos \left (x \right )^{3}\,\mathrm {d} x}\\ \cos \left (x \right )^{3} y &= \frac {\left (2+\cos \left (x \right )^{2}\right ) \sin \left (x \right )}{3} + c_{1} \end {align*}

Dividing both sides by the integrating factor \(\mu =\cos \left (x \right )^{3}\) results in \begin {align*} y &= \frac {\sec \left (x \right )^{3} \left (2+\cos \left (x \right )^{2}\right ) \sin \left (x \right )}{3}+c_{1} \sec \left (x \right )^{3} \end {align*}

which simplifies to \begin {align*} y &= \frac {\tan \left (x \right )}{3}+\frac {2 \tan \left (x \right ) \sec \left (x \right )^{2}}{3}+c_{1} \sec \left (x \right )^{3} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {\tan \left (x \right )}{3}+\frac {2 \tan \left (x \right ) \sec \left (x \right )^{2}}{3}+c_{1} \sec \left (x \right )^{3} \\ \end{align*}

Figure 95: Slope field plot

Verification of solutions

\[ y = \frac {\tan \left (x \right )}{3}+\frac {2 \tan \left (x \right ) \sec \left (x \right )^{2}}{3}+c_{1} \sec \left (x \right )^{3} \] Verified OK.

1.63.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }-3 y \tan \left (x \right )=1 \\ \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 }=1+3 y \tan \left (x \right ) \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE}\hspace {3pt} \\ {} & {} & y^{\prime }-3 y \tan \left (x \right )=1 \\ \bullet & {} & \textrm {The ODE is linear; multiply by an integrating factor}\hspace {3pt} \mu \left (x \right ) \\ {} & {} & \mu \left (x \right ) \left (y^{\prime }-3 y \tan \left (x \right )\right )=\mu \left (x \right ) \\ \bullet & {} & \textrm {Assume the lhs of the ODE is the total derivative}\hspace {3pt} \frac {d}{d x}\left (y \mu \left (x \right )\right ) \\ {} & {} & \mu \left (x \right ) \left (y^{\prime }-3 y \tan \left (x \right )\right )=y^{\prime } \mu \left (x \right )+y \mu ^{\prime }\left (x \right ) \\ \bullet & {} & \textrm {Isolate}\hspace {3pt} \mu ^{\prime }\left (x \right ) \\ {} & {} & \mu ^{\prime }\left (x \right )=-3 \mu \left (x \right ) \tan \left (x \right ) \\ \bullet & {} & \textrm {Solve to find the integrating factor}\hspace {3pt} \\ {} & {} & \mu \left (x \right )=\cos \left (x \right )^{3} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \left (\frac {d}{d x}\left (y \mu \left (x \right )\right )\right )d x =\int \mu \left (x \right )d x +c_{1} \\ \bullet & {} & \textrm {Evaluate the integral on the lhs}\hspace {3pt} \\ {} & {} & y \mu \left (x \right )=\int \mu \left (x \right )d x +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=\frac {\int \mu \left (x \right )d x +c_{1}}{\mu \left (x \right )} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \mu \left (x \right )=\cos \left (x \right )^{3} \\ {} & {} & y=\frac {\int \cos \left (x \right )^{3}d x +c_{1}}{\cos \left (x \right )^{3}} \\ \bullet & {} & \textrm {Evaluate the integrals on the rhs}\hspace {3pt} \\ {} & {} & y=\frac {\frac {\left (2+\cos \left (x \right )^{2}\right ) \sin \left (x \right )}{3}+c_{1}}{\cos \left (x \right )^{3}} \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y=\frac {\tan \left (x \right )}{3}+\frac {2 \tan \left (x \right ) \sec \left (x \right )^{2}}{3}+c_{1} \sec \left (x \right )^{3} \end {array} \]

Maple trace

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

Solution by Maple

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

dsolve(diff(y(x),x)=1+3*y(x)*tan(x),y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {\tan \left (x \right )}{3}+\sec \left (x \right )^{3} c_{1} +\frac {2 \sec \left (x \right )^{2} \tan \left (x \right )}{3} \]

Solution by Mathematica

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

DSolve[y'[x]==1+3*y[x]*Tan[x],y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to \frac {1}{12} \sec ^3(x) (9 \sin (x)+\sin (3 x)+12 c_1) \]