# What is a phase shift in trigonometry, and how can I determine them given a graph?

(Yes, I know there are already some answers about phase shifts on here, but none of them have helped me much.)

I am a Pre-Calculus student learning about trigonometric function transformations, and I am extremely confused about the definition of a phase shift (and hence very, very frustrated).

We are learning about functions of the following two general forms:

$$y=A \sin(Bx-C)+D$$

$$y=A \cos(Bx-C)+D$$

The definition of phase shift we were given was as follows: "The horizontal shift with respect to some reference wave."

We were then provided with the following graph (and given no other information beyond that it was a transformed sine or cosine function of one of the forms given above):

(Ignore my erased pencil markings in the graph!)

We were asked to find the graphed function's phase shift with respect to the cosine parent function $$y=\cos(x)$$. We were also asked to find the graphed function's phase shift with respect to the sine parent function $$y=\sin(x)$$. (Of course, our answers would be eye-balled estimates based on the graph.)

I was utterly mystified. The definition given above told me virtually nothing I wanted to know. And when I asked the teacher for an explanation, it did not end my confusion. Does anyone here have a good explanation of what a phase shift is, and perhaps also how (given solid knowledge of the definition) I could go about solving the graph problem mentioned above?

I have spent a lot of time today searching around online -- in vain -- to try to end my confusion. Nothing has helped much. A lot of people seem to talk about phase shifts in terms of where a function "starts." But a periodic function that repeats on and on forever in either direction does not seem to me to have an intuitive "start" point. Even if one were to select some period to be the "starting period," it is not clear to me how one would choose such a period. Moreover, while I understand that phase shifts have something to do with horizontal translations of the parent functions, it is not yet clear to me what precisely that relationship is -- particularly if the function we are analyzing has also been transformed in other ways (e.g. dilated and vertically translated), making things more complicated.

• Does this (mathsisfun.com/algebra/…) help? – qsmy Feb 17 at 4:33
• @qsmy I've actually already looked at that page! Still confused though. :) – Will Feb 17 at 4:45

Amplitude, period and phase shift of can be recovered from the graph by noticing the coordinates of the peaks and troughs of the wave.

Let $$y_{peak}$$ and $$y_{trough}$$ denote the $$y$$-coordinates of the peaks and troughs of the wave. Then for the amplitude we have

$$A=\frac{1}{2}\left(y_{peak}-y_{trough}\right)$$

From your graph there is no indication of the vertical scale, but let us suppose that the horizontal dashed lines are one unit apart. Then we would have $$y_{peak}=2$$ and $$y_{trough}=-6$$. This would give $$A=\frac{1}{2}(2-(-6))=4$$.

We can also use $$y_{peak}$$ and $$y_{trough}$$ to find the vertical shift $$D$$.

$$D=\frac{1}{2}\left(y_{peak}+y_{trough}\right)$$

So, for your example, $$D=\frac{1}{2}(2+(-6))=-2$$.

This leaves the values of $$B$$ and $$C$$. But first, we must find the period $$P$$, which is straightforward.

The period P is the horizontal distance between two successive peaks of the graph. For your graph this would be a distance $$P=3\pi$$.

The value of $$B$$ is then found from

$$B=\frac{2\pi}{P}$$

For your graph, then, we have $$B=\frac{2\pi}{3\pi}=\frac{2}{3}$$.

Finally we have the phase shift $$\phi$$.

The phase shift for the sine and cosine are computed differently. The easiest to determine from the graph is the phase shift of the cosine.

Let $$x_{peak}$$ denote the $$x$$-coordinate of the peak closest to the vertical axis. For your graph, we have $$x_{peak}=0$$.

$$\phi=x_{peak}\text{ for the cosine graph}$$

$$\phi=\left(x_{peak}-\frac{P}{4}\right)\text{ for the sine graph}$$

For your graph this gives phase shift $$\phi=0$$ for the cosine graph and phase shift $$\phi=0-\frac{3\pi}{4}=-\frac{3\pi}{4}$$ for the sine graph.

But for your equations, we need the value of $$C$$. The value of $$C$$ is found from the values of $$\phi$$ and $$B$$.

The equation for $$C$$ in terms of the phase shift $$\phi$$ is

$$C=B\phi$$

So if we use the cosine function to model your graph we have $$C=0$$ and for the sine graph we have $$C=\frac{2}{3}\cdot\left(-\frac{3\pi}{4}\right)=-\frac{\pi}{2}$$.

So we have for both sine and cosine

1. $$A=4$$
2. $$D=-2$$
3. $$B=\frac{2}{3}$$

For cosine, $$C=0$$ and for sine, $$C=-\frac{\pi}{2}$$.

Thus your graph can be represented by either of the two equations

$$y=4\cos\left(\frac{2}{3}x \right)-2$$

$$y=4\sin\left(\frac{2}{3}x+\frac{\pi}{2}\right)-2$$

• Very simple but detailed answer. +1 – jayant98 Feb 17 at 17:35
• @John Wayland Bales Excellent answer! Thank you very much. One question: What is the justification for using the formula for sine phase shift that you use? (x-peak - P/4) – Will Feb 17 at 21:05
• The unshifted sine function contains the origin $(0,0)$ which lies one-quarter period to the left of the nearest "peak" of the graph. The $x$-coordinate of the nearest peak of the graph is $x_{peak}$. This relationship between $x_{peak}$ and the period is unchanged by horizontal shifts in the graph. For the unshifted graph it gives a value of $0$. For shifted graphs it gives the amount of the shift. – John Wayland Bales Feb 17 at 21:17
• $x_{peak}$ may be negative. But you may add any multiple of the period to it if you must use a positive value. The resulting graph will be identical. For $y=\sin(x-\pi)$ we get $C=1\cdot(-\frac{\pi}{2}-\frac{2\pi}{4})=-\pi$. But you can add the period $2\pi$ to that to get $C=+\pi$ The graphs of $y=\sin(x-\pi)$ and $y=\sin(x+\pi)$ are the same. – John Wayland Bales Feb 18 at 3:47
• One can assign many phase shifts to the same function, each of which will produce the same graph. Take any phase shift and add or subtract any multiple of the period and that will produce another valid phase shift. But ideally the best value to use for the phase shift is the one with smallest absolute value. If the phase shift just happens to be exactly half the period, then you can choose either the negative or the positive value for the phase shift because their absolute values would be the same. – John Wayland Bales Feb 18 at 4:29

A is the amptitude, B the frequency, C the phase shift.
A makes the waves bigger or smaller.
B makes the waves closer or farther apart.

A wave can be considered to start at its biggest value.
For example, cos x can start at 0 with a value of 1.
The phase shift changes that start point.
For example, cos (x - 2) now begins the wave
at x = 2 where it has the start value of 1.

D is not used much. An example is ocean waves, before they crash coming ashore, at high tide compared to low tide. D would raise the low tide waves to the high tide waves.