# Integration of infinite series not giving expected result

I have the following function to integrate:

$$x_s(t) = x(t)\delta_t(t) = \sum_{k=0}^\infty x(kT_s)\delta(t-kT_s)$$

Where

$$x(t)=cos(2\pi t)u(t), T_s=0.1$$

And

$$u(t) = \begin{cases} 0 & \text{for } t < 0\\ 1 & \text{for } t > 0 \end{cases}$$

Here are my steps so far:

$$\int_{-\infty}^{t}x_s(\tau)d\tau=$$

$$\int_{-\infty}^{t}\sum_{k=0}^\infty x(kT_s)\delta(\tau-kT_s)d\tau=$$

$$\sum_{k=0}^\infty \int_{-\infty}^{t} x(kT_s)\delta(\tau-kT_s)d\tau=$$

$$\sum_{k=0}^\infty \int_{-\infty}^{t} cos(0.2\pi k)u(0.1k) \delta(\tau-kT_s)d\tau=$$

$$\sum_{k=0}^\infty cos(0.2\pi k)u(0.1k) \int_{-\infty}^{t} \delta(\tau-kT_s)d\tau=$$

$$\sum_{k=0}^\infty cos(0.2\pi k)u(0.1k) u(t)$$

$$\sum_{k=0}^\infty cos(0.2\pi k)u(t)$$

However, trying to plot the resulting function doesn't give a useful/expected result. Have I gone wrong at some point during my integration? Also, is there any way the result can be further simplified?

Find $$\int_{-\infty}^{t}f(\tau)d\tau$$ where $$f(\tau)=\sum_{k=0}^\infty \cos\left(\frac{k\pi}{5}\right)H\left(\frac{k}{10}\right)\delta\left(\tau-\frac{k}{10}\right).$$
Note that $H\left(\frac{k}{10}\right)=1$ for $k > 0$ and ill-defined for $k=0$. Delta and Heaviside functions are usually integrated over, so I'm not sure this question is well posed. I can however point out an error in your evaluation of the delta function integral (on your final line), since $$\int_{-\infty}^{t}\delta(\tau-a)d\tau = H(t-a)$$ which I suspect is what is causing your confusion.