I have a burning question to ask regarding graphical transformation:
Suppose I have a function $f(x)$
I want to find $f(ax+b)$ for non zero $a,b$.
There are two approaches that I can go:
First: $f(x)\mapsto f(x+\frac{b}{a})\mapsto f(ax+b)$
Second: $f(x)\mapsto f(ax)\mapsto f(ax+b)$
However, when I start to plot the graphical transformation from $\sin(x)$ to $\sin(2x+\pi)$, the first approach will get me a wrong answer. (I will obtain $\cos(2x)$ instead of $\sin(2x)$)
Please help. Thank you.
The mistake you made, basically, was knowing too much and being too eager.
When applying the first approach, you did:
$$\sin(x)\mapsto \sin(x+\frac{\pi}{2})=\cos(x)\mapsto\cos(2x)$$
while you should do this:
$$\sin(x) \mapsto \sin(x+\frac\pi2)\mapsto \sin(2x+\pi)$$
Your mistake was thinking that just because, for a pair $x,y$ (in your particular case, $y$ was equal to $x+\pi/2$) you have $\sin(y) = \cos(x)$, you cannot assume that you also have $\sin(2y) = \cos(2x)$, which is where you made your mistake. You assumed (implicitly) that that is the case, by saying