# Writing a Simple Differential Equation

1. Sep 9, 2012

### icefall5

1. The problem statement, all variables and given/known data
A certain drug is being administered intravenously to a hospital patient. Fluid containing
5 mg/cm3 of the drug enters the patient’s bloodstream at a rate of 100 cm3/h. The drug
is absorbed by body tissues or otherwise leaves the bloodstream at a rate proportional to
the amount present, with a rate constant of 0.4 (h)−1.

(a) Assuming that the drug is always uniformly distributed throughout the bloodstream,
write a differential equation for the amount of the drug that is present in the bloodstream
at any time.

(b) How much of the drug is present in the bloodstream after a long time?

2. Relevant equations
N/A

3. The attempt at a solution
To find the rate of change, I know I have to use the amount in minus the amount out. The amount in seems to be 500t, and the amount out is 0.4/t (t is hours), but this gives me the formula $y'=500t-\frac{0.4}{t}$, which seems way too simple. The solved equation is $y=250t^{2} - 0.4ln(t)$. This would also mean, for part b, that the patient has ∞ mg/cm3 in her blood at time t=0. I'm sure I'm just being stupid and missing something simple here, but what am I doing wrong?

Last edited: Sep 9, 2012
2. Sep 9, 2012

### 1MileCrash

The rate of change is not the amount in minus the amount out, it is the rate in minus the rate out.

What's the rate in? Is it constant?
What's the rate out? Is it constant?

3. Sep 9, 2012

### icefall5

The rate in is constant at 500 mg/cm3/h, but the rate out varies based on the total amount in the bloodstream. So, in the differential equation, should it therefore be 500 instead of 500t? I think the $\frac{-0.4}{t}$ is still correct. Is that the case? My formula would, therefore, become $\frac{dr}{dt} = 500 - \frac{0.4}{t}r$.

4. Sep 9, 2012

### 1MileCrash

You're correct in saying that the first term is a constant 500, and not 500t.

Your second term is still incorrect. You are told that this rate varies proportionally to the amount of the drug currently in the blood stream. What you have written says that it varies proportionally with time t, which is incorrect.

If y' is the rate of the drug entering the blood stream, what represents the amount of the drug currently in the blood stream?

5. Sep 9, 2012

### icefall5

If r' (or $\frac{dr}{dt}$) is the rate of change of the drug in the blood stream, wouldn't r then be the total amount currently in the blood stream? In response to your question, if y' is the rate at which the drug is entering the blood stream, the total amount would be y - (rate at which it is leaving), wouldn't it?

EDIT: I was going off of the initial question, where it says 0.4 (h)-1. I assumed (h) meant hours. Is that incorrect? Based on what you said that I have wrong, is the correct answer $\frac{dr}{dt} = 500 - \frac{0.4}{r}$? That would make the second term proportional to the total amount in the bloodstream, rather than the time.

Last edited: Sep 9, 2012
6. Sep 9, 2012

### 1MileCrash

Absolutely.

No, by y' I mean the total rate it is entering the blood stream. (or if it makes more sense, the total rate of change of drug amount.)

If y' is the rate of change of the drug in the blood stream, y is the total amount currently in the blood stream.

So, do you think you can write the DE, knowing that?

7. Sep 9, 2012

### 1MileCrash

Calling r the total amount in the blood stream - you're on the right track.

However, try reading the proportionality constant again. The units of this constant is $h^{-1}$ or inverse hours. There is no reason to put r in the denominator. (h^-1) is a unit.

If you include all your units in the differential equation, you will see why this must be the case.

Last edited: Sep 9, 2012
8. Sep 9, 2012

### icefall5

Okay, that makes sense. So the final equation should therefore be $\frac{dr}{dt} = 500 - 0.4r$? It's been 3 years since I took calc I, and I just discovered that I don't remember how to do integrals. I have the equation up to $\int \frac{1}{500-0.4r}dr =\int dt$, but I can't get any further (hence the long reply time).

Thank you so much for your help, I really appreciate it!

9. Sep 9, 2012

### 1MileCrash

DE looks good now, and you've separated the variables for an equation that can be solved directly by integration.

For the right side, the antiderivative of 1 wrt t is of course t. Do you remember that from Calc I?

For the left hand side, it is solvable by making the substitution u = 500-0.4r. Do you remember U substitution?

10. Sep 9, 2012

### icefall5

I remember the right side, yes, it's the u-substitution that I can't remember. I've been looking some stuff up about it to try to jog my memory; we'll see if I get anywhere.

11. Sep 9, 2012

### icefall5

Okay, so I think I remember now. If u = 500 - 0.4r, then the following would be my work.

$u=500-0.4r$

$du=dr$

$\int \frac{1}{u}du = ln (u) = ln (500 - 0.4r)$

This isn't correct though, at least according to Wolfram|Alpha.

12. Sep 9, 2012

### 1MileCrash

du isn't equal to dr.

If $u = 500 - 0.4r$ what is $\frac{du}{dr}$?

After you know du/dr, find du by multiplying both sides of that equation by dr.

13. Sep 9, 2012

### icefall5

Ah, I misremembered (if that's a word) how to do it. I've think I've got it now!

$u = 500 - 0.4r$

$du = -0.4r dr$

$-2.5 du = 1 dr$

$\int \frac{-2.5}{u}du$

$-2.5 ln (u) + C = t$ ( = t pulled from earlier)

$-2.5 ln(500 - 0.4r) = t$

Then I have to solve that for r, which gives me $r = -\frac{e^{\frac{t}{2.5}}-500}{0.4}$. I'm not sure now what to do for part b. Graphing this gives me a straight line. Did I miss something with the constants somewhere?

14. Sep 9, 2012

### 1MileCrash

You want to know how much of the drug is present after a long time, so just take the limit of r as t - > infinity (note that the equation in your link is correct, the exponent should be negative, the one you typed is positive)

15. Sep 9, 2012

### icefall5

So then the answer is 1250 mg/cm3. Thank you so much for all of your help, I really, really appreciate it!

16. Sep 9, 2012

### 1MileCrash

No problem, glad you got it!