Math of drugs and bodies (pharmacokinetics)

By Murray Bourne, 01 Feb 2010

Pharmacokinetics is the process whereby substances (like food and drugs) are ingested into the body (via mouth or needles) and processed. We'll concentrate on drugs.

syringe
Preparing a syringe.

The process of pharmacokinetics has 5 steps:

  • Liberation - the drug is released from the formulation.
  • Absorption - the drug enters the body.
  • Distribution - the drug disperses throughout the body
  • Metabolism - the drug is broken down by the body.
  • Excretion - the drug is eliminated from the body.

Of course, each drug needs to act on the body in a different way. Some drugs need to be absorbed quickly (like nitroglycerin if we are having a heart attack) and preferably eliminated quickly (otherwise toxins build up in the blood). For other drugs, we want slow absorption so we get maximum benefit and don't lose a lot of it from excretion.

So when your doctor prescribes (say) "take 2 tablets every meal time", this is based on the desirable levels of drug concentration and known levels of distribution, metabolism and excretion in the body.

What's the math?

When the nurse first administers the drug, the concentration of the drug in the blood stream is zero. As the drug moves around the body and is metabolized, the concentration of the drug increases.

There comes a point when the concentration no longer increases and begins to decline. This is the period when the drug is fully distributed and metabolism is taking place. As time goes on, the drug concentration gets less and less and falls below a certain effective amount. Time to take some more pills.

We can model such a situation mathematically with a differential equation. It has 2 parts - an absorption part and an elimination part. At first, absorption (increasing drug concentration) takes precedence and over time, elimination (decreasing concentration) is the most important element.

We have the following variables:

D = drug dose given

V = volume distributed in the body

C = concentration of the drug at time t

F = fraction of dose which has been absorbed (also called bioavailability)

A = absorption rate constant

E = elimination rate constant

t = time

Absorption part: This depends on the amount of the drug given, the fraction that has been absorbed and the absorption rate constant. It decreases as time goes on. The expression for absorption is given by:

A × F × D × e-At

Elimination part: The elimination dynamic is affected by the elimination constant, the volume distributed in the body and the concentration left of the drug. The expression for this part is:

E × V × C

For our model, we need to subtract the elimination part from the absorption part (since the absorption part increases the concentration of drug and the elimination part decreases it). Our differential equation is as follows:

DE-0

We now substitute some typical values for our variables (without units to keep things simple. Note C is a variable (not a constant here), the one for which we seek an expression in t.)

DE-1

Solving this differential equation (using a computer algebra system), gives the concentration at time t as:

C(t) = 533.3(e0.4t − e−0.5t)

pharmacokinetics

We can see in the graph the portion where the concentration increases (up to around t = 2) and levels off. The concentration then decreases to almost zero at t = 24.

Pharmacokinetics is yet another interesting "real life" application of math.

[Based on: A First Course in Pharmacokinetics.
Photo credit: Syringe]

See the 17 Comments below.

17 Comments on “Math of drugs and bodies (pharmacokinetics)”

  1. rashmi says:

    hey its nice ..i wondered y ppl distinguish between math and bio now reading this i can say its all abt science ...
    any thing comes from any subject..:)

  2. SueD says:

    Fantastic ... always looking for great examples and this is explain rather nicely .. thanks for passing this on!

  3. Shadreck Mpanga says:

    Wow! I now understand cleary why overdose of certain drugs can kill a human being.Please continue saving Human lives with such information.

  4. Munzir says:

    I see, so that's how the doctors knows how to distribute the drugs to the patients. Thanks for the research, it really broadens up one's mind in terms of how maths apply to daily life

  5. Aiza says:

    nice...very informative....thanks for the information

  6. Ike says:

    Great. A typical example of using math to explain how things work.

  7. Peter says:

    max occurs around t = 2.23, not 3

  8. Murray says:

    @Peter: Thanks for your feedback. It is qualified by the word "around" and is descriptive, not intended to provide any particular accuracy.

    But agreed, it's closer to 2 than 3, so I modified the post.

  9. Rafael says:

    Why is the differential equation divided by the volume?

  10. Murray says:

    @Rafael: In general, the concentration (C) of any substance is the amount (A) of that substance per unit volume (V).

    An eye drop of food coloring in a thimble of wine has a much higher concentration than the same eye drop of food coloring placed into a swimming pool.

  11. Rafael says:

    How would you solve this differential equation without using a computer algebra system?

  12. Murray says:

    @Rafael: This is a first order linear ODE. See: Linear DEs Order 1

    Instead of x and y, "t" is the independent variable, and "C" is dependent.

    (dC)/dt + 0.4C = 53.3e^(-0.5t)

    The integrating factor is

    So the solution to the DE is:

    Ce^0.4t=int(53.3e^(-0.5t) e^(0.4t))dt + K

    =int 53.3e^(-0.1t)dt + K

    =-533e^(-0.1t) + K

    At t=0 the are no drugs in the patient's body, so C=0.

    Substituting:

    (0)Ce^(0.4(0)) = -533e^(-0.1(0)) + K

    0 = -533 + K

    So

    K = 533

    Then

    Ce^(0.4t)=-533e^(-0.1t) + 533

    Dividing through by e^(0.4t) and tidying up gives:

    C=533(e^(-0.4t) -e^(-0.5t))

    I hope it helps.

  13. Rafael says:

    How did you get from 53.3 to 533?I understand you divided that side of the equation by e^0.4 but how is the coefficient 53.3 affected?

  14. Rafael says:

    And why is e^0.4 still on the left side if you divided e^0.4 on both sides? Thank you.

  15. Murray says:

    @Rafael: I noticed I had a typo in this line

    =int 533e^(-0.1t)dt + K

    It should have been this (I've amended the post):

    =int 53.3e^(-0.1t)dt + K

    The 53.3 becomes -533 because

    =int e^(-0.1t)dt = (e^(-0.1t))/(-0.1) + K = -10e^(-0.1t)+K

    For the last part,

    Ce^(0.4t)=-533e^(-0.1t) + 533

    Divide through by e^(0.4t)

    C=-533e^(-0.5t) + 533e^(-0.4t)

    Factor and rearrange:

    C=533(e^(-0.4t) - e^(-0.5t))

  16. Jenn says:

    What are the units for the concentration at the end? I know it must be something per L or mL...

  17. Murray says:

    Jenn

    Typical units for this problem would be:

    D (mL)

    V (mL)

    C (mL / kg) (of body mass)

    F (unitless)

    A (mL / h)

    E (mL / h)

    t (h)

    So the units for C at the end of the problem would be mL / kg.

Leave a comment


Comment Preview

HTML: You can use simple tags like <b>, <a href="...">, etc.

To enter math, you can can either:

  1. Use simple calculator-like input in the following format (surround your math in backticks, or qq on tablet or phone):
    `a^2 = sqrt(b^2 + c^2)`
    (See more on ASCIIMath syntax); or
  2. Use simple LaTeX in the following format. Surround your math with \( and \).
    \( \int g dx = \sqrt{\frac{a}{b}} \)
    (This is standard simple LaTeX.)

NOTE: You can't mix both types of math entry in your comment.

Search IntMath, blog and Forum