1. ## differential equation for amount of drug administered intravenously

A drug is administered intravenously at a constant rate of r mg/hour and is excreted at a rate proportional to the quantity present, with constant of proportionality k>0.

(Set up and) Solve a differential equation for the quantity, Q, in milligrams, of the drug in the body at time t hours. Assume there is no drug in the body initially. Your answer will contain r and k.

>>>

I started with dQ/dt = r - kQ
then got:
(dQ/dt) / [(r/k) - Q] = k (I factored out k from the above equation)
integrating:
ln((r/k)-Q) = kt + C
solving for Q, I get Q = (r/k) - ce^(kt)

Where am I wrong? Thanks

2. You've dropped a negative sign when you integrated the LHS.
It should be $-\ln(r/k-Q)$ .

3. thanks

so i get 1/[ (r/k) - Q] = ce^(kt)
solving for Q, I get Q = (r/k) - e^(-kt) but this is still incorrect. any ideas?

4. Lets back up to

ln(r/k -Q) = -kt + c

r/k -Q = c e^(-kt)

Apply the initial condition Q(0) = 0

r/k = c

Q= r/k - r/k e^(-kt)

5. thank you so much, that was a silly mistake