0
$\begingroup$

When we solve the equation $$\frac 2{\pi}\int_{0}^{\pi}k\sin(nx)dx;$$ after integrating it, we get $\frac {2k}{n\pi}(1-\cos n\pi)$. Why is $\cos n\pi=(-1)^n$?

$\endgroup$
  • $\begingroup$ Look at the graph of $cos x$. $\endgroup$ – gmath Sep 24 '14 at 14:49
  • $\begingroup$ $\cos 0=1$, $\cos \pi=-1$, $\cos 2\pi=1$, ... $\endgroup$ – Paul Sundheim Sep 24 '14 at 14:51
  • $\begingroup$ Oh.. i did'nt think of that. Thanks for the help guys! $\endgroup$ – Fad Lion Sep 24 '14 at 14:55
2
$\begingroup$

The cosine is $2\pi$ periodic and has maxima at $2\pi k$ for $k \in \mathbb Z$ and minima at $\pi (2k+1)$ for $k \in \mathbb Z$. So $\cos n \pi$ is always at a maximum or minimum for $n \in \mathbb Z$.

I think if you draw it you will see it even better: enter image description here

$\endgroup$
2
$\begingroup$

This is basic trigonometry:

$$\begin{align*}&\cos 0=1\implies \cos(0+2n\pi)=\cos 2n\pi=1\\ &\cos \pi=1\implies \cos(\pi+2n\pi)=\cos((2n+1)\pi)=-1\end{align*}\;\;\implies \cos(n\pi)=(-1)^n$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.