Why does $f^{(n)}(x)=\sin(x+\frac{n\pi}{2})$ for $f(x)=\sin(x)$? I'm not quite sure how does $f^{(n)}(x)=\sin(x+\frac{n\pi}{2})$ for $f(x)=\sin(x)$. Taking the initial derivatives I get,
\begin{align}
f'(x)&=\cos(x)\\
f''(x)&=-\sin(x)\\
f'''(x)&=-\cos(x)\\
f^{4}(x)&=\sin(x)
\end{align}
I'm not quite understanding this relation.

Just see how sin line change its value when rotating 90degrees counter clock wise and compare with the fact that every 4 derivatives you back to the same place (ups!, you got the same function).

Using maths:
The usage of $\sin(x+n\frac{\pi}{2})=\sin(x)\cos(n\frac{\pi}{2})+\cos(x)\sin(\frac{\pi}{2})$ is a must, because the value of functions with argument $\frac{\pi}{2}$ takes $1,0$ or $-1$, so when one takes value $0$, the other can take values $1$ or $-1$ which are the neccesary for having the right derivative. Of course, this is not casuality, this is because the derivate for sin is a idempotent operator of order $4$ (i.e $T^4=T$).
Also, since $\sin$ is periodic, its derivative will be periodic too:
$$f'(x+c) = \displaystyle\lim_{h\to0}\frac{(f((x+h)+c)-f(x+c))}{h}$$
$$= \displaystyle\lim_{h\to0}\frac{f(x+h)-f(x)}{h} = f'(x)$$
