# How do you find all solutions of the differential equation dy/dx=B+ky?

Feb 27, 2017

$y = \frac{C {e}^{k x} - B}{k}$

#### Explanation:

We have to first separate the variables, treating $\frac{\mathrm{dy}}{\mathrm{dx}}$ as division and getting all $y$ terms on one side and all $x$ terms on the other.

First, we see that there are no $x$ terms other than $\mathrm{dx}$, so this will need to be on a side unto itself.

Further, we can't subtract $k y$ to get $\mathrm{dy}$ and $k y$ on the same side: it doesn't deal with the issues of multiplying later by $\mathrm{dx}$ and $\mathrm{dy}$ must be attached to all other $y$ terms by multiplication.

So, what we can do is divide both sides by $B + k y$ entirely. If we also multiply by $\mathrm{dx}$, this should give us:

$\frac{\mathrm{dy}}{\mathrm{dx}} = B + k y$

$\frac{\mathrm{dy}}{B + k y} = \mathrm{dx}$

We then integrate:

$\int \frac{\mathrm{dy}}{B + k y} = \int \mathrm{dx}$

The left-hand integral can either be solved using the substitution $u = B + k y$ or just by inspection. Remember $B$ and $k$ are constants (we'll also add a constant of integration).

$\frac{1}{k} \int \frac{\left(k\right) \mathrm{dy}}{B + k y} = x + C$

$\frac{1}{k} \ln \left\mid B + k y \right\mid = x + C$

Multiply both sides by $k$. Even though $C$ changes, we'll leave it as $C$ since it's a catch-all for any constant.

$\ln \left\mid B + k y \right\mid = k x + C$

$\left\mid B + k y \right\mid = {e}^{k x + C}$

Note that ${e}^{k x + C} = {e}^{k x} {e}^{C} = C {e}^{k x}$ where $C$ again represents ${e}^{C}$, some other constant.

$\left\mid B + k y \right\mid = C {e}^{k x}$

The absolute value bars are just a reminder that it's possible that $B + k y < 0$.

$k y = C {e}^{k x} - B$

$y = \frac{C {e}^{k x} - B}{k}$