I have the integral $$\int_0^\pi \sin(t-2nt)dt$$
Wolfram states that the answer is: $$ \frac{2\cos^2(n\pi)}{1-2n} $$ But I can't get the same... I am close to the answer with the calculation below, but something is not right:
$$\int_0^\pi \sin(t-2nt)dt = \begin{Bmatrix} u=t(1-2n) \\ du = 1-2n dt\end{Bmatrix} = \int_0^\pi \sin u\frac{1}{1-2n}du=\begin{bmatrix}\frac{-1}{1-2n}\cos(t(1-2n))\end{bmatrix}_0^\pi = \frac{-1}{1-2n}\cos(\pi-2n\pi)=\\=\frac{-1}{1-2n}\cos\pi\cos(2n\pi)+\sin\pi\sin(2n\pi) = \frac{\cos(2n\pi)}{1-2n}$$
Where does it fail?