Two more transformations complete the picture: sliding the wave sideways and lifting it up or down. They work the same way as shifts of any graph, with one catch when $B \ne 1$.
Key idea
In $$y = A\sin\big(B(x - h)\big) + k,$$ the graph shifts right by $h$ (left if $h < 0$), and the midline is $y = k$. The maximum is $k + |A|$ and the minimum is $k - |A|$. If the equation is written $y = A\sin(Bx - C) + k$, factor out $B$ first: the shift is $h = \frac{C}{B}$.
Why it works
The basic wave starts a cycle where its input is $0$. Here the input is $B(x - h)$, which is $0$ when $x = h$. So the cycle that used to start at $0$ now starts at $h$. Adding $k$ raises every point by $k$, so the center line moves from $y = 0$ to $y = k$, and the wave still swings $|A|$ above and below it.
Worked examples
Worked example: All the features
Describe $y = 3\sin\left(x - \frac{\pi}{4}\right) + 2$.
- $A = 3$: amplitude $3$.
- $h = \frac{\pi}{4}$: shifted right $\frac{\pi}{4}$. $B = 1$, so the period is $2\pi$.
- $k = 2$: midline $y = 2$, maximum $2 + 3 = 5$, minimum $2 - 3 = -1$.
Answer: Amplitude $3$, period $2\pi$, right $\frac{\pi}{4}$, midline $y = 2$, range $[-1, 5]$
Worked example: Factor first
Find the phase shift of $y = \cos\left(2x + \frac{\pi}{3}\right)$.
- Factor $2$ out of the inside: $2x + \frac{\pi}{3} = 2\left(x + \frac{\pi}{6}\right)$.
- So $h = -\frac{\pi}{6}$: the graph shifts left $\frac{\pi}{6}$.
- Check: the inside is $0$ when $2x + \frac{\pi}{3} = 0$, that is $x = -\frac{\pi}{6}$. ✓
Answer: Left $\frac{\pi}{6}$
Worked example: Building an equation
Write a sine function with amplitude $2$, period $\pi$, a shift of $\frac{\pi}{4}$ to the right and midline $y = -1$.
- $A = 2$, $k = -1$, $h = \frac{\pi}{4}$.
- $B = \dfrac{2\pi}{\pi} = 2$.
Answer: $y = 2\sin\left(2\left(x - \frac{\pi}{4}\right)\right) - 1$
Common mistake
Reading the shift of $\sin(2x - \pi)$ as $\pi$. The number inside is $C = Bh$, not $h$. Quick check: set the inside equal to $0$ and solve. $2x - \pi = 0$ gives $x = \frac{\pi}{2}$, so the shift is $\frac{\pi}{2}$.