$\int_{c}^{c+2L} cos(\frac{2\pi nx}{L})$ Wolfram Alpha gives me this result but when doing I dont get it $\int_{c}^{c+2L} cos(\frac{2\pi nx}{L}) = \frac{L sin(2\pi n) cos(\frac{2 \pi n(c+L)}{L})}{\pi n}$ dx with $n = 0,1,2,...$ 
I put this integral in Wolfram Alpha and gives me this result, but when I try to do it at hand I arrive to other result. Is Wolfram Alpha wrong?
 A: Upon integrating, we have for $n\ne 0$, the term
$$\begin{align}
\sin \left(\frac{2\pi n(c+2L)}{L}\right)-\sin \left(\frac{2\pi nc}{L}\right)&=\sin \left(\frac{2\pi nc}{L}\right)\cos(4\pi n)\\\\
&+\cos \left(\frac{2\pi nc}{L}\right)\sin(4\pi n)\\\\
&-\sin \left(\frac{2\pi nc}{L}\right)\\\\
&=\sin \left(\frac{2\pi nc}{L}\right)\left(cos(4\pi n)-1\right)\\\\
&+\cos \left(\frac{2\pi nc}{L}\right)\sin(4\pi n)\\\\
&=\sin \left(\frac{2\pi nc}{L}\right)\left(-2\sin^2(2\pi n)\right)\\\\
&+\cos \left(\frac{2\pi nc}{L}\right)\left(2\sin(2\pi n)\cos(2\pi n)\right)\\\\
&=2\sin(2\pi n)\cos \left(\frac{2\pi nc}{L}+2\pi n\right)\\\\
&=2\sin(2\pi n)\cos \left(\frac{2\pi n(C+L)}{L}\right)\\\\
\end{align}$$
Therefore, the integral is for $n\ne 0$
$$\int_c^{c+2L}\cos (2\pi nx/L)\,dx=
\begin{cases}
\frac{L\sin(2\pi n)\cos \left(\frac{2\pi n(C+L)}{L}\right)}{\pi n}&,n\ne 0\\\\
2L&,n=0
\end{cases}$$
If $n$ is an integer, then we have
$$\int_c^{c+2L}\cos (2\pi nx/L)\,dx=
\begin{cases}
0&,n\ne 0\\\\
2L&,n=0
\end{cases}$$
A: No, Wolfram Alpha is correct. But since your $n$ is an integer (which of course Wolfram Alpha does not assume if you don't say so), $\sin(2\pi n)=0$. Hence, the result is zero.
Edit
I suggest that you take care of the integral for $n=0$ by hand. Wolfram Alpha gives a generic result...
