I am having trouble calculating this problem:
$X$ amount of material with $Y$ half-life is administered on a patient.
When an interval of time $=A$ elapses, ( as a given fraction of half-life) an amount of medicine $=B$is given periodically.
How do I plot the current amount of material/medicine available against time axis?
I believe that some form of recursion is needed, but I can't wrap my head about the formula... Thank you.
No matter how much material is there immediately if you have "topped up", after $A$ time passes a fixed fraction of the material will have decayed. If $A$ is measured in half-lifes, the relation is $$ (\text{amount at time }t+A) = 2^{-A}(\text{amount at time }t) $$ when there are no toppings-up in between.
Thus if $X_n$ is the amount immediately after topping up for the $n$th time, we have the recurrence $$ X_{n+1} = 2^{-A}X_n + B $$
For the steady state, set $X_{n+1}=X_n$ and solve, giving $X=\frac{B}{1-2^{-A}}$.
Starting from $0$, the growth pattern is that the difference between $X_n$ and the steady-state $X$ decreases by a factor of $2^{-X}$ for each iteration.