2.5.9 Problem 3.3 (a)
Internal
problem
ID
[21980]
Book
:
Schaums
outline
series.
Differential
Equations
By
Richard
Bronson.
1973.
McGraw-Hill
Inc.
ISBN
0-07-008009-7
Section
:
Chapter
3.
Classification
of
first-order
differential
equations.
Solved
problems.
Page
11
Problem
number
:
3.3
(a)
Date
solved
:
Friday, December 12, 2025 at 12:54:44 AM
CAS
classification
:
[_separable]
2.5.9.1 Solved using first_order_ode_separable
0.104 (sec)
Entering first order ode separable solver
\begin{align*}
\sin \left (x \right )+y^{2} y^{\prime }&=0 \\
\end{align*}
The ode \begin{equation}
y^{\prime } = -\frac {\sin \left (x \right )}{y^{2}}
\end{equation}
is separable as it can be written as
\begin{align*} y^{\prime }&= -\frac {\sin \left (x \right )}{y^{2}}\\ &= f(x) g(y) \end{align*}
Where
\begin{align*} f(x) &= -\sin \left (x \right )\\ g(y) &= \frac {1}{y^{2}} \end{align*}
Integrating gives
\begin{align*}
\int { \frac {1}{g(y)} \,dy} &= \int { f(x) \,dx} \\
\int { y^{2}\,dy} &= \int { -\sin \left (x \right ) \,dx} \\
\end{align*}
\[
\frac {y^{3}}{3}=\cos \left (x \right )+c_1
\]
Figure 2.49: Slope field \(\sin \left (x \right )+y^{2} y^{\prime } = 0\)
Summary of solutions found
\begin{align*}
\frac {y^{3}}{3} &= \cos \left (x \right )+c_1 \\
\end{align*}
2.5.9.2 Solved using first_order_ode_bernoulli
0.191 (sec)
Entering first order ode bernoulli solver
\begin{align*}
\sin \left (x \right )+y^{2} y^{\prime }&=0 \\
\end{align*}
In canonical form, the ODE is
\begin{align*} y' &= F(x,y)\\ &= -\frac {\sin \left (x \right )}{y^{2}} \end{align*}
This is a Bernoulli ODE.
\[ y' = \left (-\sin \left (x \right )\right ) \frac {1}{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 &=0\\ f_1 &=-\sin \left (x \right ) \end{align*}
The first step is to divide the above equation by \(y^n \) which gives
\[ \frac {y'}{y^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)&=0\\ f_1(x)&=-\sin \left (x \right )\\ n &=-2 \end{align*}
Dividing both sides of ODE (1) by \(y^n=\frac {1}{y^{2}}\) gives
\begin{align*} y'y^{2} &= 0 -\sin \left (x \right ) \tag {4} \end{align*}
Let
\begin{align*} v &= y^{1-n} \\ &= y^{3} \tag {5} \end{align*}
Taking derivative of equation (5) w.r.t \(x\) gives
\begin{align*} v' &= 3 y^{2}y' \tag {6} \end{align*}
Substituting equations (5) and (6) into equation (4) gives
\begin{align*} \frac {v^{\prime }\left (x \right )}{3}&= -\sin \left (x \right )\\ v' &= -3 \sin \left (x \right ) \tag {7} \end{align*}
The above now is a linear ODE in \(v \left (x \right )\) which is now solved.
Since the ode has the form \(v^{\prime }\left (x \right )=f(x)\) , then we only need to integrate \(f(x)\) .
\begin{align*} \int {dv} &= \int {-3 \sin \left (x \right )\, dx}\\ v \left (x \right ) &= 3 \cos \left (x \right ) + c_1 \end{align*}
The substitution \(v = y^{1-n}\) is now used to convert the above solution back to \(y\) which results in
\[
y^{3} = 3 \cos \left (x \right )+c_1
\]
Figure 2.50: Slope field \(\sin \left (x \right )+y^{2} y^{\prime } = 0\)
Summary of solutions found
\begin{align*}
y^{3} &= 3 \cos \left (x \right )+c_1 \\
\end{align*}
2.5.9.3 Solved using first_order_ode_exact
0.072 (sec)
Entering first order ode exact solver
\begin{align*}
\sin \left (x \right )+y^{2} y^{\prime }&=0 \\
\end{align*}
To solve an ode of the form
\begin{equation} M\left ( x,y\right ) +N\left ( x,y\right ) \frac {dy}{dx}=0\tag {A}\end{equation}
We assume there exists a function \(\phi \left ( x,y\right ) =c\) where \(c\) is constant, that
satisfies the ode. Taking derivative of \(\phi \) w.r.t. \(x\) gives \[ \frac {d}{dx}\phi \left ( x,y\right ) =0 \]
Hence \begin{equation} \frac {\partial \phi }{\partial x}+\frac {\partial \phi }{\partial y}\frac {dy}{dx}=0\tag {B}\end{equation}
Comparing (A,B) shows
that \begin{align*} \frac {\partial \phi }{\partial x} & =M\\ \frac {\partial \phi }{\partial y} & =N \end{align*}
But since \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) then for the above to be valid, we require that
\[ \frac {\partial M}{\partial y}=\frac {\partial N}{\partial x}\]
If the above condition is satisfied, then
the original ode is called exact. We still need to determine \(\phi \left ( x,y\right ) \) but at least we know now that we can
do that since the condition \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) is satisfied. If this condition is not satisfied then this method will not
work and we have to now look for an integrating factor to force this condition, which might or
might not exist. The first step is to write the ODE in standard form to check for exactness, which
is \[ M(x,y) \mathop {\mathrm {d}x}+ N(x,y) \mathop {\mathrm {d}y}=0 \tag {1A} \]
Therefore \begin{align*} \left (y^{2}\right )\mathop {\mathrm {d}y} &= \left (-\sin \left (x \right )\right )\mathop {\mathrm {d}x}\\ \left (\sin \left (x \right )\right )\mathop {\mathrm {d}x} + \left (y^{2}\right )\mathop {\mathrm {d}y} &= 0 \tag {2A} \end{align*}
Comparing (1A) and (2A) shows that
\begin{align*} M(x,y) &= \sin \left (x \right )\\ N(x,y) &= y^{2} \end{align*}
The next step is to determine if the ODE is is exact or not. The ODE is exact when the following
condition is satisfied
\[ \frac {\partial M}{\partial y} = \frac {\partial N}{\partial x} \]
Using result found above gives \begin{align*} \frac {\partial M}{\partial y} &= \frac {\partial }{\partial y} \left (\sin \left (x \right )\right )\\ &= 0 \end{align*}
And
\begin{align*} \frac {\partial N}{\partial x} &= \frac {\partial }{\partial x} \left (y^{2}\right )\\ &= 0 \end{align*}
Since \(\frac {\partial M}{\partial y}= \frac {\partial N}{\partial x}\) , then the ODE is exact The following equations are now set up to solve for the function \(\phi \left (x,y\right )\)
\begin{align*} \frac {\partial \phi }{\partial x } &= M\tag {1} \\ \frac {\partial \phi }{\partial y } &= N\tag {2} \end{align*}
Integrating (1) w.r.t. \(x\) gives
\begin{align*}
\int \frac {\partial \phi }{\partial x} \mathop {\mathrm {d}x} &= \int M\mathop {\mathrm {d}x} \\
\int \frac {\partial \phi }{\partial x} \mathop {\mathrm {d}x} &= \int \sin \left (x \right )\mathop {\mathrm {d}x} \\
\tag{3} \phi &= -\cos \left (x \right )+ f(y) \\
\end{align*}
Where \(f(y)\) is used for the constant of integration since \(\phi \) is a function of
both \(x\) and \(y\) . Taking derivative of equation (3) w.r.t \(y\) gives \begin{equation}
\tag{4} \frac {\partial \phi }{\partial y} = 0+f'(y)
\end{equation}
But equation (2) says that \(\frac {\partial \phi }{\partial y} = y^{2}\) .
Therefore equation (4) becomes \begin{equation}
\tag{5} y^{2} = 0+f'(y)
\end{equation}
Solving equation (5) for \( f'(y)\) gives \[
f'(y) = y^{2}
\]
Integrating the above
w.r.t \(y\) gives \begin{align*}
\int f'(y) \mathop {\mathrm {d}y} &= \int \left ( y^{2}\right ) \mathop {\mathrm {d}y} \\
f(y) &= \frac {y^{3}}{3}+ c_1 \\
\end{align*}
Where \(c_1\) is constant of integration. Substituting result found above for \(f(y)\)
into equation (3) gives \(\phi \) \[
\phi = -\cos \left (x \right )+\frac {y^{3}}{3}+ c_1
\]
But since \(\phi \) itself is a constant function, then let \(\phi =c_2\) where \(c_2\) is
new constant and combining \(c_1\) and \(c_2\) constants into the constant \(c_1\) gives the solution as \[
c_1 = -\cos \left (x \right )+\frac {y^{3}}{3}
\]
Figure 2.51: Slope field \(\sin \left (x \right )+y^{2} y^{\prime } = 0\)
Summary of solutions found
\begin{align*}
\frac {y^{3}}{3}-\cos \left (x \right ) &= c_1 \\
\end{align*}
2.5.9.4 ✓ Maple. Time used: 0.003 (sec). Leaf size: 54
ode := sin ( x )+ y ( x )^2* diff ( y ( x ), x ) = 0;
dsolve ( ode , y ( x ), singsol=all);
\begin{align*}
y &= \left (3 \cos \left (x \right )+c_1 \right )^{{1}/{3}} \\
y &= -\frac {\left (3 \cos \left (x \right )+c_1 \right )^{{1}/{3}} \left (1+i \sqrt {3}\right )}{2} \\
y &= \frac {\left (3 \cos \left (x \right )+c_1 \right )^{{1}/{3}} \left (-1+i \sqrt {3}\right )}{2} \\
\end{align*}
Maple trace
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
trying Bernoulli
<- Bernoulli successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \sin \left (x \right )+y \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 {Separate variables}\hspace {3pt} \\ {} & {} & y \left (x \right )^{2} \left (\frac {d}{d x}y \left (x \right )\right )=-\sin \left (x \right ) \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int y \left (x \right )^{2} \left (\frac {d}{d x}y \left (x \right )\right )d x =\int -\sin \left (x \right )d x +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \frac {y \left (x \right )^{3}}{3}=\cos \left (x \right )+\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \left (x \right ) \\ {} & {} & \left \{y \left (x \right )=\left (3 \cos \left (x \right )+3 \mathit {C1} \right )^{{1}/{3}}, y \left (x \right )=-\frac {\left (3 \cos \left (x \right )+3 \mathit {C1} \right )^{{1}/{3}}}{2}-\frac {\mathrm {I} \sqrt {3}\, \left (3 \cos \left (x \right )+3 \mathit {C1} \right )^{{1}/{3}}}{2}, y \left (x \right )=-\frac {\left (3 \cos \left (x \right )+3 \mathit {C1} \right )^{{1}/{3}}}{2}+\frac {\mathrm {I} \sqrt {3}\, \left (3 \cos \left (x \right )+3 \mathit {C1} \right )^{{1}/{3}}}{2}\right \} \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & \left \{y \left (x \right )=\left (3 \cos \left (x \right )+3 \mathit {C1} \right )^{{1}/{3}}, y \left (x \right )=\frac {\left (3 \cos \left (x \right )+3 \mathit {C1} \right )^{{1}/{3}} \left (-1+\mathrm {I} \sqrt {3}\right )}{2}, y \left (x \right )=-\frac {\left (3 \cos \left (x \right )+3 \mathit {C1} \right )^{{1}/{3}} \left (1+\mathrm {I} \sqrt {3}\right )}{2}\right \} \\ \bullet & {} & \textrm {Redefine the integration constant(s)}\hspace {3pt} \\ {} & {} & \left \{y \left (x \right )=\left (3 \cos \left (x \right )+\mathit {C1} \right )^{{1}/{3}}, y \left (x \right )=\frac {\left (3 \cos \left (x \right )+\mathit {C1} \right )^{{1}/{3}} \left (-1+\mathrm {I} \sqrt {3}\right )}{2}, y \left (x \right )=-\frac {\left (3 \cos \left (x \right )+\mathit {C1} \right )^{{1}/{3}} \left (1+\mathrm {I} \sqrt {3}\right )}{2}\right \} \end {array} \]
2.5.9.5 ✓ Mathematica. Time used: 0.118 (sec). Leaf size: 64
ode = Sin [ x ]+ y [ x ]^2* D [ y [ x ], x ]==0;
ic ={};
DSolve [{ ode , ic }, y [ x ], x , IncludeSingularSolutions -> True ]
\begin{align*} y(x)&\to -\sqrt [3]{-3} \sqrt [3]{\cos (x)+c_1}\\ y(x)&\to \sqrt [3]{3} \sqrt [3]{\cos (x)+c_1}\\ y(x)&\to (-1)^{2/3} \sqrt [3]{3} \sqrt [3]{\cos (x)+c_1} \end{align*}
2.5.9.6 ✓ Sympy. Time used: 1.110 (sec). Leaf size: 61
from sympy import *
x = symbols("x")
y = Function("y")
ode = Eq(y(x)**2*Derivative(y(x), x) + sin(x),0)
ics = {}
dsolve ( ode , func = y ( x ), ics = ics )
\[
\left [ y{\left (x \right )} = \sqrt [3]{C_{1} + 3 \cos {\left (x \right )}}, \ y{\left (x \right )} = \frac {\left (- \sqrt [3]{3} - 3^{\frac {5}{6}} i\right ) \sqrt [3]{C_{1} + \cos {\left (x \right )}}}{2}, \ y{\left (x \right )} = \frac {\left (- \sqrt [3]{3} + 3^{\frac {5}{6}} i\right ) \sqrt [3]{C_{1} + \cos {\left (x \right )}}}{2}\right ]
\]