Photo by rawpixel on Unsplash

Calculation of prescription medication in the bloodstream after time t

Kitagawa has taken a medication. The amount of medication in his bloodstream after t hours is given by the following:

M(t) = 20e^{-0.8t} milligrams

What is the instantaneous rate of change of the remaining amount of medication after t hours?

M'(t) = 20e^{-0.8t}\cdot -0.8 = -16e^{-0.8t}


def mfunc(t):
    from math import exp
    out = -16*exp(-0.8*t)
    return (out, 'milligrams / hours')