2.2.1 Problem 4 (a)
Internal
problem
ID
[19711]
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
24.
Problems
at
page
62
Problem
number
:
4
(a)
Date
solved
:
Friday, November 28, 2025 at 06:29:39 PM
CAS
classification
:
[_separable]
Solved using first_order_ode_separable
Time used: 0.288 (sec)
Solve
\begin{align*}
\sin \left (x \right ) \cos \left (y\right )^{2}+y^{\prime } \cos \left (x \right )^{2}&=0 \\
\end{align*}
The ode
\begin{equation}
y^{\prime } = -\frac {\sin \left (x \right ) \cos \left (y\right )^{2}}{\cos \left (x \right )^{2}}
\end{equation}
is separable as it can be written as
\begin{align*} y^{\prime }&= -\frac {\sin \left (x \right ) \cos \left (y\right )^{2}}{\cos \left (x \right )^{2}}\\ &= f(x) g(y) \end{align*}
Where
\begin{align*} f(x) &= -\frac {\sin \left (x \right )}{\cos \left (x \right )^{2}}\\ g(y) &= \cos \left (y \right )^{2} \end{align*}
Integrating gives
\begin{align*}
\int { \frac {1}{g(y)} \,dy} &= \int { f(x) \,dx} \\
\int { \frac {1}{\cos \left (y \right )^{2}}\,dy} &= \int { -\frac {\sin \left (x \right )}{\cos \left (x \right )^{2}} \,dx} \\
\end{align*}
\[
\tan \left (y\right )=-\sec \left (x \right )+c_1
\]
We now need to find the singular solutions, these are found by finding
for what values
\(g(y)\) is zero, since we had to divide by this above. Solving
\(g(y)=0\) or
\[
\cos \left (y \right )^{2}=0
\]
for
\(y\) gives
\begin{align*} y&=\frac {\pi }{2} \end{align*}
Now we go over each such singular solution and check if it verifies the ode itself and any initial
conditions given. If it does not then the singular solution will not be used.
Therefore the solutions found are
\begin{align*}
\tan \left (y\right ) &= -\sec \left (x \right )+c_1 \\
y &= \frac {\pi }{2} \\
\end{align*}
Solving for
\(y\) gives
\begin{align*}
y &= \frac {\pi }{2} \\
y &= \arctan \left (-\sec \left (x \right )+c_1 \right ) \\
\end{align*}
Figure 2.17: Slope field \(\sin \left (x \right ) \cos \left (y\right )^{2}+y^{\prime } \cos \left (x \right )^{2} = 0\)
Summary of solutions found
\begin{align*}
y &= \frac {\pi }{2} \\
y &= \arctan \left (-\sec \left (x \right )+c_1 \right ) \\
\end{align*}
✓ Maple. Time used: 0.005 (sec). Leaf size: 11
ode := sin ( x )* cos ( y ( x ))^2+ cos ( x )^2* diff ( y ( x ), x ) = 0;
dsolve ( ode , y ( x ), singsol=all);
\[
y = -\arctan \left (\sec \left (x \right )+c_1 \right )
\]
Maple trace
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
trying Bernoulli
trying separable
<- separable successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \sin \left (x \right ) \cos \left (y \left (x \right )\right )^{2}+\cos \left (x \right )^{2} \left (\frac {d}{d x}y \left (x \right )\right )=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=-\frac {\sin \left (x \right ) \cos \left (y \left (x \right )\right )^{2}}{\cos \left (x \right )^{2}} \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {\frac {d}{d x}y \left (x \right )}{\cos \left (y \left (x \right )\right )^{2}}=-\frac {\sin \left (x \right )}{\cos \left (x \right )^{2}} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \frac {\frac {d}{d x}y \left (x \right )}{\cos \left (y \left (x \right )\right )^{2}}d x =\int -\frac {\sin \left (x \right )}{\cos \left (x \right )^{2}}d x +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \tan \left (y \left (x \right )\right )=-\frac {1}{\cos \left (x \right )}+\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \left (x \right ) \\ {} & {} & y \left (x \right )=\arctan \left (\frac {\mathit {C1} \cos \left (x \right )-1}{\cos \left (x \right )}\right ) \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y \left (x \right )=\arctan \left (\mathit {C1} -\sec \left (x \right )\right ) \end {array} \]
✓ Mathematica. Time used: 1.029 (sec). Leaf size: 31
ode = Sin [ x ]* Cos [ y [ x ]]^2+ Cos[x]^2*D[y[x],x]==0;
ic ={};
DSolve [{ ode , ic }, y [ x ], x , IncludeSingularSolutions -> True ]
\begin{align*} y(x)&\to \arctan (-\sec (x)+c_1)\\ y(x)&\to -\frac {\pi }{2}\\ y(x)&\to \frac {\pi }{2} \end{align*}
✗ Sympy
from sympy import *
x = symbols("x")
y = Function("y")
ode = Eq(sin(x)*cos(y(x))**2 + cos(x)**2*Derivative(y(x), x),0)
ics = {}
dsolve ( ode , func = y ( x ), ics = ics )
Timed Out