# Solving Differential Equations with Substitutions

We will now look at another type of first order differential equation that can be readily solved using a simple substitution. Consider the following differential equation:

(1)

Now divide both sides of the equation by $x^2$ (provided that $x \neq 0$ to get:

(2)

We can write this differential equation as $y’ = F\left ( \frac{y}{x} \right )$. Let $v(x) = \frac{y}{x}$ and so $y’ = F(v)$. Now since $v = \frac{y}{x}$ we also have that $y = xv$. If we differentiate this function with respect to $x$ using the product rule and implicit differentiation, we get that $y’ = v + xv’$ and hence:

(3)

Thus, using the substitution $v = \frac{y}{x}$ allows us to write the original differential equation as a separable differential equation. Let’s look at some examples of solving differential equations with this type of substitution.

## Example 1

**Solve the differential equation $y’ = \frac{x^2 + y^2}{xy}$.**

We first rewrite this differential equation in the form $y = F \left ( \frac{y}{x} \right )$. Simplifying the differential equation above and we have that:

(4)

Let $v = \frac{y}{x}$. Then $y = vx$ and $y’ = v + xv’$ and thus we can use these substitutions in our differential equation above to get that:

(5)

## Example 2

**Solve the differential equation $y’ = \frac{x – y}{x + y}$.**

We first rewrite this differential equation by diving all terms on the righthand side by $x$ to get:

(6)

Let $v = \frac{y}{x}$. Then of course $y = vx$ and $y’ = v + xv’$ and so:

(7)

Thus we have that:

(8)

To evaluate the integral on the lefthand side we can use integration by parts. Let $u = 1 – 2v – v^2$. Then $du = -2 – 2v = -2(1 + v) \: dv$ and $\frac{-1}{2} du = (1 + v) \: dv$. Making this substitution and we get that:

(9)

We can turn the constant $C$ into a new constant, $\ln \mid K \mid$ to get that:

(10)