I want to explore the integral of the Fourier series for an impulse train:
$$\sum_{k=0}^R \frac{e^\frac{2 i k \pi x}{R+1}}{R+1}$$
where $i=\sqrt(-1)$.
I find
$$\int \sum_{k=0}^R \frac{e^\frac{2 i k \pi x}{R+1}}{R+1}=-\sum_{k=0}^R i \frac{e^\frac{2 i k \pi x}{R+1}}{2 k \pi}$$
But this is not mathematically useful because of the $k$ in the denominator.
The curve quite clearly has a finite (and presumably therefore definable) area beneath both its real component and $-i$ times its imaginary component. For example, $R=3$ gives the following real (first) and imaginary (second) curves:
Integrating real and imaginary components separately doesn't help, I still end up with a denominator of $0$.
Can anyone help or explain?


So, you have that $$f(x)=\sum_{k=0}^R \frac{\exp\left(\frac{2 i k \pi x}{R+1}\right)}{R+1}$$ $$f(x)=\frac{1}{R+1}+\sum_{k=1}^R \frac{\exp\left(\frac{2 i k \pi x}{R+1}\right)}{R+1}$$ Because $e^0=1$. You should integrate this one: $$\int f(x) \mathrm{d}x=\int \frac{1}{R+1}+\sum_{k=1}^R \frac{\exp\left(\frac{2 i k \pi x}{R+1}\right)}{R+1} \mathrm{d}x$$ $$\int f(x) \mathrm{d}x=\frac{x}{R+1} + \sum_{k=1}^R\exp\left(\frac{2 i k \pi x}{R+1}\right) \frac{1}{R+1} \frac{1}{\frac{2 i k \pi}{R+1}}$$ $$\int f(x) \mathrm{d}x=\frac{x}{R+1} + \sum_{k=1}^R\exp\left(\frac{2 i k \pi x}{R+1}\right) \frac{1}{2ik \pi}$$ So the problem was that you were dividing by $0$. I think it's a common source of problems in the fourier analysis, it can appear when you are calculating the fourier coefficients as well.