Solving Separable Differential Equations Examples 2

Solving Separable Differential Equations Examples 2

Recall from the Solving Separable Differential Equations page that if we have a separable differential equation $M(x) + N(y) \frac{dy}{dx} = 0$, then we can rewrite it as:

(1)
\begin{align} \quad \int N(y) \: dy = \int - M(x) \: dx \end{align}

Provided that these integrals can be evaluated and that they're not too difficult to do so, then we can obtain solutions for the separable differential equation.

We will now look at some examples of solving separable differential equations. At this present time, we will not be concerned as to whether these solutions are always valid for all of $\mathbb{R}$. In fact, many of the solutions we present are only defined on a specific interval. We will look more into this later.

Example 1

Find all solutions to the differential equation $\frac{dy}{dx} = \frac{x - e^{-x}}{y + e^y}$.

We will first rewrite the differential equation above as $(y + e^y) \frac{dy}{dx} = (x - e^{-x})$. Therefore, provided $y + e^y \neq 0$ we have that:

(2)
\begin{align} \quad (y + e^y) \frac{dy}{dx} = (x - e^{-x}) \\ \quad (y + e^y) \: dy = (x - e^{-x}) \: dx \\ \quad \int (y + e^y) \: dy = \int (x - e^{-x}) \: dx \\ \quad \frac{y^2}{2} + e^y = \frac{x^2}{2} + e^{-x} + C \\ \quad y^2 + 2e^y = x^2 + 2e^{-x} + 2C \end{align}
Screen%20Shot%202015-01-17%20at%2012.38.53%20PM.png

Example 2

Find all solutions to the differential equation $\frac{dy}{dx} = (\cos ^2 x )(\cos ^2 2y)$.

We will first rewrite the differential equation above as $\frac{1}{\cos ^2 2y} \frac{dy}{dx} = (\cos ^2 x)$. Therefore we have that:

(3)
\begin{align} \quad \frac{1}{\cos ^2 2y} \frac{dy}{dx} = (\cos ^2 x) \\ \quad \frac{1}{\cos ^2 2y} \: dy = (\cos ^2 x) \: dx \\ \quad \int \frac{1}{\cos ^2 2y} \: dy = \int \cos ^2 x \: dx \\ \quad \int \sec ^2 (2y) \: dy = \int \cos ^2 x \: dx \end{align}

Note that $\int \sec^2 (2y) \: dy = \frac{\tan 2y}{2}$ and $\int \cos ^2 x \: dx = \frac{\cos x \sin x + x}{2}$ (which can be obtained by integration by parts). Therefore we have that:

(4)
\begin{align} \quad \int \sec ^2 (2y) \: dy = \int \cos ^2 x \: dx \\ \quad \frac{\tan 2y}{2} = \frac{\cos x \sin x + x}{2} + C \\ \quad \tan 2y = \cos x \sin x + x + 2C \\ \quad \tan 2y = \frac{\sin 2x}{2} + x + 2C \\ \quad 2\tan 2y = \sin 2x + 2x + 4C \end{align}

Note that if $k \in \mathbb{Z}$ then $y = \pm \frac{(2k + 1)\pi}{4}$ is also a solution to the differential equation.

Screen%20Shot%202015-01-17%20at%2012.35.09%20PM.png

Example 3

Find all solutions to the differential equation $\frac{dy}{dx} = \frac{x^2}{y(1+x^3)}$.

We will first rewrite this differential equation as $y \frac{dy}{dx} = \frac{x^2}{(1 + x^3)}$ and thus:

(5)
\begin{align} \quad y \frac{dy}{dx} = \frac{x^2}{1 + x^3} \\ \quad y \: dy = \frac{x^2}{1 + x^3} \: dx \\ \quad \int y \: dy = \int \frac{x^2}{1 + x^3} \: dx \end{align}

To evaluate the integral on the righthand side we will have to use substitution. Let $u = 1 + x^3$. Then $du = 3x^2 \: dx$ and hence $\frac{du}{3} = x^2 \: dx$ and so $\int \frac{x^2}{1 + x^3} \: dx = \frac{1}{3} \int \frac{1}{u} \: du = \frac{1}{3} \ln \mid u \mid = \frac{1}{3} \ln \mid 1 + x^3 \mid$, and so for some constant $C$, $x \neq -1$ and $y \neq 0$ we have that:

(6)
\begin{align} \quad \frac{y^2}{2} = \frac{1}{3} \ln \mid (1 + x^3)^{1/3} \mid + C \\ \quad 3y^2 = 2\ln \mid (1 + x^3)^{1/3} \mid + 6C \end{align}
Screen%20Shot%202015-01-17%20at%201.11.38%20PM.png
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License