An interesting thing in trigonometry that I noticed is that $$\sin(x + \pi/2) = \cos x \\ \sin(x +\pi) = \cos(x + \pi/2) = -\sin x \\ \sin (x + 3\pi/2) = -\sin(x+ \pi/2) = -\cos x$$
However, upon learning calculus (basic derivatives), I noticed that this pattern is exhibited in the derivatives of $\sin x$ as well: $$\frac{d}{dx}[\sin x] = \cos x \\ \frac{d}{dx}[\cos x] = -\sin x \\ \frac{d}{dx}[-\sin x] = -\cos x$$
What is the reason for this? How is the shift of $\sin x$ by $\pi/2$ related to the derivatives of $\sin x$? Of course this would also imply that a shift of $-\pi/2$ would give the integral of the function from which it is shifted.
Thanks for reading.