Solving Separable Differential Equations Examples 3

# Solving Separable Differential Equations Examples 3

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. In these examples, we will concern ourselves with determining the Interval of Validity, which is the largest interval for which our solution is valid that contains the initial condition given.

## Example 1

Solve the initial value problem $\frac{dy}{dx} = \frac{x(x^2 + 1)}{4y^3}$ where $y(0) = -\frac{1}{\sqrt{2}}$. Determine the interval of validity for this solution.

The differential equation above can be rewritten and solved as follows:

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

Since $y(0) = - \frac{1}{\sqrt{2}}$ we have that $\left ( - \frac{1}{\sqrt{2}} \right )^4 = C$ so $C = \frac{1}{4}$ and hence:

(3)
\begin{align} \quad y^4 = \frac{x^4}{4} + \frac{2x^2}{4} + \frac{1}{4} = \frac{x^4 + 2x + 1}{4} \end{align}

We now isolate $y$ by taking the fourth root of both sides (noting it will be negative since $y(0) < 0$) and simplifying:

(4)
\begin{align} y = - \left ( \frac{x^4 + 2x^2 + 1}{4} \right )^{1/4} = - \left ( \frac{(x^2 + 1)^2}{2^2} \right )^{1/4} = - \left ( \frac{x^2 + 1}{2} \right )^{1/2} \end{align}

We note that this solution is valid provided that $y \neq 0$ (so that the denominator of the differential equation is nonzero) and $\frac{x^2 + 1}{2} ≥ 0$ (so that we don't have the square root of a negative number). We see that $\frac{x^2 + 1}{2} ≥ \frac{1}{2} > 0$ for all $x \in \mathbb{R}$ and so $y = - \sqrt{\frac{x^2 + 1}{2}} \neq 0$.

Therefore our solution is valid for all $x \in \mathbb{R}$.

## Example 2

Solve the initial value problem $\frac{dy}{dx} = -\frac{x}{y - 3}$ where $y(0) = 1$. Determine the interval of validity for this solution.

This differential equation can be rewritten and solved for as follows:

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

Now since $y(0) = 1$ we have that $\frac{1}{2} - 3 = C$ so $C = -\frac{5}{2}$. Therefore:

(6)
\begin{align} \quad \frac{y^2}{2} - 3y = -\frac{x^2}{2} - \frac{5}{2} \\ \quad y^2 - 6y = -x^2 - 5 \\ \end{align}

To isolate for $y$ explicitly, we will complete the square on the lefthand side of the equation.

(7)
\begin{align} \quad y^2 - 6y + 9 = -x^2 - 5 + 9 \\ \quad (y - 3)^2 = 4 - x^2 \\ \quad y - 3 = \pm \sqrt{4 - x^2} \\ \quad y = 3 + \pm \sqrt{4 - x^2} \end{align}

We note that $-2 ≤ x ≤ 2$ so that the square root above is not negative, and so $2 ≥ \sqrt{4 - x^2} ≥ 0$. So to achieve the initial condition $y(0) = 1$ we must have that $y = 3 - \sqrt{4 - x^2}$. So our interval of validity is $[-2, 2]$.

## Example 3

Solve the initial value problem $\frac{dy}{dx} = (1 - 2x)y^2$ where $y(0) = -\frac{1}{6}$. Determine the interval of validity for this solution.

This differential equation can be rewritten and solved for as follows:

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

Now since $y(0) = -\frac{1}{6}$ we have that $C = 6$ and so:

(9)
\begin{align} \quad -\frac{1}{y} = x - x^2 + 6 \\ \quad \frac{1}{y} = x^2 - x - 6 \\ \quad y = \frac{1}{x^2 - x - 6} = \frac{1}{(x + 2)(x - 3)} \end{align}

To prevent the denominator from equalling zero in our solution, we have that $x \neq -2$ and $x \neq 3$. Note that $x = 0$ provides out initial value $y(0) = -\frac{1}{6}$ and so our interval of validity must contain $x = 0$ so $(-2, 3)$ is our interval of validity.