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.

## Integrated math 3

### Course: Integrated math 3>Unit 6

Lesson 1: Shifting functions

# Shifting functions examples

Sal analyzes two cases where functions f and g are given graphically, and g is a result of shifting f. He writes formulas for g in terms of f and in terms of x.

## Want to join the conversation?

• at , why did Sal do x minus the horizontal shift and x plus the vertical shift? is there some kind of rule that explains why the horizontal shift must be subtracted and the vertical shift must be added? • Can someone please explain a little further what the second question is asking?

what is the connection between g(x)= f(x+2)+5 and f(x) = sqrt(x+4)-2 ? • so you're trying to write an expression in terms of x for g(x)* right?

You have the expression for *f(x)* which is *f(x)+sqrt(x+4)-2
and you have the expression for g(x)* after solving, which is *g(x)=f(x+2)+5.

But now, you have f(x)* in your equation for *g(x)*. In order to get rid of that and have an equation for *g(x)* you need to solve both the equations.

Now you put them all together like he did at by substituting for *f(x)=sqrt(x+4)-2
with the expression for g(x)= f(x+2)+5.

~ f(x+2)=sqrt(x+2+4)-2

~f(x+2)=sqrt(x+6)-2

~f(x+2+5)=sqrt(x+6)-2+5

~f(x+2+5)=sqrt(x+6)+3

~and since f(x+2+5)=g(x)*

--> *g(x)=sqrt(x+6)+3

I hope I cleared something up instead of messing you up more.
• Sal... Tell me if I am wrong... but the way I think about it is this is somewhat like completing the square. When you complete the square and find a value for C. Like Sal says you can't just willy-nilly add "C" without either adding that same amount to the other side or subtracting from the same side. In this case you are "extracting" a given value from X. This forces "X" to make up for it. For Example: If I have to have a pile of marbles that are equal to "X" amount, but I know I will have someone come along and take two marbles before I even start counting them, then I need to have X be equal to two more marbles. Substitute X for a number. I can either have X be equal to 10 or 12-2. Again... subtracting 2, forces my starting X value to be worth 2 more. Am I on the right track? • I can not visualise this 'negative' for vertical and 'positive' for horizontal. Can someone explain? Why we are shifting like this? • I know that f(x)= √(x+4) -2.
If we put x=√(x-4) -2 into f(x+2),
I think it should be √(x+4) +2 instead of √(x+2+4)
I'm really confused. Really appreciated someone can help me! • f(x)= √(x+4) -2 and you are trying to find f(x+2)
The "x+2" is your input value. You replace the "x" in the function with "x+2"
The "x" is inside the square root. So, that "x" changes to "x+2"
f(x+2)= √(x+2+4) -2

What you calculated is f(x)+2. The 2 in your scenario is not an input. You just added 2 to the entire function.
Hope this helps you see the difference.
• At , why does Sal shift the blue line ( I honestly don't know what we call it ). Can't we shift the pink one? • We can just call the blue line f(x) cause it's the name, likewise the pink line g(x).

The question that's raised is "what is g(x) in terms of f(x)?" That means, we have to shift f(x) until it matches g(x).
If the question asks "what if f(x) in terms of g(x)?" then we will have to shift g(x) until it matches f(x).

Everything is dependent on what the question asks for, so watch out for that. Hopefully that helps !
• I have to say Sal is usually very clear in all his videos but this one has been really brushed off quickly! The steps are quick and not easy to follow. I thought about it today (all day), I came up with a system/way to digest this. At the end, if we consider where Sal started from and where he arrived it all makes a little more sense:
f(x)= √(x+4) -2
g(x)=√(x+6) +3
----------------
g(x)=f(x+2)+5

I note here from +4 to get to +6 I need +2 and from -2 to get to +3 I need a +5. Now the problem is how did he actually do it? The steps in the middle are chaotic and really not clear... • I was wondering; Why is it that in a normal number line, we would move to the right, being the positive side, but while during function shifts, we move to the left, and the other way around for the negatives? Why don't we move the same way according to the number line? • The horizontal shift took me 3 days to understand. Allow me to explain what I've concluded for those that may struggle with it.

In the first graph Sal shows, we want f(x) to add up to it's current position at +3, but have the new x actually be -1. So how do we do that? We add 4. Because for f(x+4) to equal to 3, x must be -1. f(-1+4) = 3, thus x is -1.

Hopefully I explained that well enough to make sense.  