@ kflo
@Captain Herb @acannxr
Smaller Graph is single dose, larger graph is multiple doses solved numerically. I'm getting 424 days for multiple doses as opposed to 380 something days for a single dose.
I solved the same differential equation numerically and got the following result. I used the Runge-Kutta 4 method and the result is pretty similar to the one I did by hand but not exactly the same. I used the Gaussian limit expression for the dirac delta impulse functions.
However when I change the step size and limit parameter I can get radically different solutions. I chose the step size to be a tenth of a day and limit parameter of gaussian to be the same. I need to think about why these choices are valid and not arbitrary. Solving differential equations numerically can be quite challenging because various methods and approximations lead to errors. ESPECIALLY WHEN DELTA FUNCTIONS ARE INVOLVED!!
https://en.wikipedia.org/wiki/Runge–Kutta_methods
And for those bitching about this thread being 115 pages realize that the excretion study came out 1-2 months ago. We had nothing to work with until now. The watershed statement for me was "it is unlikely to be explained by first order kinetics (two exponentials)" so naturally I did a regression for 3 exponentials (plus a constant term). Re-engineered a differential equation that said regression would satisfy and added subsequent forcing terms for multiple doses and then resolved.
Alternatively you could just stay out of the thread.
P.S. To solve a 3rd order diff eq numerically you must reduce it to a system of 1st order differential equations.