# How to prove that shifting $\sin$ by $\frac{\pi}{2}$ multiplied by odd number results in $\cos$? [closed]

let $k\in \mathbb{Z}$

How to prove that

$\sin\left(x+\dfrac{\pi}{2}(1+2k)\right) = \cos x$

if $k$ is an even number and

$\sin\left(x+\dfrac{\pi}{2}(1+2k)\right) =-\cos x$

if $k$ is an odd number?

I have the intuition for the unit circle, but how can I prove this formally? I thought about induction, but $k$ can be a negative number.

• $\sin(a+b) = \sin a\cos b + \cos a \sin b$. – rogerl Dec 28 '17 at 17:00

What you want to prove is$$\sin\left(x+\frac{\pi}{2}\left(1+2k\right)\right)=(-1)^k\cos(x)$$ What we need are the addition theorems: $$\sin(a+b)=\sin(a)\cos(b)+\cos(a)\sin(b)$$ $$\cos(a+b)=\cos(a)\cos(b)-\sin(a)\sin(b)$$ In particular, these yield $$\sin(a+\frac{\pi}{2})=\cos(a)$$ $$\cos(a+k\pi)=(-1)^k\cos(a)$$ Utilizing this, we achieve $$\sin\left(x+\frac{\pi}{2}(1+2k)\right)=\sin\left(x+k\pi+\frac{\pi}{2}\right)=\cos(x+k\pi)=(-1)^k\cos(x)$$
If $k=2h$ is even, $$\sin\left(x+\frac{\pi}{2}(1+2k)\right)= \sin\left(x+\frac{\pi}{2}+2h\pi\right)= \sin\left(x+\frac{\pi}{2}\right)$$ If $k=2h+1$ is odd, …
$$(1)\sin(x)=\Im(\cos(x)+i\sin(x))=\Im(e^{ix})\\(2)\Im(e^{ix}i)=\Im(i\cos(x)-\sin(x))=\cos(x)$$
And we know that $i=e^{i\pi/2+2in\pi}$ so we get $e^{ix}i=e^{i(x+\pi/2+2n\pi)}$ now we use (1) and (2) to get $\cos(x)=\Im(e^{i(x+\pi/2+2n\pi)})=\sin(x+\pi/2(1+4n))$ set $2n=h$ to get $$\cos(x)=\sin(x+\pi/2(1+2h))$$like wise we can do for the second case, just instead of doing $i$ times the expression we will do $-i$ times the expression