Background
I am a biology student and I have been struggling with finding the integral of the function:
$$ a(t) = a_0\times e^{-k\times(t- \lfloor t/\tau \rfloor * \tau)} \space\space\space \text{with}\space (k \neq 0, \tau \neq0)$$
Which (for some arbitrary values for $a_0, k$, $\tau $) looks like this. A fancy version of exponential decay.
My understanding of this function is
- periodic (for a $\tau > 0$), therefore I only need to determine the integral over one period.
- non-continuous /discontinuous.
What I did: I found the integral of the "non-periodic" version of $a(t)$, lets call that one $\alpha(t)= a_0*e^{-kt}$. So,$$\int \alpha(t) dt = -\frac{a_0*e^{-kt}}k $$ I then simply did $$\int_0^{\tau} \alpha(t) dt = -\frac{a_0*e^{-k \times \tau}}k +\frac{a_0}k $$ but this way I am clearly missing that originally $a(\tau)= a_0$ (depicted by the black points in the image above).
My Question
Can I use $\alpha(t)$ instead of $a(t)$ as to integrate over the interval fomr 0 to $\tau$? I am asking because obviously $a(tau)\neq\alpha(tau)$, but I really can't think of another way.
Bigger picture: $a(t)$ is a simplified model of the concentration of a "pollutant" in a waterbody. The concentration of this "pollutant" influences the growth of microorganisms. By finding $ \int_0^{\tau} a(t) $ I ultimately want to determine the respective mean growth of microorganisms over $\tau$. But one step at a time. I want to do this analytically, not numerically.


For $0 \leqslant t \leqslant \tau$, the term $\lfloor t/\tau \rfloor = 0$. Then your integral is correct save only you have dropped the factor $a_0$. But if you want to integrate over period greater than $\tau$, you need to consider the integral over the initial period: you will end up with a sum for a whole number of $\tau$ length periods and a residual.
For instance when $T \geqslant \tau$, let $\lfloor T/\tau \rfloor = n$, \begin{align} \int_0^T \alpha(t)~ dt &= a_0\int_0^{\tau} e^{-kt} dt + a_0\int_{\tau}^{2\tau} e^{-k(t-\tau)}~dt + \cdots \\ &\quad\qquad + a_0\int_{(n-1)\tau}^{n\tau} e^{-k(t-(n-1)\tau)}~dt+ a_0\int_{n\tau}^T e^{-k(t-n\tau)}~dt \\ &=a_0\int_0^{\tau} e^{-kt} dt + a_0\int_{0}^{\tau} e^{-kt}~dt + \cdots \\ &\quad\qquad + a_0\int_{0}^{\tau} e^{-kt}~dt+ a_0\int_{0}^{T-n\tau} e^{-kt}~dt \\ &=a_0\frac{\lfloor T/\tau\rfloor}{k}(1-e^{-k\tau})+\frac{a_0}{k}(1-e^{-k(T-\lfloor T/\tau\rfloor \tau)}). \end{align} I hope this is helpful.