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. 
 A: If you distribute the minus sign you see that
$$\frac \pi 2 - \left( \frac \pi 2 - x \right) = \frac \pi 2 - \frac \pi 2 + x = x$$
A: \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*}
A: $$\cos \left(\dfrac{\pi}{2} - \left(\dfrac{\pi}{2} - x \right) \right) = \cos \left(\dfrac{\pi}{2} - \dfrac{\pi}{2} + x \right) =  \cos(x) $$
A: The most simple answer will be the phase difference between $\sin x$ and $\cos x$ is $\frac{\pi}{2}$. The point is how trigonometric functions are defined ? 
The fact is they are never defined rather interpreted in a logical,pedagogical manner. See if you put $x=\frac{\pi}{2}$ and $y=-x$ in $\sin(x+y)=\sin x \cos y+\cos x \sin y$ then you will get the verification.
But how this formula is derived ?
Simple euclidean geometry. The only defination you need is what is the meaning of sine,cosine in terms of ratio.
Hey wait ! I have used the particular values of sine and cosine. Though some values can be imagined. I will recommend to check out following links.
How would a triangle for sin 90 degree look
How were the sine, cosine and tangent tables originally calculated?
