2.4.7 problem 7
Internal
problem
ID
[18234]
Book
:
Elementary
Differential
Equations.
By
Thornton
C.
Fry.
D
Van
Nostrand.
NY.
First
Edition
(1929)
Section
:
Chapter
IV.
Methods
of
solution:
First
order
equations.
section
31.
Problems
at
page
85
Problem
number
:
7
Date
solved
:
Monday, December 23, 2024 at 09:17:15 PM
CAS
classification
:
[_Bernoulli]
Solve
\begin{align*} y-\cos \left (x \right ) y^{\prime }&=y^{2} \cos \left (x \right ) \left (1-\sin \left (x \right )\right ) \end{align*}
Solved as first order Bernoulli ode
Time used: 0.448 (sec)
In canonical form, the ODE is
\begin{align*} y' &= F(x,y)\\ &= \frac {y \left (y \cos \left (x \right ) \sin \left (x \right )-y \cos \left (x \right )+1\right )}{\cos \left (x \right )} \end{align*}
This is a Bernoulli ODE.
\[ y' = \left (\frac {1}{\cos \left (x \right )}\right ) y + \left (\frac {\cos \left (x \right ) \sin \left (x \right )-\cos \left (x \right )}{\cos \left (x \right )}\right )y^{2} \tag {1} \]
The standard Bernoulli ODE has the form
\[ y' = f_0(x)y+f_1(x)y^n \tag {2} \]
Comparing this to (1)
shows that
\begin{align*} f_0 &=\frac {1}{\cos \left (x \right )}\\ f_1 &=\frac {\cos \left (x \right ) \sin \left (x \right )-\cos \left (x \right )}{\cos \left (x \right )} \end{align*}
The first step is to divide the above equation by \(y^n \) which gives
\[ \frac {y'}{y^n} = f_0(x) y^{1-n} +f_1(x) \tag {3} \]
The next step is use the
substitution \(v = y^{1-n}\) in equation (3) which generates a new ODE in \(v \left (x \right )\) which will be linear and can be
easily solved using an integrating factor. Backsubstitution then gives the solution \(y(x)\) which is
what we want.
This method is now applied to the ODE at hand. Comparing the ODE (1) With (2) Shows
that
\begin{align*} f_0(x)&=\frac {1}{\cos \left (x \right )}\\ f_1(x)&=\frac {\cos \left (x \right ) \sin \left (x \right )-\cos \left (x \right )}{\cos \left (x \right )}\\ n &=2 \end{align*}
Dividing both sides of ODE (1) by \(y^n=y^{2}\) gives
\begin{align*} y'\frac {1}{y^{2}} &= \frac {1}{\cos \left (x \right ) y} +\frac {\cos \left (x \right ) \sin \left (x \right )-\cos \left (x \right )}{\cos \left (x \right )} \tag {4} \end{align*}
Let
\begin{align*} v &= y^{1-n} \\ &= \frac {1}{y} \tag {5} \end{align*}
Taking derivative of equation (5) w.r.t \(x\) gives
\begin{align*} v' &= -\frac {1}{y^{2}}y' \tag {6} \end{align*}
Substituting equations (5) and (6) into equation (4) gives
\begin{align*} -v^{\prime }\left (x \right )&= \frac {v \left (x \right )}{\cos \left (x \right )}+\frac {\cos \left (x \right ) \sin \left (x \right )-\cos \left (x \right )}{\cos \left (x \right )}\\ v' &= -\frac {v}{\cos \left (x \right )}-\frac {\cos \left (x \right ) \sin \left (x \right )-\cos \left (x \right )}{\cos \left (x \right )} \tag {7} \end{align*}
The above now is a linear ODE in \(v \left (x \right )\) which is now solved.
In canonical form a linear first order is
\begin{align*} v^{\prime }\left (x \right ) + q(x)v \left (x \right ) &= p(x) \end{align*}
Comparing the above to the given ode shows that
\begin{align*} q(x) &=\sec \left (x \right )\\ p(x) &=1-\sin \left (x \right ) \end{align*}
The integrating factor \(\mu \) is
\begin{align*} \mu &= e^{\int {q\,dx}}\\ &= {\mathrm e}^{\int \sec \left (x \right )d x}\\ &= \sec \left (x \right )+\tan \left (x \right ) \end{align*}
The ode becomes
\begin{align*}
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu v\right ) &= \mu p \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu v\right ) &= \left (\mu \right ) \left (1-\sin \left (x \right )\right ) \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (v \left (\sec \left (x \right )+\tan \left (x \right )\right )\right ) &= \left (\sec \left (x \right )+\tan \left (x \right )\right ) \left (1-\sin \left (x \right )\right ) \\
\mathrm {d} \left (v \left (\sec \left (x \right )+\tan \left (x \right )\right )\right ) &= \left (\left (1-\sin \left (x \right )\right ) \left (\sec \left (x \right )+\tan \left (x \right )\right )\right )\, \mathrm {d} x \\
\end{align*}
Integrating gives
\begin{align*} v \left (\sec \left (x \right )+\tan \left (x \right )\right )&= \int {\left (1-\sin \left (x \right )\right ) \left (\sec \left (x \right )+\tan \left (x \right )\right ) \,dx} \\ &=\sin \left (x \right ) + c_1 \end{align*}
Dividing throughout by the integrating factor \(\sec \left (x \right )+\tan \left (x \right )\) gives the final solution
\[ v \left (x \right ) = \frac {\left (\sin \left (x \right )+c_1 \right ) \left (\cos \left (x \right )-\sin \left (x \right )+1\right )}{\cos \left (x \right )+\sin \left (x \right )+1} \]
The substitution \(v = y^{1-n}\) is
now used to convert the above solution back to \(y\) which results in
\[
\frac {1}{y} = \frac {\left (\sin \left (x \right )+c_1 \right ) \left (\cos \left (x \right )-\sin \left (x \right )+1\right )}{\cos \left (x \right )+\sin \left (x \right )+1}
\]
Solving for \(y\) gives
\begin{align*}
y &= \frac {\cos \left (x \right )+\sin \left (x \right )+1}{\cos \left (x \right ) \sin \left (x \right )+\cos \left (x \right ) c_1 -\sin \left (x \right )^{2}-c_1 \sin \left (x \right )+\sin \left (x \right )+c_1} \\
\end{align*}
Figure 2.52: Slope field plot
\(y-\cos \left (x \right ) y^{\prime } = y^{2} \cos \left (x \right ) \left (1-\sin \left (x \right )\right )\)
Summary of solutions found
\begin{align*}
y &= \frac {\cos \left (x \right )+\sin \left (x \right )+1}{\cos \left (x \right ) \sin \left (x \right )+\cos \left (x \right ) c_1 -\sin \left (x \right )^{2}-c_1 \sin \left (x \right )+\sin \left (x \right )+c_1} \\
\end{align*}
Maple step by step solution
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y-\cos \left (x \right ) y^{\prime }=y^{2} \cos \left (x \right ) \left (1-\sin \left (x \right )\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 }=-\frac {-y+y^{2} \cos \left (x \right ) \left (1-\sin \left (x \right )\right )}{\cos \left (x \right )} \end {array} \]
Maple trace
` Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
trying Bernoulli
<- Bernoulli successful `
Maple dsolve solution
Solving time : 0.003
(sec)
Leaf size : 27
dsolve ( y ( x )- cos ( x )* diff ( y ( x ), x ) = y(x)^2* cos ( x )*(1- sin ( x )),
y(x),singsol=all)
\[
y = \frac {\cos \left (x \right )+\sin \left (x \right )+1}{\left (\sin \left (x \right )+c_1 \right ) \left (\cos \left (x \right )-\sin \left (x \right )+1\right )}
\]
Mathematica DSolve solution
Solving time : 0.372
(sec)
Leaf size : 41
DSolve [{ y [ x ]- Cos [ x ]* D [ y [ x ], x ]== y [ x ]^2* Cos [ x ]*(1- Sin [ x ]),{}},
y[x],x,IncludeSingularSolutions-> True ]
\begin{align*}
y(x)\to \frac {e^{2 \text {arctanh}\left (\tan \left (\frac {x}{2}\right )\right )}}{\cos (x) e^{2 \text {arctanh}\left (\tan \left (\frac {x}{2}\right )\right )}+c_1} \\
y(x)\to 0 \\
\end{align*}