Skip to main content
Logo image

Section 4.4 Additional Examples

The following problems go beyond the basics and require more advanced algebraic manipulations or integration techniques to solve. Each example will deepen your understanding of the separation of variables method (SOV) and its application to more complex differential equations.

Example 38.

\(\ \ \) Solve the differential equations using the SOV method.
A. \(\ \ds\frac{dy}{dx} = \frac{\cos x}{y} \)
Solution 1.
The equation is separable since it can be written as:
\begin{equation*} \ds \frac{dy}{dx} = \big( \cos x \big) \cdot \left( \frac{1}{y} \right). \end{equation*}
Now we apply the separation of variables method.
\begin{gather*} \knowl{./knowl/xref/sov-step-1.html}{\text{Step 1: Separate}} \vphantom{y\ dy = \cos(x)\ dx} \rightarrow\\ \knowl{./knowl/xref/sov-step-2.html}{\text{Step 2: Integrate}} \vphantom{\int y\ dy = \int \cos(x)\ dx} \rightarrow\\ \knowl{./knowl/xref/sov-step-3.html}{\text{Step 3: Isolate}} \vphantom{\frac{y^2}{2} + c_1 = \sin(x) + c_2} \rightarrow\\ \vphantom{y^2 = 2\sin(x) + 2c} \\ \vphantom{y = \pm\sqrt{2\sin(x) + c}} \end{gather*}
\begin{align*} y\ dy =\amp\ \cos(x)\ dx \\ \int y\ dy =\amp\ \int \cos(x)\ dx \\ \frac{y^2}{2} + c_1 =\amp\ \sin(x) + c_2 \\ \frac{y^2}{2} =\amp\ \sin(x) + \os{\large c}{\boxed{c_2-c_1}} \\ y^2 =\amp\ 2\sin(x) + 2c \\ y(x) =\amp\ \pm\sqrt{2\sin(x) + c} \text{.} \end{align*}
B. \(\ \ds y^2 y' - 1 = 6x^2 \)
Solution 2.
This differential equation is separable as it can be written as:
\begin{align*} y^2 y' - 1 =\amp\ 6x^2 \\ y' =\amp\ \frac{6x^2 + 1}{y^2} \\ \frac{dy}{dx} =\amp\ \big( 6x^2 + 1 \big)\cdot \left( \frac{1}{y^2} \right) \end{align*}
Therefore, we can apply the separation of variables method.
\begin{gather*} \knowl{./knowl/xref/sov-step-1.html}{\text{Step 1: Separate}} \vphantom{y\ dy = \cos(x)\ dx} \rightarrow\\ \knowl{./knowl/xref/sov-step-2.html}{\text{Step 2: Integrate}} \vphantom{\int y\ dy = \int \cos(x)\ dx} \rightarrow\\ \knowl{./knowl/xref/sov-step-3.html}{\text{Step 3: Isolate}} \vphantom{\frac{y^2}{2} + c_1 = \sin(x) + c_2} \rightarrow\\ \vphantom{y^2 = 2\sin(x) + 2c} \\ \vphantom{y = \pm\sqrt{2\sin(x) + c}} \end{gather*}
\begin{align*} y^2\ dy =\amp\ (6x^2+1)\ dx \\ \int y^2\ dy =\amp\ \int (6x^2+1)\ dx \\ \frac{y^3}{3} + c_1 =\amp\ 2x^3 + x + c_2 \\ \frac{y^3}{3} =\amp\ 2x^3 + x + \os{\large c}{\boxed{c_2-c_1}} \\ y^3 =\amp\ 6x^3 + 3x + 3c \\ y =\amp\ \sqrt[3]{6x^3 + 3x + c} \text{.} \end{align*}

Note 39. Common Pitfall: Don’t Split Square Roots!

In the first example, we found the general solution to
\begin{equation*} \frac{dy}{dx} = \frac{\cos x}{y} \end{equation*}
as \(y(x) = \pm\sqrt{2\sin(x) + c}\text{.}\) Some students are tempted to simplify this incorrectly, like so:
\begin{align*} y(x) =\amp\ \pm\sqrt{2\sin(x) + c} \\ y(x) =\amp\ \pm\sqrt{2\sin(x)} + \sqrt{c} \quad \leftarrow \text{Error} \\ y(x) =\amp\ \pm\sqrt{2\sin(x)} + c \quad \leftarrow \text{Incorrect} \end{align*}
The constant \(c\) must remain inside the square root, as this separation over addition or subtraction violates the square root’s mathematical properties.
The following problems introduce initial conditions, allowing you to solve for specific solutions using the SOV method.

Example 40.

\(\ \ \) Solve the initial-value problems using the SOV method.
A. \(\ \ds \frac{dy}{dx} = \frac{\cos x}{y}, \quad y(0) = -5 \)
Solution 1.
From previous example, the general solution is
\begin{equation*} y(x) = \pm\sqrt{2\sin(x) + c}. \end{equation*}
where the \(\pm\) sign means that the general solution includes both the positive and negative square roots. However, when finding a particular solution, only one applies. In this case, the initial condition \(y(0) = -5\) indicates that \(y\) is negative when \(x = 0\text{.}\) Therefore, the particular solution must come from the form containing the negative sign. Substituting the initial condition:
\begin{gather*} -5 = -\sqrt{2\sin(0) + c} = -\sqrt{0 + c} = -\sqrt{c} \\ 5 = \sqrt{c} \implies c = 25 \end{gather*}
Therefore, the solution to the initial-value problem is:
\begin{equation*} y(x) = -\sqrt{2\sin(x) + 25} \end{equation*}
B. \(\ \ds z' - 1 = z^2, \quad z(4) = 9\)
Solution 2.
This differential equation is first order and separable since
\begin{align*} z' - 1 =\amp\ z^2 \\ z' =\amp\ z^2 + 1 \\ z' =\amp\ \big( 1 \big) \big( z^2 + 1 \big) \end{align*}
Therefore, we can apply the separation of variables method.
\begin{gather*} \text{Separate} \vphantom{\frac{1}{z^2}} \rightarrow \\ \text{Integrate} \vphantom{\int\frac{1}{z^2}} \rightarrow \\ \text{Isolate} \vphantom{\arctan z} \rightarrow \\ \vphantom{\arctan z} \\ \text{General Solution} \vphantom{\os{\large c}{\boxed{c_2-c_1}}} \rightarrow \end{gather*}
\begin{align*} \frac{1}{z^2+1}dz =\amp\ 1dt \\ \int\frac{1}{z^2+1}\ dz =\amp\ \int 1\ dt \\ \arctan z + c_1 =\amp\ t + c_2 \\ \arctan z =\amp\ t + \os{\large c}{\boxed{c_2-c_1}} \\ z =\amp\ \tan(t+c) \text{.} \end{align*}
Substituting, \(z(4) = 9\text{,}\) into the general solution, we get
\begin{gather*} 9 = \tan(4+c) \\ \arctan(9) = 4+c \implies c = \arctan(9) - 4 \end{gather*}
Therefore, the solution to the intial-valued problem is
\begin{equation*} z = \tan(t+\arctan(9) - 4) \end{equation*}
In the previous examples, we were able to explicitly solve for the dependent variable in terms of the independent variable. However, in some cases, we may only be able to provide an implicit solution, as shown in the next example.

Example 41.

\(\ \ \) Solve the initial-value problem using the SOV method.
\begin{equation*} Q Q' + e^Q Q' = t, \quad Q(0) = 0 \end{equation*}
Solution.
Since all the \(Q\) terms are on the left and all the \(t\) terms are on the right, we can just factor out \(Q'\) on the left to separate the equation.
\begin{gather*} \text{Separate} \vphantom{\left(Q + e^Q\right)} \rightarrow \\ \text{Integrate} \vphantom{\int \left(Q + e^Q\right)} \rightarrow \\ \text{Isolate} \vphantom{\frac{1}{2}} \rightarrow \end{gather*}
\begin{align*} \left(Q + e^Q\right)dQ =\amp\ tdt \\ \int \left(Q + e^Q\right)dQ =\amp\ \int tdt \\ \frac12 Q^2 + e^Q =\amp\ \frac{1}{2}t^2 + c_1 \\ Q^2 + 2e^Q =\amp\ t^2 + \us{c}{\boxed{2c_1}} \end{align*}
So, the general solution is
\begin{equation*} Q^2 + 2e^Q = t^2 + c \text{.} \end{equation*}
Note that there is no nice way to find \(Q\) explicitly. In these cases, it is ok to leave the general solution in this implicit form. We can still find \(c\) using initial condition. Recall, that \(Q(0) = 0\) means that when \(t = 0\text{,}\) \(Q = 0\text{.}\) Substituting these values in, we get
\begin{gather*} 0^2 + 2e^0 = 0^2 + c \\ 2 = c \end{gather*}
Therefore, the solution to the initial-valued problem is
\begin{equation*} Q^2 + 2e^Q = t^2 + 2 \text{.} \end{equation*}
The final example highlights some of the subtle details of combining constants and dealing with absolute values that arise when solving differential equations.

Example 42.

\(\ \ \) Solve the differential equation using the SOV method.
\begin{equation*} x\frac{dy}{dx} + 10x^2y = 6x^2 \end{equation*}
Solution.
This differential equation is first order and separable since
\begin{align*} x\frac{dy}{dx} + 10x^2y =\amp\ 6x^2 \\ \frac{dy}{dx} =\amp\ \frac{6x^2}{x}\left(6x^2 - 10x^2y\right) \\ \frac{dy}{dx} =\amp\ 6x - 10xy = (2x)(3 - 5y) \end{align*}
Therefore, we can apply the separation of variables method.
\begin{gather*} \vphantom{\frac{1}{3 - 5y}dy} \\ \begin{array}{c}u = 3-5y,\\ du = -5dx\end{array} \ \ \rightarrow \\ \vphantom{\frac{1}{5}} \\ \vphantom{\ln|5y|} \\ \vphantom{ye^{5}} \\ \vphantom{ye^{5}} \\ c_2 = \pm e^{-5c_1} \vphantom{\boxed{\pm e^{-5c_1}}}\ \ \rightarrow \end{gather*}
\begin{align*} \frac{1}{3 - 5y}dy =\amp\ 2x\ dx \\ \int \frac{1}{3 - 5y}dy =\amp\ \int 2x\ dx \\ -\frac{1}{5}\ln|3 - 5y| =\amp\ x^2 + c_1 \\ \ln|3 - 5y| =\amp\ -5x^2 - 5c_1 \\ |3 - 5y| =\amp\ e^{-5x^2 - 5c_1} \\ 3 - 5y =\amp\ \pm e^{-5x^2 - 5c_1} \\ 3 - 5y =\amp\ \boxed{\pm e^{-5c_1}}e^{-5x^2} \\ 5y =\amp\ c_2 e^{-5x^2} + 3 \\ y =\amp\ \us{\large c}{\boxed{\frac{c_2}{5}}} e^{-5x^2} + \frac35 \text{.} \end{align*}
Finally, the general solution is
\begin{equation*} y = ce^{-5x^2} + \frac35 \end{equation*}
These examples demonstrate a range of techniques and complexities involved in solving separable differential equations. Depending on the form of the equation, the solution might be explicit or implicit, but the method of separation of variables remains a powerful tool for finding solutions to many types of differential equations.

Reading Questions Check your Understanding

1. What is the first step to solve \(y^2 y' - 1 = 6x^2\text{,}\) using the separation of variables method?

    In the equation \(y^2 y' - 1 = 6x^2\text{,}\) what is the first step to solve it using the separation of variables method?
  • Integrate both sides.
  • Incorrect. You need to separate the variables before integrating.
  • Isolate \(y\text{,}\) if possible.
  • Incorrect. You should first separate the variables.
  • Divide both sides by \(y^2\)
  • Incorrect. You should first separate the variables.
  • Show it is separable.
  • Correct! This rearrangement allows us to apply separation of variables.

2. Which of the following are valid ways to combine constants in a differential equation?

    Which of the following are valid ways to combine constants in a differential equation? Select ALL that apply.
  • \(\ds \vphantom{\frac{y^2}{2}} y = e^{2x + c_1} \ \rightarrow\ y = c_2 e^{2x}\ \) where \(\ c_2 = e^{c_1}\)
  • Correct!
  • \(\ds\frac{y^2}{2} = \sin(x) + c_1 \ \rightarrow\ y^2 = 2\sin(x) + c_2 \ \) where \(\ c_2 = 2c_1\)
  • Correct!
  • \(\ds \vphantom{\frac{y^2}{2}} y = \sqrt{2\sin(x) + c_1} \ \rightarrow\ y = \sqrt{2\sin(x)} + c_2 \ \) where \(\ c_2 = \sqrt{c_1}\)
  • Incorrect. \(\sqrt{A + B} \neq \sqrt{A} + \sqrt{B}\)
  • \(\ds \vphantom{\frac{y^2}{2}} y = \ln(3y + c_1) \ \rightarrow\ y = \ln(3y) + c_2 \ \) where \(\ c_2 = \ln(c_1)\)
  • Incorrect. \(\ln(A + B) \neq \ln(A) + \ln(B)\)
  • \(\ds \vphantom{\frac{y^2}{2}} \sqrt{y} = c_1e^{3x} \ \rightarrow\ y = c_2(e^{3x})^2 \ \) where \(\ c_2 = c_1^2\)
  • Correct!

3. Solve \(\ \ds \frac{dy}{dx} - y\cos(x) = y\ \) using separation of variables.

Complete each step below to solve the differential equation
\begin{equation*} \frac{dy}{dx} - y\cos(x) = y. \end{equation*}
Verify that the differential equation is separable.
order:
\(\phantom{.}\)
separable form: \(\displaystyle \frac{dy}{dx} =\) \(\Big(\)\(\Big)\) \(\Big(\)\(\Big)\)
\(f(x)\) \(g(y)\)
Separate and integrate. Give the integrals and antiderivatives.
\(\displaystyle\int\) \(dy\) \(=\) \(\displaystyle\int\) \(dx\)
\(+ c_1\) \(=\) \(+ c_2\)
Don’t forget the absolute value on the left antiderivative.
Isolate. Give the general solution. Use \(c\) for the combined constant.
\(y(x) =\)
You have attempted of activities on this page.