Can someone write me a math equation for this situation

Youre on a long half life Drug and you redose at intervals shorter than the half life

Half life either 36 hours, 56 hours or 72 hours. You redose every 24 hours.

Dosages:
Days 1-5 = 12mg day
Days 6-8 = 8mg day
Days 9+ = no more dosages

How do you calculate the dosage in your system for all 3 half lives on day 11 or day 16 as examples.

I’m no pharmacist, but it sounds like you are talking about exponential decay, e.g

12(1+2^{-1/H}+2^{-2/H}+2^{-3/H}+2^{-4/H})\cdot 2^{-6/H} + 8(1+2^{-1/H}+2^{-2/H})2^{-3/H}

What does H represent in that equation?

Sgouldnt there be 2 variables, the total hours and half life?

Let’s start with the basics. Given half-life H and the dosage taken D then the amount of the medicine in your body after time T is D x 0.5^(T/H)

Looking at a basic example from your OP, we will assume you took the dosage for the first 5 days and the drug has a half-life of 36 hours or 1.5 days. At the end of 15 days the amount of drug in your system is
12 x 0.5^(15÷1.5) + 12 x 0.5^(14÷1.5) + 12 x 0.5^(13÷1.5) + 12 x 0.5^(12÷1.5) + 12 x 0.5^(11÷1.5)
But we really want to find a pattern here and each term could be written as an exponential function (no surprise since half-life problems are exponential) to get
12 x [((0.5 ^ (1/1.5))^15 + ((0.5 ^ (1/1.5))^14 + ((0.5 ^ (1/1.5))^13 + ((0.5 ^ (1/1.5))^12 + ((0.5 ^ (1/1.5))^11]
Now that we see where this is going let’s simplify it: set A = (0.5)^(1/H). We now get a general form
D x [A^15 + A^14 + A^13 + A^12 + A^11]
It is well known that the pattern seen in the second part can be rewritten. If the exponents start at 15 and go all the way to 0 then it would be (A^16 - 1) ÷ (A - 1) but we want to get rid of all of the powers from 10 to 0 so what we end up with is
D x [((A^16 - 1) - (A - 1))) - ((A^11 - 1) - (A - 1))]
In your example you would have to do this separately for each separate dosage then add the results together.

Going back to fill in all of the known variables (and I wish I knew how to superscript here)
D = dosage
H = half-life in days
T = days on the medicine (e.g. 11 days or 16 days in your example)
N = number of days at that dosage
Then the amount of the drug in your system on day T is
D x {[((0.5 ^ (1/H))^(T+1) - 1) ÷ ((0.5 ^ (1/H) - 1)] - [((0.5 ^ (1/H))^(T - N +1) - 1) ÷ ((0.5 ^ (1/H) - 1)]}

Given the example (and hopefully make it easier to parse the above)
D = 12mg
H = 1.5 => 0.5 ^ (1/1.5) = 0.63
T = 15
N = 5
We get 12 x [((0.63^16 - 1) ÷ (0.63 - 1)) - ((0.63^11 - 1) ÷ (0.63 - 1))]
12 x [2.70104 - 2.68593]
0.18132mg

As a check I did a simulation in a spreadsheet using the same values and got 0.181135mg and considering the liberal use of rounding I did in the above example I’m calling that a success.

Let’s go over it in more detail:

Let us make H the half-life expressed in days, so set H = 1.5 or whatever you need.

Putting in all your doses, after t days the amount of drug is

12\frac{1-2^{-5/H}}{1-2^{-1/H}}2^{-(t-5)/H}+8\frac{1-2^{-3/H}}{1-2^{-1/H}}2^{-(t-8)/H}

(Maybe t should be off by 1 depending on how you count the days, or you can try to account for the dosage hour by hour)

In the formulas folks have posted so far, I’m not seeing any piecewises or Heavisides or however you’re accounting for the changes in dosage regimes.

That’s a good point—even a pill does not kick in as an instantaneous impulse (an IV bolus could be modelled like that, though). So, for instance, if the patient received 12 mg/day continuously for T days he or she would end up with

\frac{12 H}{\log 2}(1-2^{-T/H})

or something like that. If they took a pill, you would need to know the absorption rate for it.

Except for

In your example you would have to do this separately for each separate dosage then add the results together.

So for all the people good at math, let me phraae the question another way.

I want to know on what days my concentrations will drop to only 1mg of active drug in my system.

Based on only dosing from days 1-8, and based on 3 potential half lives of 36, 56 and 72 hours respectively, on what 3 days will the concentrations drop to 1mg based on the dosing regimen and half lives provided?

Im assuming itll be around days 20-30 but if anyone has better math please let me know.

Going by the formula I posted in Post #5, for the 36-hour half-life the concentration will drop to 1 mg on Day 15. At 56 hours this increases to Day 20, while for 72 hours it goes to Day 24.

Thank you. Math was never something I was good at so I didn’t know which calculation to use or if it had been posted.

There are some useful formulas here
http://file.cop.ufl.edu/pc/PHA5128/5128_exams/revised06-first-exam-supplement-material.pdf