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.

### Course: Algebra 2 (Eureka Math/EngageNY)>Unit 2

Lesson 3: Topic B: Lesson 11: 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?

• Im surprised they didnt explain another method(which is given by the hints in the exercise in the videos, the method used exercise is much different from the method Sal uses in the video.

Anyway, for those who are confused as I were when you saw the hints in the exercise, let me save you some time so that you dont have to spend time trying to figure out what you miss in the video and try to brute force using them to solve the problems. Here is my what I have figured out after hours of trials and error, and thanks to Annie's clarification in the comments :

To graph a sinusoidal function(or to solve the problem in the following exercise), We need two points to draw a sinusoidal function in the interactive widget: a midline point and an extremum point. And the midline should be only 1/4 period apart from the extremum point, another way you can do it is using extremum points(maximum to minimum or minimum to maximum point0 and they should be 1/2 period apart. One thing you have to watch out for is that these points need to be consecutive, which means there they should not be any other midline intersections or extremum points between them.

Determine the extreme point and midline point(c)based on the graph(sin or cos)

a⋅sin(bx+c)+d

a=amplitude , b= cycle form 0~2π, c=horizontal shift
d=midline(vertical shift)

``[sin graphs]If its not a horizontal shift(c=0)midline: (x=0, y=d) extremum point: (x=1/4 period , y=d+a)[cos graphs]If its not a horizontal shift(c=0)midline: (x=1/4 period, y=d)extremum point: (x=0, y=d+a)``

To find a period of a function:
>Between Maximum point to minimum point(no other extremum point between them)=1/2 period
>Between Midline intersection point to the closest maximum or minimum point=1/4 period

eg: say, a function a ⋅sin⋅b(x-c)+d has midline intersection point is at x= 0 , the nearest maximum point is x= 3
1/4 period= distance between max and midline point= 3-0
1/4 period=3 (to get 1 period multiply both side by 4)
1 period=12

a function a ⋅cos⋅b(x-c)+d has a maximum point is at x= 0 , the nearest minimum point is x= 2
1/2 period= distance between max and min point= 2-0
1/2 period=2 (to get 1 period multiply both side by 2)
1 period=4

If the above is still to confusing to you, you can just memorize the formulas for now. BUT you have to eventually need to understand them one day if you plan on continue learning trigonometry.

Examples: You are asked to graph y= 5sin(πx/2)-4

a⋅sin(bx+c)+d

Here is what you do:

Determine the graph
>Sin graph, c=0(so no horizontal shift)

since its a sin graph we use this formula:

midline: (0,d)
extremum: (1/4peiord, y=d+a)

d(midline): d=-4
amplitude=|5|=5
period=2π/ π/2=4 and 1/4period= 1

Now we just have to fill them in.

midline: (0,d)= ( 0,-4)
extremum:(1/4peiord, y=d+a)= ( 1,-4+5)= (1,1)

There you have it, now you all have to do it is plot them and that it! But be mindful that which point you plot on the interactive widget, you should to the point on the y-axis line to plot the midline point, and use another point to plot extreme point, getting them mixed up will result a reversed graph, and give you the wrong graph. One way to check your whether your graph is correct, is simply see if the midline(y=d) and the amplitude match with the equation.

Hope this helps anyone who struggle to understand the method used in the exercise. Feel free to correct me, if I made any mistakes or missed something. Any insights are welcome too. Thank you for reading.
• thank you ! been trying to figure this dumb sh*t out for hours, wasn't explained the best
• 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.
• I am confused altogether on this...I have watched the videos over and over and still don't get it.
• 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?
• x is in radians. x=1 means x=1.

Btw do not confuse prod with pi.
• Hello, just a quick question why does 2pi/ number multiplying x work?
• Good question!

The period of `cos(x)` is `2pi`. This is because `2pi` radians is one trip around the unit circle. Or, graphically, the horizontal distance between the beginning and end of 1 cosine wave is `2pi`.

Okay. Remember when you learned about transformations of functions? If you take `f(ax)`, that is equivalent to a horizontal dilation (a stretch or compression) of the graph of `f(x)`, by a factor of `1/a`.

Now, apply that to `cos(ax)`. We know that if we were talking about regular `cos(x)`, the period would be `2pi`. But since `cos(ax)` is dilated horizontally by a factor of 1/a, the new period is going to be scaled too. And it will be like this: `2pi*1/a = 2pi/a`.

Hope this helps!
• 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.
• 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?
• sin(-2x-2) = y

-sin(2x+2) = y (Since sine is odd)

=> -sin(2(x+1))

So the phase shift with respect to sin(-2x) is -1
• How do you decide the difference between a cosine and a sine wave when you use the same steps to find both?
• 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.