This revisits the two-compartment drug model previously considered as a system and as an introduction to Laplace transforms. This takes an input to a patient's gastrointestinal (GI) tract, which is then absorbed into the bloodstream and may be eliminated from both compartments. For this demonstration, we eliminate the amount \(x_1\) in the GI tract and obtain a single equation for the amount in the blood, \(y = x_2\), \[ y'' + (k_1 + k_2 + k_3) y' + k_3(k_1 + k_2) y = k_1 I. \] In this demonstration we take \[ I = f(t) = \mathop{\Sigma}\limits_{i=0}^\infty \frac{k_1 I_0}{t_0} (u(t-(i\cdot t_1)) - u(t-(i\cdot t_1 + t_0))), \] which gives a dose of magnitude \(\frac{k_1 I_0}{t_0}\) for \(t_0\) hours every \(t_1\) hours. Here, the function \(u(t)\) is the unit step function. Here we take \(k_1 + k_2 + k_3 = 0.54\) and \(k_3(k_1 + k_2) = 0.02\), so that roots of the characteristic equation are \(-0.5\) and \(-0.04\) (these may be obtained with \(k_1 = 0.12\), \(k_2 = 0.38\) and \(k_3 = 0.04\)).
Lecture: We can motivate the model from the two-compartment illustration; the equation may be then presented without further derivation. The forcing function may be most intuitively introduced with the graph shown to the right, so that the period of the function is easily seen and it Laplace transform may then be derived using the formula for periodic functions. Given the roots of the characteristic equation, the inverse transform is easy enough to derive. The demonstration graphs the solution.
Outside of Lecture: The second-order equation in \(y\) comes from the system of equations in the two-compartment drug model. It's well worth seeing that you can derive it from the system of equations there. Be sure that you can explain how the definition as a sum shown above gives the graph shown to the right. Then find the Laplace transform of \(f(t)\), and use this to find the solution to the differential equation. Finally, consider the graph of the solution you obtain and verify that it is consistent with the graph generated by the demonstration.
As before, our two-compartment model is illustrated as
Here the drug input \(I\) enters the GI tract, resulting in an amount
\(x_1(t)\) of the drug being present there. In any time interval
some fraction of that (\(k_1\)) passes on to the bloodstream, while some
fraction (\(k_2\)) is eliminated from the body. We call the amount of
the drug in the bloodstream \(x_2(t)\). Similarly in the bloodstream we
expect some fraction (\(k_3\)) to be filtered out by the kidneys. We
expect that the amount of the drug in the bloodstream will be
significant for the drug's effectiveness.
Assuming that all transfers between and out of the compartments indicated above are proportional to the amount of the drug present there, we obtain the simple linear system \[ \begin{aligned} x_1'(t) &= I - (k_1 + k_2)\, x_1(t)\\ x_2'(t) &= k_1\, x_1(t) - k_3\, x_2(t). \end{aligned} \]
Following the analysis in the two-compartment drug
model, we have \(k_1\approx 0.128\), \(k_2\approx 0.383\), and
\(k_3\approx 0.0385\). Finally, we take the forcing function \(I(t)\)
to be given by the figure shown above,
where \(J = I_0/t_0\). This results in the same forcing function
for the equivalent second-order system for \(y = x_2\), scaled by
\(k_1\); thus, for the second-order system our \(f(t) = k_1 I(t)\). To
get slightly nicer roots to the characteristic equation for the
homogeneous problem, in this demonstration we take \(k_1 = 0.12\), \(k_2
= 0.38\) and \(k_3 = 0.04\); similarly, we take \(I_0 = 24\), \(t_0 =
6\) and the time between doses to be \(t_1 = 24\).
Our demos:
Some questions that may be worth considering: