# Differential Eqn by separation of variables.

I have the following differential equation:$$\frac{dx}{dt} = k(a-x)(b-x), 0 < a < b$$.

This is easy enough to solve using a partial fraction decomposition and using logs: I get to $$\left[-\frac{1}{b-a} \ln|a-x| + \frac{1}{a-b}\ln |b-x|\right]_0^x =kt,$$ which can be expressed as $$\frac{1}{a-b} \ln\left(|(a-x)(b-x)|\right) = kt$$ Manipulating this further gives $$|(a-x)(b-x)| = e^{(a-b)kt}$$ How would I isolate $x$ now to get an explicit function $x = x(t)?$

-
Your partial fraction decomposition is not correct. Check it again. –  Christopher A. Wong Jan 23 '13 at 19:55
You also didn't include your constant of integration, which is important toward the end. –  JohnD Jan 23 '13 at 20:04
@ChristopherA.Wong What is wrong with it? I checked it again. I used the fact that $(a-b) = -(b-a)$ and it works? –  CAF Jan 23 '13 at 20:11
@JohnD I have done a definite integral. My notation is a bit sloppy but I have the integral from $0$ to $x$ $d\hat{x}$ say and the integral from $0$ to $t$ $d\hat{t}$. I can use this because I have an initial condition (which I forgot to put in the question - sorry) –  CAF Jan 23 '13 at 20:14
You have a minus sign error. When corrected, it will leave you with a linear equation for $x$. –  André Nicolas Jan 23 '13 at 20:21