# Solving $\frac{dP}{dt} = k(M - P)$

I am suppose to solve for P(t), to find an epxression for P(t) and I am suppose to find the limit.

I can't find anything.

$$\frac{dP}{dt} = k(M - P)$$

$$\frac{dP}{M - P} = k \, dt$$

$$\int \frac{dP}{M - P} = \int k \, dt$$ $$\ln \frac{1}{M - P} = xk + c$$ $$\frac{1}{M - P} = e^{xk} + e^c$$ $$\frac{1}{e^{xk} + e^c} = M - P$$ $$-\frac{1}{e^{xk} + e^c} +M= P$$

This is wrong but I am not sure why.

-

The separation of variables went well, and in general outline the calculation was along the right lines. However, there are some problems of detail.

An antiderivative of $\frac{dP}{M-P}$ is $-\ln(|M-P|)$. In your work, the minus sign is missing.

It is always good to check by differentiating whether you have integrated right. The derivative of $\ln(M-P)$ with respect to $P$ is $-\frac{1}{M-P}$ (Chain Rule). Not quite the $\frac{1}{M-P}$ that is needed, but the fix is easy.

Later there is a typo, there is an $x$ where $t$ is intended. There is also a problem with the simplification of $e^{kt+c}$. Note that $e^{u+v}=e^u e^v$.

To do things right, we integrate and get $$-\ln(|M-P|)=kt +c.$$ Either multiply both sides by $-1$, and take the exponential of both sides, or exponentiate directly. We do the first. So we have $\ln(|M-P|)=-kt -c$, and therefore $|M-P|=e^{-c}e^{-kt}$, so $M-P=\pm e^{-c}e^{-kt}$.

For simplicity, let $C=\pm e^{-c}$. We then get $P=M-Ce^{-kt}.$ To find the appropriate value of $C$, we need more information, such as an initial condition, the value of $P$ at a certain time $t$, often (but not necessarily) at $t=0$. In particular, if $P(0)=0$, it turns out that $C=M$.

The limit as $t\to\infty$ is easy to find even if we are not given an initial condition. I assume that the constant $k$ is positive. Then, as $t\to\infty$, we have $e^{-kt}\to 0$, so the limit of $P(t)$ is $M$.

-
I still get the wrong answer fixing those mistakes though, I need $M - M^{-ekt}$ – user138246 Jun 18 '12 at 21:50
@Jordan: Think about what Andre cited. Reflect, you will find more than you wanted. :-) – Babak S. Jun 18 '12 at 21:57
@Jordan: I wrote out one solution. In order to get something like what you mention above, you will need the initial condition $P(0)=0$. Maybe that was a part of the problem that you didn't mention. – André Nicolas Jun 18 '12 at 22:04
@Jordan: I checked in my Stewart, found the problem. He as assuming without saying so that at the beginning the amount $P(0)$ learned is $0$, which is very reasonable. So $P(0)=M-Ce^0=0$ and therefore $C=M$. – André Nicolas Jun 18 '12 at 22:32
@Jordan: This is a model of amount learned, presumably from knowing nothing at time $t=0$, though that is not explicit. Our general formula is $P(t)=M-Ce^{-kt}$. Put $t=0$. Then $e^{-kt}=e^0=1$, so $0=P(0)=M-C$. Since $M-C=0$, we have $C=M$. – André Nicolas Jun 18 '12 at 22:40

I don't want to add anything important than André cited but, maybe mine illustrate the problem easier. :-)

$$\frac{dP}{dt} = k(M - P)$$

$$\frac{dP}{M - P} = k \, dt$$

$$\int \frac{dP}{M - P} = \int k \, dt$$ $$\ln\left| \frac{1}{M - P}\right| = -kt + c$$ $$\frac{1}{M - P} = e^{-kt+ c}=e^{-kt}.e^c=Ce^{-kt}$$ I think the rest is easy because you did the same above before in the body of question.

-
You need to say $\left|\dfrac{1}{M-P}\right| = Ce^{-kt}$ and $C$ is positive, and then drop the absolute value sign along with the assumption that $C>0$. – Michael Hardy Jun 19 '12 at 0:21