integral of a discontinous periodic function?

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

1. periodic (for a $$\tau > 0$$), therefore I only need to determine the integral over one period.
2. 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.

• Why did you drop the coefficient $a_0$ ?
– user65203
Feb 8, 2021 at 11:47
• In "Can I do this ?", we don't know what this replaces. So the question is unclear. And "include this single point" is maximally mysterious.
– user65203
Feb 8, 2021 at 11:49
• Sorry, lost $a_o$ accidentally - edited my question accordingly. Well, "this" is indeed unclear, will try to formulate better. "Include this single point" is referring to the image I included. So $a(\tau) = a_0$ but for the function I am proposing to use for integration $\alpha(\tau)=a_0*e^{-k\tau}$ . Since these are not equal I am wondering whetther I can not do this ("this" refering to using $\alpha(t)$ as aproxy for $a(t)$. Feb 8, 2021 at 12:52

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.

WLOG, $$a_0=1$$ and $$\tau=1$$. The integral is

$$\int_0^te^{-k\{u\}}du$$ (the braces denote the fractional part). Within the first period ($$t<1$$),

$$\int_0^te^{-ku}du=\frac{1-{e^{-kt}}}k.$$ For a complete period,

$$\int_0^1e^{-ku}du=\frac{1-{e^{-k}}}k.$$

Then for any value,

$$\int_0^t=\int_0^{\lfloor t\rfloor}+\int_{\lfloor t\rfloor}^t=\lfloor t\rfloor\int_0^1+\int_0^{\{t\}}.$$

You don't have to worry about the discontinuity $$f(1)\ne f(0)$$. It has null measure and does not influence the integral.

Below, $$k=1$$: