If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Trigonometry

### Unit 2: Lesson 9

Graphing sinusoidal functions

# Example: Graphing y=-cos(π⋅x)+1.5

Sal graphs y=-cos(π⋅x)+1.5 by thinking about the graph of y=cos(x) and analyzing how the graph (including the midline, amplitude, and period) changes as we perform function transformations to get from y=cos(x) to y=-cos(π⋅x)+1.5. Created by Sal Khan.

## Want to join the conversation?

• Hi, in the next practice: graph sinusoidal functions, some examples use the c=0 (no horizontal shift rule) for the consecutive midline intersection point OR the extremum point. However, I still don't understand which is which and I keep running into mistakes where I mix up the x-values and y-values for different coordinates.

For example, in the equation y= -5 cos ((pi/16)x) - 4,
I found these two points: (0, -9) and (8, -4) but I got confused if it should be
(0, -4) and (8, -9) instead. It turned out to be (0, -9) and (8, -4). How do I tell the difference?

I hope that made sense!! (maybe I just need to rewatch the explanation videos but the way Sal does it is different than the hints given. They should match it up so it is easier to stick to one way of doing it!!) • In a * trig (bx+c) = d

To calculate the x and y coordinates of the midline and extremum points, here is what you must do.

For sin graphs do this:

To calculate the extremum point -- x = 1/4 period or 2pi/b, y = a+d
To calculate the midline -- x = 0 if not shifted horizontally, y = d

For cos graphs do this:

To calculate the extremum point -- x = 0 if not shifted horizontally , a+d
To calculate the midline -- 1/4 period or 2pi/b, y = d

As you can see, the steps for the extremum point and the midline have switched for both sin and cosin.

I hope this clears things up and simplifies things a bit better.

If there is anything unclear or incorrect, please let me know.
• Why is x not being expressed as radians like in the previous video? Does (x = 1) graphically correspond to (x = (Π / 2)) in the previous video's graph? • I have a question, my textbook says that the formula for phase shift is: -(c/|b|). It works for sinusoidal functions if the b and c value is positive, but what about if the b and c value is negative like in the following question:

sin(-2x-2)=y

According to the formula, c=-2 and b=-2 so the phase shift is 1, but isn't the phase shift supposed to be -1? • I am confused altogether on this...I have watched the videos over and over and still don't get it. • at didn't sal shift everything up by three?
(1 vote) • How do you solve for c given a graphed sine or cosine function? Thanks. 😎
(1 vote) • So c has to do with phase shift which moves the waves left and right and is a change by adding or subtracting to x inside the parentheses of the trig function. So you know the sine function without phase shift starts at 0 and increases up to the max value at π/2. So for a phase shift, you have to see how much this same 0 is moved away from the y axis. So cos(x) starts at 1 and goes down, but the 0 going up is at -π/2. Thus, the sin(x+π/2) = cos(x). If you invert the sin wave, it shifts it either ±π, so - sin(x) = sin(x+π)=sin(x-π). The sift of the cos function would be the same except you look for where you start at max and goes down, so sin(x) = cos(x-π/2). While you could also use cos(x+3/2 π), we generally look for the point closest to the axis.
Note that like all functions, if we add something to x, it moves left and subtracting moves right.
• How do you decide the difference between a cosine and a sine wave when you use the same steps to find both?
(1 vote) • Arbitrarily. A cosine wave is just a shifted sine wave, and vice-versa.

Now, if the y-axis passes right through a crest or trough, it's probably better to write it as a cosine wave, since you won't have to deal with phase shift. Likewise, if the y-axis meets the wave at the midline, you should write it as a sine wave with no phase shift. But if it's in between, it truly doesn't matter.
(1 vote)
• Where did the names "Sine" and "Cosine" originate from? How about tangent, secant, etc? Was it named after someone? Or was it just some random name generator?
(1 vote) 