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?
Best Answer
Cosine is an even function; hence, $\cos(x)=\cos(-x)$. For $\cos(-x+\frac{\pi}{2})$, you can multiply the argument by $-1$ and not change the value of the function, which gives $\cos(x-\frac{\pi}{2})$. Now the transformation is clearly a shift to the right by $\frac\pi2$ which yields the sine function.