Computer Modeling of Population Growth

advertisement
MA354
February 22, 2012
Project 4: Prescribing Drug Dosage
Using Mathematica
Objective
The objective of this project is to develop a model for prescribing drug dosage given the
following assumptions:


the concentration of a drug in the blood decays exponentially over time
drug dosages applied at time T1, T2, … are absorbed immediately and raise the
blood concentration by a level C0.
Model of Drug Elimination
Suppose the elimination of a drug from the body can be modeled as exponential decay.
The equation that models the concentration of drug C (t ) in the blood is:
C (t )  C 0 e  kt
where C (t ) = concentration of drug in the blood over time (mg per ml)
C0 = initial drug concentration in the blood (mg per ml)
k = the elimination rate (per hour)
Model of Drug Dosaging
We model drug dosaging by assuming that the administration of a drug raises blood drug
levels instantaneously by an amount C0.
Exercise 1: A single drug dose.
A single drug dose is applied at time t  0 . The drug dose is designed to raise the blood
concentration to 10 mg per ml and the rate of elimination is k = 0.05 per hour.
C (t )  10e 0.05t
(a) Plot the drug concentration over the first 24 hours.
Plot[10*E^(-0.05*t),{t,0,24},AxesOrigin{0,0}]
(b) Calculate the drug concentration at 24 hours using the equation C (t )  10e 0.05t .
(c) Calculate when the drug concentration is halved, down to 5 mg per ml. (This is the
half-life of the drug, and is independent of the dosage.)
(d) What is the concentration of drug in the blood after two half-lives?
Exercise 2: Two drug doses.
Suppose that one drug dose is applied at time t  0 and a second drug dose is applied at
time t  T . Assume the same parameters as in Exercise 1.
The equation that models the concentration of drug C (t ) when one drug dose is applied
at time t=0 and another drug dose is applied at time t=T must be defined piecewise:
C (t )  C 0 e  kt for 0  t  T
C (t )  C 0 e  kt  C 0 e  k (t T ) for t  T
We can define this in Mathematica by defining a piecewise function:
Dose1=10*E^(-0.05*t);
Dose2=10*E^(-0.05*t)+10*E^(-0.05*(t-T));
TwoDoses=Piecewise[ { {Dose1, t<T} , {Dose2, tT} } , {t,0,24} ]
(a) Plot the drug concentration over 24 hours when T = 5, 10 and 15 hours. (3 graphs)
Plot[TwoDoses/.T5,{t,0,24},AxesOrigin{0,0},FillingAxis]
T=5
T = 10
T = 15
(b) As you vary the time T of the second dosage, how does the drug concentration vary
when measured at time t = 48 hours?
2nd Dosage
given at time T
T = 0 hours
T = 5 hours
T = 10 hours
T = 15 hours
Blood Drug Conc at
time t = 48 hours
Hint: to find the value, you can use Mathematica by inputting t=24:
TwoDoses/.{T5,t48}
Exercise 3: Maximize Two-Dose Effective Drug Duration
Suppose the drug is expensive, so that you would like the two doses to last as long as
possible. However, the drug is only effective if the blood concentration is at least 5 mg/ml.
(a) By plotting the drug concentration for different second dosage times T in
Mathematica, estimate the maximum length of time the two drug doses can last. (In
other words, find the best time for administering the second dose in order to
maximize the time period of drug effectiveness.)
Hint: to accurately find the answer, trying replacing
AxesOrigin{0,0} with AxesOrigin{0,5}
(b) Find the answer you estimated in part (a) analytically (exactly).
Exercise 4: Minimize Drug Toxicity
Suppose that the drug is not expensive, but instead somewhat toxic. How should you
optimize the timing of the second dose to make sure than the blood concentration never
exceeds 12 mg/ml? (Assume that the patient eventually needs to take both doses, but just
not too close together.)
(a) Estimate by plotting the drug concentration for different second dosage times T in
Mathematica:
(b) Find the answer you estimated in part (a) analytically (exactly).
Exercise 5: Three Drug Dosages
A drug that raises drug blood concentration by 8 mg/ml is administered at 0 hours, 6
hours and 12 hours.
We can model this in Mathematica using a more complex piecewise function:
D1=8;
D2=8;
D3=8;
T1=0;
T2=6;
T3=12;
ThreeDoses=
Piecewise[{
{D1*E^(-0.05*t),t<T2},
{D1*E^(-0.05*t)+D2*E^(-0.05*(t-T2)),t>=T2 && t<T3},
{D1*E^(-0.05*t)+D3*E^(-0.05*(t-T3))+D2*E^(-0.05*(t-T2)),tT3}}
,{t,0,40}]
Plot[ThreeDoses,{t,0,48},AxesOrigin{0,0},FillingAxis]
(a) With this drug administration regimen, when the blood drug concentration is at its
highest level, how high is it? (The doctor would need to make sure the drug wasn’t
toxic at this level.)
(b) With this drug administration regimen, how long is the drug effective if it blood
concentration levels must be at least 5 mg per ml in order to work?
(c) Can you optimize the drug dosage times so that blood concentrations are at least 5 mg
per ml for the longest period of time and so that drug toxicity (unknown) is
minimized?
MA354 Project 4: Prescribing Drug Dosage (11.2)
(Turn-In Component)
Modeling Problem
Assume that you have 20 grams of medicine at your disposal and that for each gram of
medicine, your patient’s blood drug concentration will rise by exactly 1 mg per ml. The
elimination rate of the drug from the body is 0.03 per hour. The drug is effective when
concentrations in the blood are at least 5 mg per ml. The drug is not considered toxic, but
is expensive and limited in quantity.
1) Arbitrary solution: Determine a way (any way) to administer the drug by dividing
the 20 grams of medicine into 5 separate doses so that the drug remains effective
over the entire dosing regimen. The doses and dosage intervals do need not be equal
or optimal.
a. List the amount and timing of each dose, and plot the drug dosage over time.
Submit your Mathematica script with a plot.
b. Over what time period are the 5 doses effective?
2) Optimized solution: Optimize the drug regimen by choosing 5 doses and 5 dosage
times that maximize the time period over which the drug remains effective.
a. List the amount and timing of each dose, and plot the drug dosage over time.
Submit your Mathematica script with a plot.
b. Over what time period are the 5 optimal doses effective?
3) Generalized optimized solution: Suppose that there is no limit to the number of
doses you can administer, though you are still limited to 20 grams of medicine. (For
example, perhaps the patient is attached to an IV and a drug dose can be administered
easily at any time.) Generalize an optimal dosing regimen (the drug must remain
effective for the longest time period) for an arbitrary number of doses N.
a. Find an equation for the time t that each dose should be administered and an
equation for the amount of medicine in each dose if exactly N doses are
administered.
(Hint: Solve for a small number of doses and generalize. A Mathematica
script is not needed for this question.)
b. Over what time period are the N doses effective?
Download