The question is as follows:
$f(x) = \cos(\pi x)$, $g(x) = f(x+2010)$. I need to find the sum of all of $g$'s Fourier coefficients from $-\infty$ to $\infty$. I know that $f=g$.
Therefore $g$'s $n$th Fourier coefficient is: $\frac {1}{2\pi} \int_{-\pi}^\pi \cos(\pi x)e^{-inx} dx$, which comes down to $\frac{1}{\pi} \int_{0}^\pi \cos(\pi x)\cos(nx) dx$.
This is where I'm stuck. Any tips would be greatly appreciated!
Integration by parts gives
$$\begin{align} \int_{-\pi}^\pi \cos(\pi x)\cos(nx)dx &= \int_{-\pi}^\pi (\frac{1}{\pi} \sin(\pi x))^\prime \cos(nx) dx\\ &= \frac{2}{\pi}\sin(\pi^2)(-1)^n + \frac{n}{\pi}\int_{-\pi}^\pi \sin~(\pi x)\sin(nx)dx \end{align} $$
Integrating by parts again gives
$$\int_{-\pi}^\pi \sin(\pi x)\sin(nx) dx = \frac{n}{\pi}\int_{-\pi}^\pi \cos(\pi x)\cos(nx) dx$$
Setting $A=\int_{-\pi}^\pi \cos(\pi x)\cos(nx) dx$ we see
$$A=\frac{2}{\pi}\sin(\pi^2)(-1)^n+\frac{n^2}{\pi^2} A$$
Simplifying gives
$$\frac{1}{\pi}\int_{-\pi}^\pi \cos(\pi x)\cos(nx)dx=\frac{A}{\pi}=\frac{2\sin(\pi^2)(-1)^{n+1}}{n^2-\pi^2}$$
The Fourier series of $f=g$ is therefore
$$\frac{\sin(\pi^2)}{\pi^2}+2\sin(\pi^2)\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n^2-\pi^2}\cos(nx)$$
It is convergent and equal to $f$ for $x\in(-\pi,\pi)$.