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.

## Algebra 2

### Course: Algebra 2>Unit 11

Lesson 7: Transforming sinusoidal graphs

# Transforming sinusoidal graphs: vertical & horizontal stretches

Sal graphs y=-2.5*cos(1/3*x) by considering it as a vertical stretch and reflection, and a horizontal stretch, of y=cos(x). Created by Sal Khan.

## Want to join the conversation?

• Does -sin(x)=sin(-x) ? •   Yes. Because of that property, sine is said to be an odd function.
Because cos(x) = cos(-x), cosine is said to be an even function.
• Hello, so, for the last two videos, they made perfect sense and helped out a lot to understand how to graph the equation. although, I found myself really lost when it came to the practice problems after the videos. I don't feel like these videos prepared me enough for the practices because the problems in the practices were much more complicated, to me that is, and I was wondering if you could include a video about how to solve a problem that has a constant after the coefficient of x • "x" here is theta on the unit circle. On the unit circle if we know x than we can get +-y and if we know y we can get +-x. Theta is defined as the angle with sine y/r (= y), or with cosine x/r (= x).

In these graphs of sine functions, x stands for theta on the unit circle and is the independent variable.
When you graph, say, "y = sin(x+10)", you are plotting the value of "sin(x+10 radians)" at the x coordinate "x radians". Thus, you are getting y values from 10 radians to the right of where you are on the x axis (y=sin(13 radians) for x = 3 radians, y=sin(19 radians) for x=9 radians, y=sin(5 radians) for x= -5 radians, etc.), which shifts the graph to the left by 10 radians.
When you graph "sin(x-10)" you are plotting "sin(x-10 radians)" at the x coordinate "x radians", so you're getting y values using an x that is 10 radians to the left of where you are on the x axis (y=sin(-7 radians) for x = 3 radians, y = sin(-1 radian) for x = 9 radians, y = sin(-15 radians) for x = -5 radians, etc.), which shifts the graph to the right 10 radians.
• is there a video that includes horizontal shift, or the "c" value in y=d+a(sin)(b(x-c))?
if yes, could someone please direct me towards it? and if not, how do you find c when only given a maximum and minimum for the function? i have my final tomorrow and i am still baffled! thanks so much! • Sorry we missed your final. Horizontal shift for any function is the amount in the x direction that a function shifts when c ≠ 0. Horizontal shift can be counter-intuitive (seems to go the wrong direction to some people), so before an exam (next time) it is best to plug in a few values and compare the shifted value with the parent function. Pick an obvious marker point, such as where the maximum is on the unshifted function and where the function equals zero. Those are the easiest points to compare. A graphing calculator works well for this, especially if you use one of the ones on line that will give you different colors. You can learn a lot very quickly. If all else fails, graph a few points with pencil and paper. It is slower, but it also works. Once you become familiar with how it works it will be easier to work with the calculations.

Phase shift c is best discovered by pattern matching if you are given an equation, or by examining values when sin equals a significant point such as zero or maximum or a minimum. You cannot solve for phase shift given ONLY the maximum and minimum values, so I think you may also be given the points where those maximum and minimum values occur. Given that it is easy (well, OK, it is still work) to turn into a detective and figure out phase and interval, and figure out how the function fits over its interval. One phase WILL begin at x=c.
• If Sin is equal to 'y' values and Cos is equal to 'x' values in the unit circle, why this graph have 'y' values if he is using a cos function?? • At , why only 3π is used and why not other angles ? • Well, it was just the most reasonable and efficient angle to use. Easy for us to say! Here's why:
The shape of the cosine function is very predictable. If you start looking at the beginning of the period, and it is at a maximum there, then at the end of the period, `which we just calculated is 6 pi`, it will have come back to the maximum value, by definition. We know that the point exactly in between the ends of the curve at its two maximums will be the minimum point. So, Sal knew exactly where the midpoint would be which is 6/2 pi or 3 pi, and the curve of cosine at the midpoint of the period will be at a minimum if it is at a maximum at the ends of the period. If you have a lot of time, you can plot values of the function at other angles to see what is happening. In fact that is very helpful for understanding the behavior of functions.

Color graphing calculators are great for comparing lots of trig functions quickly to see what happens with amplitudes and periods and maxima and minima. Be sure to graph on a trig scale, though, and give yourself just enough vertical scale to see the curves. Otherwise the graphs are tough to see. A trig function is very happy with vertical scales of small numbers.
• As far as I understand phase shift works like this:
cos(2x-pi/3)
where the phase part is:
x-pi/3 = 0
x = pi/3
I thought this means that the whole function shifts to the right by pi/3, but I couldn't graph it in the exercise, so I pressed on the hint option, and it said that x-pi/3 is equivalent to pi.
I don't see how these two can be equivalent. Could someone explain this to me? • There two transformations going on, the horizontal stretch and the phase shift.

To stretch a function horizontally by factor of n the transformation is just f(x/n).

So let f(x) = cos(x)

=> f(x/(1/2)) = cos(x /(1/2) ) = cos(2x)

So the horizontal stretch is by factor of 1/2.

Since the horizontal stretch is affecting the phase shift pi/3 the actual phase shift is pi/6 as the horizontal sretch is 1/2.

cos(2x-pi/3) = cos(2(x-pi/6))
• How do I find the period of any given function? • None of these videos seem to be answering my question: in the formula a*sin(bx + c) + d, a is the amplitude, b determines the period, and d equals the midline. What does c do? • Why is Sal calculating points on the x-axis that are between pi and 2pi? He just keeps saying "and we mark that right over here" without explaining why he's marking values at 3pi/2. • Is there a convention around when to add parenthesis around the parameters of a trigonometric function? Why are there no parenthesis around `1/3x` in this video? • There is no strict convention that dictates when to use parentheses around the parameters of a trigonometric function. However, there are some general guidelines and common practices.

Single Argument: When a trigonometric function has only one argument, parentheses are often omitted. For example:

Sine: sin θ
Cosine: cos θ
Tangent: tan θ

Multiple Arguments: When a trigonometric function has multiple arguments or expressions, parentheses are frequently used to clarify the grouping or avoid ambiguity. For example:

Sine: sin(θ + φ)
Cosine: cos(2θ)
Tangent: tan(θ/2)

Operator Precedence: If the trigonometric function is part of a more extensive mathematical expression, parentheses may be used to ensure the correct order of operations. For example:

sin θ + cos φ (No parentheses indicate addition first)
sin(θ + cos φ) (Parentheses indicate addition first, then sine)

Readability and Clarity: Parentheses can also be used for improved readability and clarity, especially in complex equations or when dealing with nested expressions. It can help avoid misinterpretation and confusion.

In summary, while there is no hard and fast rule, it is generally advisable to use parentheses when dealing with multiple arguments or expressions, or when they enhance readability and remove ambiguity.