You've dropped a negative sign when you integrated the LHS.
It should be .
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