# Difficult integral with dirac comb

I'm trying to solve the following integral:

$\int_{-\infty}^{\infty} \frac{\cos(\pi (x+1))}{x}[\sum_{n=1}^{\infty}\delta (x-n)]dx$

So this seems pretty terrible, and there is also a hint

Hint: "Don't be afraid". Nevertheless, I am afraid.

How do you start solving this? I know I'm supposed to show some effort, but I really have no idea where to start. Maybe integration by parts?

• Do you know what $\cos(n \pi)$ evaluates to for an integer number $n$? – s.harp Oct 7 '15 at 17:35
• What would the answer be if you replaced the sum of deltas with one delta? – fred Oct 7 '15 at 17:36
• Ofcourse. It's $(-1)^{n}$ – Rick Joker Oct 7 '15 at 17:36
• Do you know what the delta distribution does to functions? It may be better for you to consider $\sum_{n=0}^N \delta (x-n)$, do the integral and then take the limit $N \to \infty$. – s.harp Oct 7 '15 at 17:38
• It should cancel out all the none integer values so the integrand is equivalent to $\sum_{n=1}^{\infty} (-1)^n$ correct? – Rick Joker Oct 7 '15 at 17:42

\begin{align} \int_{-\infty}^{\infty}\frac{\cos(\pi(x+1))}{x}\sum_{n=1}^{\infty}\delta(x-n)\,dx&=\sum_{n=1}^{\infty}\frac{\cos(\pi(n+1))}{n}\\\\ &=\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}\\\\ &=\log 2 \end{align}