<s>[INST] Why does $\cos(\pi/2-(\pi/2-x)) = \cos(x)$? In proving $\sin(\pi/2 - x) = \cos(x)$, in my book its given that
$$\sin \left(\frac{\pi}{2} - x\right) = \cos \left( \frac{\pi}{2} - \left(\frac{\pi}{2} - x \right)\right) = \cos x$$
So I understand this but im confused about how $\cos x$ is being obtained from $\cos(\pi/2-(\pi/2-x))$. Please explain it to me. 
 [/INST] \begin{align*}
\sin\left(\frac{\pi}{2}-x\right) &= \left(\sin \frac{\pi}{2}\right)\cos x - \cos \frac{\pi}{2} \sin x \\
                 &= \cos x &\left(\cos \frac{\pi}{2} = 0 \text{ and } \sin \frac{\pi}{2} =1 \right)
\end{align*}
</s>