Main content

## Algebra 2

# Sinusoidal function from graph

Sal finds the equation of a sinusoidal function from its graph where the minimum point (-2,-5) and the maximum point (2,1) are highlighted. Created by Sal Khan.

## Want to join the conversation?

- Hi!

I don't know if it is my stupidity or not, but to me it seems like the "Graph sinusoidal functions: phase shift" exercise block in "Graphing sinusoidal functions" has exercises that are not covered by that point, only in this video, which is next in line. Can anyone else confirm or dismiss this?(89 votes)- I agree, fairly often I find that they threw an exercise in covering a topic we haven't learned yet, but is related. In other words skip it and the video, may or may not come later. Hope that's what you were looking for.(38 votes)

- at1:33, Sal immediately writes the amplitude as 3. How does he know that it's positive three that not negative three?(20 votes)
- Amplitudes are described by their absolute value. An amplitude of -3 or an amplitude of +3 will only flip the sinusoidal function over the x-axis. The actual height of the graph is unchanged.(2 votes)

- There is no video for constructing a sinusoidal function and the hints in the practice are not very helpful. I might be missing something. Exactly how can the midline be inferred from two points? What is an extremum?(9 votes)
- extremum are max and min values. If you are given the max and min then all you have do is average those values and you will get the midline. Since the curve oscillates from these points you will get the midline as a result. There is some stuff on graphing in algebra 2 that might also help.(6 votes)

- Is the period and the frequency the same thing? If not, what is the difference between them?(5 votes)
- Period and frequency are reciprocals of each other in Physics, i.e. P = 1/f and f = 1/P. When discussing the graphs of trig functions, the Period is the length of a cycle. The term "frequency" is not formally defined. For example, sin(x) has a period of 2pi, since sin(x) = sin(x + 2pi) and it is the smallest angle for which that is true. (Adding 2pi to an angle is equivalent to one full revolution around a circle.)

To find the period of sin(bx), calculate P = 2*pi/b. For example, sin(3x) has a period of 2pi/3. Note the inverse relationship between P and "b", just as between P and "f". You could THINK of "b" as being the frequency, but it isn't formally defined.(12 votes)

- I am trying to do the phase shift assignment for my class but i'm really not understanding how to find the period. I can get the mid-line and amp easily enough but i get confused on the sin or cosine part and the period(7 votes)
- In this answer, l am assuming the function involves a sine or cosine function.

If you are given the graph, then the period is the horizontal distance from one minimum to the next minimum (or from one maximum to the next maximum).

If you are instead given the equation, then the period is 2pi divided by the absolute value of the coefficient of x inside the sine or cosine function. This follows from the concept that increasing any angle by 2pi radians (a full revolution) has no effect on the angle’s sine and cosine.(8 votes)

- Can someone please explain y=Asin(Bx+C)+D form to me? the problem set for this gives us 2 points (may even give the midline/max/min points) and tells us to give the equation, this sample problem from the video gives that graph which makes it so much easier. Is there an easy way to do these type of problems (find the equation given 2 points)? Thanks in advance(3 votes)
- f(x) = Asin(bx+c)+D — breaking it down:

A = Amplitude

