I would like to ask a question regarding the transformation of the graph $\cos(x)$ into $\sin(x)$ by means of transformations of graphs.
I used Desmos to render $3$ equations - $\cos(x)$, $\cos(-x)$ and $\cos(-x + \frac{\pi}{2})$
Now, when I transform $\cos(x)$ into $\cos(-x)$, this is a reflection in the $y$-axis, hence there is no change so the two graphs overlap.
However, when I add $\frac{\pi}{2}$, I expected the graph to shift left by $\frac{\pi}{2}$ but instead it shifts right by $\frac{\pi}{2}$ to give the sine function.
I might be missing something here, but why does this happen?