Seperation of Variables/Integrating Factor Method

1. Sep 15, 2014

_N3WTON_

1. The problem statement, all variables and given/known data
The first order linear equation of the form:
$\frac{dy}{dx} + ay = b$
where a and b are constants, can be solved both by the integrating factor method and by seperation of variables. Solve the equation using both methods to see that you get the same solution.

2. Relevant equations
Separation of variables and Integrating factor equations

3. The attempt at a solution
I am 80% sure that I have correctly found the solution using both methods; however, I am having trouble equating the two solutions. This is what I have done so far, first I will show using the integrating factor method, followed by separation of variables:
$p(x) = a$
$u(x) = e^{ax}$
$\frac{d}{dx}(e^{ax} y(x)) = be^{ax}$
$\int\frac{d}{dx}(e^{ax} y(x))\,dx = \int be^{ax}\, dx$
$e^{ax} y(x) = abe^{ax} + C$
$y(x) = ab + \frac{C}{e^ax}$
Now again using the separation of variables method:
$\frac{dy}{dx} = b-ay$
$\frac{dy}{y} = (b-a)dx$
$\int\frac{dy}{y} = \int b-a\, dx$
$ln(y) = bx - ax + C$
$y = e^{bx} - e^{ax} + e^C$

2. Sep 15, 2014

dirk_mec1

(b-ay)/y =b/y -a

3. Sep 15, 2014

Ray Vickson

Never write $1/e^{ax}$; always write it as $e^{-ax}$, because that way you can apply standard differentiation/integration formulas.

Your second method has an obvious blunder: from
$$\frac{dy}{dx} = b-ay$$
$$\frac{dy}{y} = (b-a)dx \: \longleftarrow \:\text{false}$$

4. Sep 15, 2014

_N3WTON_

im a little confused about what is wrong with the separation I performed?
Edit: Nvm I see it now, thank you

Last edited: Sep 15, 2014