B (assuming it's 1) = Period

C = Horizontal Shift

D = Vertical Shift/**midline**

Typically in "find the equation given 2 points," your first goal is finding the period. An useful graph @ the hints in the practice problems tremendously aided me, so I recommend using that. For simple:

If given mid --> minimum/maximum, take the x distance and multiply by**four**. Then take 2pi/(that #) to find B

If given min --> minimum, take the x distance and multiply by**two**. Then take 2pi/(tht #) to find B.

Finding A, if given mid --> mid/max, take the y distance

if given min/max --> max/min, take the y distance and**divide by 2**.

Finding D, find the average of the y-values of the coordinates given as max/min. Midline have might been already given.

I also recommend looking in the comments for each video, as many questions such as this has already been answered and could be more in depth than mine. Quite honestly this is objectively one of the more harder subjects in alg ii.(13 votes)

- Can't this graph also be represented by a cosine function with a phase shift?(2 votes)
- Yes, the equation of this graph can also be y=3cos(pi/4(x-2)) -2(9 votes)

- how do u calculate the phase shift using angles in sine and cosine(6 votes)
- If you are given the equation y = A sin(kx + c) + d, then the phase shift equals -c/k. The calculation is identical if you replace the sin with cos.(2 votes)

- Regarding the practice section: "Graph sinusoidal functions: phase shift".

I think that this section needs more explanation, especially about (bx+c) conversion. We haven't learned how to interpret (pi*x - 3*pi) of f(x) = 2sin(pi*x - 3*pi) -4 on the graph, though I understand the horizontal shift (x-3). I understand the (bx + c) part, but can't understand when it turns into (b*pi*x + c*pi).(5 votes)- I find it super weird that it is using (bx+c).

When doing transformations on ALL graphs it is most useful if you have it in the form a * f(b(x-c)) + d so (bx+c) should be b(x+c/b). This is because in (bx+c) the graph is being shifted to the left by c/b units.

I'm not sure where you are getting (b*pi*x + c*pi) if you fill in the parts of a * f(b(x-c)) + d and then distribute the b into the inner part of the function you should get your answer.

a is the amplitude of course

b gets you the period, though you need to invert it. So if it goes from 2pi and doubles to 4pi you DIVIDE by 2 so b would be 1/2. usually b is the horizontal stretch/ shrink, but since sine and cosine graphs are measured in periods it's a bit easier to describe how they effect those. Still, a b between 0 and 1 is a stretch and b greater than 1 is a shrink. If it were negative then you'd have it flipped across the y axis, which you usually won't have.

c is the horizontal shift (or phase shift) but the sign is flipped. so +3 means 3 to the left and vice versa

d is the vertical shift, another easy one because plus means up and minus means down. Probably best to focus on the midline here, because it will be unaffected by the amplitude change

Once you have all that filled in the inner part goes from b(x - c) to (bx - bc)

Let me know if this doesn't help(3 votes)

- Would someone mind helping me understand a unit test problem? It's not explained anywhere in KA and the "see how we answered it" section of the test was not helpful. You are supposed to graph the sinusoidal graph of 4sin((π/4)x + 3π/4)+2. I get everything except for the +3π/4 inside the parentheses. I know it goes left, but I had to use desmos to graph it to see how far it goes. It doesn't go "3/4 of 1" to the left, it goes 3 to the left.

Now, I see that you can factor out a π/4 to be π/4(x+3) but I don't see how that is a legitimate manipulation to the shift. I know it works algebraically but I can't wrap my head around it to see what is happening graphically to the function. Any help and/or recommended vids on that would be most appreciated.(4 votes)- your second paragraph is how all graph transformations work. you always want x+b (where b is the term inside the function) to be multiplied by the same thing.

So say you had ln(5x+10) you would have to factor out a 5 to get ln(5(x+2)) to get that it is the graph of ln(x) with a horizontal shrink by a factor of 5 and then moved left 2.

For trig functions horizontal stretches are easier to describe with periods and whatnot, but it's the same idea, you are either stretching or shrinking it. Same with vertical stretches being changes to the amplitide(3 votes)

## Video transcript

Write the equation of the
function f of x graphed below. And so we have this
clearly periodic function. So immediately you
might say, well, this is either going to be a sine
function or a cosine function. But its midline
and its amplitude are not just the plain vanilla
sine or cosine function. And we can see that
right over here. The midline is halfway
between the maximum point and the minimum point. The maximum point right over
here, it hits a value of y equals 1. At the minimum points,
it's a value of y is equal to negative 5. So halfway between
those, the average of 1 and negative 5, 1 plus
negative 5 is negative 4. Divided by 2 is negative 2. So this right over
here is the midline. So this is y is
equal to negative 2. So it's clearly shifted down. Actually, I'll talk
in a second about what type of an expression
it might be. But now, also, let's
think about its amplitude. Its amplitude--
that's how far it might get away from the
midline-- we see here. It went 3 above the midline. Going from negative 2 to 1,
it went 3 above the midline at the maximum point. And it can also go 3 below the
midline at the minimum point. So this thing clearly
has an amplitude of 3. So immediately, we
can say, well, look. This is going to have
a form something like f of x is equal to
the amplitude 3. We haven't figured
out yet whether this is going to be a cosine
function or a sine function. So I'll write "cosine" first. Cosine maybe some coefficient
times x plus the midline. The midline-- we
already figured out-- was minus 2 or negative 2. So it could take
that form or it could take f of x is equal to 3
times-- it could be sine of x or sine of some
coefficient times x. Sine of kx minus 2 plus
the midline-- so minus 2. So how do we figure
out which of these are? Well, let's just think about
the behavior of this function when x is equal to 0. When x is equal to
0, if this is kx, then the input into the
cosine is going to be 0. Cosine of 0 is 1. Whether you're talking about
degrees or radians, cosine of 0 is 1. While sine of 0-- so
if x is 0, k times 0 is going to be
0-- sine of 0 is 0. So what's this thing doing
when x is equal to 0? Well, when x is equal to
0, we are at the midline. If we're at the midline, that
means that all of this stuff right over here evaluated to 0. So since, when x equals 0, all
of this stuff evaluated to 0, we can rule out the
cosine function. When x equals 0 here, this
stuff doesn't evaluate to 0. So we can rule out this
one right over there. And so we are left with this. And we just really
need to figure out-- what could this
constant actually be? And to think about
that, let's look at the period of this function. Let's see. If we went from
this point-- where we intersect the midline--
and we have a positive slope, the next point that we do
that is right over here. So our period is 8. So what coefficient
could we have here to make the period of
this thing be equal to 8? Well, let us just
remind ourselves what the period of sine of x is. So the period of
sine of x-- so I'll write "period" right
over here-- is 2pi. You increase your angle by
2 pi radians or decrease it. you're back at the same
point on the unit circle. So what would be the
period of sine of kx? Well, now, your x, your input
is increasing k times faster. So you're going to get to the
same point k times faster. So your period is going
to be 1/k'th as long. So now your period is
going to be 2 pi over k. Notice, as x increases, your
argument into the sine function is increasing k times as fast. You're multiplying it by k. So your period is
going to be short. It's going to take you less
distance for the whole argument to get to the same point
on the unit circle. So let's think
about it this way-- so if we wanted to say 2
pi over k is equal to 8, well, what is our k? Well, we could take the
reciprocal of both sides. We get k over 2 pi
is equal to 1/8. Multiply both sides by 2pi. And we get k is
equal to-- let's see. This is 1. This is 4. k is equal to pi/4. And we are done. And you can verify that by
trying out some of these points right over here. This function is equal to 3
sine of pi over 4x minus 2.