MATH 1170: Calculus for Biologists I (Fall 2010)

advertisement
MATH 1170: Calculus for Biologists I (Fall 2010)
Lab Date: August 31, 2010
Report due date: September 7, 2010
Section 002: Tuesday 9:40−10:30am
Section 003: Tuesday 10:45−11:35am
Lab location − LCB 115
Lab instructor − Erica Graham, graham@math.utah.edu
Lab webpage − www.math.utah.edu/~graham/Math1170.html
Lab 01
Instructions:
During the lab any necessary commands will be introduced and illustrated through examples.
Plain text appears in black inside of a plain square bracket to the left of the worksheet.
Maple commands appear in red and lines with commands begin with a red Maple prompt.
Maple output (expressions, values, and warnings) appears in blue following the commands,
within the same execution group (bracket).
Maple errors appear in pink following the commands, within the same execution group.
If you don’t want to make a text box, you can type comments to yourself or to me if you begin
the line with #.
To make a text box, click the ’T’ button on the toolbar.
Homework problems will be listed at the bottom of each lab. Please copy these problems to a
new worksheet with your full name and section number in the first line, execute required Maple
commands, and answer any questions. Your answers should be given in a short lab report
(usually 2−3 pages). The lab report should consist of the problem (as I have stated it), Maple
code used to generate data or graphs, and your answers to questions or interpretations of data
and/or graphs. You can type your answers or write them by hand on your printed out sheets.
Please do not include errors in your reports.
Each report will be due to me by the start of the next lab session.
In−class Exploration
Background: Pharmacokinetics (PK) is a field within pharmacology that describes what the
body does to a particular drug. Essentially, the goal here is to determine how much drug
ends up in your bloodstream at a certain time. Conversely, pharmacodynamics (PD)
observes what the drug does to the body, i.e. the effect that the drug has once it gets to where
it’s going. A PKPD model is one that explores both the PK and the PD of some drug in a
population. The ideas presented in this lab are based on a basic PKPD model. We will
explore how PK and PD interact with each other using the following mathematical concepts:
composition of functions, plotting/graphing functions and unit conversion.
restart;
The following function ’c(t)’ describes the PK of a drug administered orally. As such, it
tracks the changes in the blood concentration (’dependent variable’) of a drug over time
(’independent variable’). Note that exponential functions (using the number ’e’) in Maple are
(1.1)
written in the form ’exp(x).’ The (weird) units of concentration are micrograms/quart (ug/qt),
and time is in minutes.
c:=t−>(d*a*(exp(−k*t)−exp(−a*t))/(v*(a−k)))*(ug/qt);
kt
at
da e
e
ug
c := t
(1.1)
v a k qt
The next function ’E(C)’ describes the PD of the same drug, that is the effect (’dependent
variable’) that the drug has on the body based on the concentration (’independent variable’) in
the bloodstream. The concentration units input to this function are milligrams/cubic
centimeter (mg/cc). The effect is measured as a percentage.
E:=C−>Emax*(C)/(0.0025*mg/cc + C);
Emax C
E := C
(1.2)
0.0025 mg
C
cc
How can we go about determining how the drug effect changes over time, when it’s given to
us as a function of concentration? We need to compose the PK and PD functions above.
But, we can’t do that until we make sure the units output from ’c(t)’ are the same as those
required by ’E(C).’ Essentially, we need to convert ’c(t)’ from ug/qt to mg/cc.
Note the following:
[1] 1 ug = 0.001 mg;
[2] 1 qt = 1/1.057 L;
[3] 1 L = 1000 mL; and
[4] 1mL = 1 cc.
The order in which we give this information to Maple matters because it will do the
necessary substitutions for us.
Notice that not every line contains a prompt. Pressing ’Shift’ + ’Enter’ together after a
semicolon allows you to execute several lines of commands simultaneously. Try it to see
what happens. (To actually execute, you still need to press ’Enter’ by itself.)
mL:=cc; ## step 4
L:=1000*mL; ## step 3
qt:=(1/1.057)*L; ## step 2
ug:=0.001*mg; ## step 1
mL := cc
L := 1000 cc
qt := 946.0737938 cc
ug := 0.001 mg
(1.3)
We can see what the expression for ’c(t)’ looks like given these conversions to make sure we
have the correct units.
c(t);
0.000001057000000 d a e k t e a t mg
(1.4)
v a k cc
Now we can compose our PK and PD functions. The ’simplify’ command ensures that things
that should cancel out actually do so.
simplify(E(c(t)));
Notice that there are no units in the resulting expression (since ’E’ is a percentage). This
means we’ve done our job correctly.
(1.5)
1057. e 1. k t 1. e 1. a t Emax d a
(1.5)
2.500000 106 v a 2.500000 106 v k 1057. d a e 1. k t 1057. d a e 1. a t
Remember the goal was to visualize how drug effect changes over time. So, we’ll graph our
new function. Before we plot, however, we need to assign numbers to the remaining
undefined parameters in the function. These are Emax,’ ’d,’ ’v,’ ’a’ and ’k.’
Emax:=100;
d:=500000;
v:=73.99;
a:=0.1;
k:=0.03;
Emax := 100
d := 500000
v := 73.99
a := 0.1
k := 0.03
(1.6)
Now we plot. Let’s view the change in drug effect from time t=0 to t=300 minutes.
plot(E(c(t)),t=0..300,labels=["time (min)","drug effect
(%)"],labeldirections = ["horizontal","vertical"]);
The ’labeldirections’ option is purely aesthetic. See what happens if you change the option to
’["horizontal","horizontal"].’
60
drug effect (%)
50
40
30
20
10
0
0
100
200
300
time (min)
Recall the original E(C) = Emax*C/(.0025 + C) function. We’ll focus for now on the
parameter ’k.’ This is generally considered the elimination rate of the drug from an
individual’s system, i.e how fast the drug is removed from the blood. Let’s see how different
values of ’k’ impact the drug effect over time. First, we’ll clear the value associated with ’k.’
(You can check to make sure that ’k’ is a letter again by inserting the command k; after this
one (try using ’Shift’ + ’Enter’) and seeing what Maple gives you.)
(1.7)
k:=’k’;
k := k
(1.7)
Let’s assign a range of values to use within ’E(c(t)).’ To do this, we create a sequence of
numbers ranging from 0.01 to 0.05, increasing in increments of 0.01. The ’seq(first..last,
increment)’ command allows us to do this. We use brackets so that we can access the
numbers inside of ’k_vals’ later.
k_vals:=[seq(0.01..0.05,0.01)];
k_vals := 0.01, 0.02, 0.03, 0.04, 0.05
(1.8)
Before we plot ’E(c(t)),’ let’s take a look at the ’eval(expression,parameter value)’ command.
This will take an expression with an unknown parameter and evaluate it at a user−specified
value.
simplify(eval(E(c(t)),k=.04));
1.190476191 1011 e 0.04000000000 t 1. e 0.1000000000 t
2.50000000 108
(1.9)
9
0.04000000000 t
9
0.1000000000 t
1.190476191 10 e
1.190476191 10 e
Now, we’re going to plot ’E(c(t))’ by setting ’k’ to all the different values in ’k_vals’ and
plotting each of these functions all on the same graph. We use an alternative version of ’seq
(expression,values)’ where we can carry out a command as many times as we choose. In this
case, we want to run it for as many values as we have in ’k_vals,’ which is calculated by
’nops(k_vals).’ To access the ith entry in ’k_vals,’ we write ’k_vals[i]’.
I’ve written comments (##) after each major ’plot’ argument or option, for your reference.
plot([seq(eval(E(c(t)),k=k_vals[i]),i=1..nops(k_vals))],
## plot E for each k_vals number
t=0..300,
## plot from t=0 to t=300 minutes
legend=[seq(typeset("k=",k_vals[j]),j=1..nops(k_vals))],
## print the k_vals number used in each curve
labels=["time (min)","drug effect (%)"],
## label the axes [x,y]
title="Drug Effect Comparison −− Elimination Rate
Effects",
## describe the current plot
labeldirections=["horizontal","vertical"],
## put my labels the way I want them
gridlines=true,
## show me gridlines
linestyle=[seq(i,i=1..nops(k_vals))]);
## use these line styles for each curve (no. btwn 1−7)
Drug Effect Comparison −− Elimination Rate Effects
60
drug effect (%)
50
40
30
20
10
0
0
100
200
300
time (min)
k=0.01
k=0.04
k=0.02
k=0.05
k=0.03
Homework Problems
Please copy the following prompts into a new worksheet and save it
as something you’ll remember.
Your Full Name:
Your Section:
Lab Number:
NOTE: Don’t worry about printing the resulting graphs in color. Black and white or
grayscale will do just fine.
(1) Define the drug effect function as E(C) = 100*C/(0.001 + C).
## You can delete this comment and use this section to
enter your code.
(2)(a) Plot E(C) from problem (1) for C values ranging from 0 to 0.05. Assume C has units of
mg/mL (for labeling purposes only). (Note: this is NOT a composed function.)
## You can delete this comment and use this section to
enter your code to plot.
(b) What happens to the drug effect as the concentration increases?
(3) Redefine the drug concentration function c(t) = d*a*(exp(−k*t)−exp(−a*t))/(v*(a−k)).
## You can delete this comment and use this section to
enter your code.
(4) Assign the following parameter values: d = 500, k = 1.8 and v = 70000.
## You can delete this comment and use this section to
enter your code.
(5) The parameter ’a’ is considered to be the absorption rate of a drug into the bloodstream,
when the drug is taken by mouth. Create a sequence ’a_vals’ of values ranging from 2.4 to
8.4 in increments of 1.2. (Replace the XXs with the appropriate numbers.)
a_vals:=[seq(XX..XX,XX)];
(6)(a)
Plot the composed drug effect function E(c(t)) for t values ranging from 0 to 5 (hours) and
for all the different numbers in ’a_vals.’
(Replace any XXs with the appropriate or suitable numbers/words/parameters. See in−class
portion for guidance.)
plot([seq(eval(XX,a=XX[i]),i=1..nops(XX))],t=XX..XX,
legend=[seq(typeset("a=",XX[j]),j=1..nops(XX))],labels=
["time (XX)","drug effect (%)"],title="XX",
labeldirections=["horizontal","vertical"],gridlines=
true,linestyle=[seq(i,i=1..nops(XX))]);
(b) What conclusions can you make about how the absorption rate impacts the effect of the
drug on the body?
(c) Suppose a drug is only considered "therapeutically effective" when the computed effect E
(c(t)) is bigger than 45%. Based on your plot in part (a), which absorption rate causes the
drug to be therapeutically effective for the longest amount of time?
(7) List and describe any new (or relatively new) commands you used to complete the
homework. Commands are things like this(), or a word followed by parentheses. The word
tells Maple how to act on the things inside the parentheses.
Download