Algebra (all content)
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?
- at2:23, 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?(24 votes)
- there isn't a rule that you follow for subtracting and adding the horizontal shift and vertical shift, it just depends on what directions you went on the graph.(6 votes)
- 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 ?(9 votes)
- 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 at5:53by substituting for *f(x)=sqrt(x+4)-2 with the expression for g(x)= f(x+2)+5.
~and since f(x+2+5)=g(x)*
I hope I cleared something up instead of messing you up more.(10 votes)
- 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?(9 votes)
- well this is what i think , if you substitute the value x with 2 then you will be subtracting the two marbles that you did not even count on together with the other ones.(2 votes)
- I can not visualise this 'negative' for vertical and 'positive' for horizontal. Can someone explain? Why we are shifting like this?(4 votes)
- Could you be a little more specific with "negative for vertical" and "positive for horizontal"? I don't quite understand what you are asking. Or maybe you could give me a timestamp from the video you are watching, so I can help you?(9 votes)
- 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!(4 votes)
- 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.(6 votes)
- At4:45, why does Sal shift the blue line ( I honestly don't know what we call it ). Can't we shift the pink one?(4 votes)
- 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 !(3 votes)
- 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?(3 votes)
- I was wondering what would happen if the slope changed to a negative or other integer. On my homework, they have a reflected quadratic graph. But when I use the technique that Sal's showing, the slope gets left out...(3 votes)
- In a polynomial system, there is no defined, stable slope. The closest of a slope in a polynomial graph is the derivative; however, that is later on in the year.
So just to like set this out clear right,
f(x) = x² is not a linear equation where you can get a stable slope. It's a polynomial.
I hope I understood you're question correctly. If not please lmk(3 votes)
- Hi, it is first time I do math online . I can't figure out the format for typing my answers.
I am going back to school in the fall and my class is given only online. I am not very good with computers, and I am really freaking out. Is there tutorials for this?(2 votes)
- You are in luck. There is a page in the help section called "How do I enter math symbols in an exercise?"
Try looking at : https://khanacademy.zendesk.com/hc/en-us/articles/202896260-How-do-I-enter-math-symbols-in-an-exercise-(5 votes)
- 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.(3 votes)
- [Voiceover] So we have these two graphs that look pretty similar, y equals f of x and y is equal to g of x. And what they asked us to do is write a formula for the function g in terms of f. So let's think about how to do it and like always pause the video and see if you can work through it on your own. All right, well, what I'd like to do is I'd like to focus on this minimum point because I think that's a very easy thing to look at because of them have that minimum point right over there. And so we can think, but how do we shift f? Especially this minimum point, how do we shift it to get to overlapping with g? Well, the first thing that might jump out of this is that we would want to shift to the left. And we'd wanna shift to the left four. So let me do this in a new color. So I would wanna shift to the left by four. We have shifted to the left by four or you could say we shifted by negative four. Either way, you could think about it. And then we're gonna shift down. So we're gonna shift, we need to go from y equals two to y is equal to negative five. So let me do that. So let's shift down. So we shift down by seven or you could say we have a negative seven shift. So, how do you express g of x if it's a version of f of x that shifted to the left by four and shifted down by seven. Or, you could say I have a negative four horizontal shift. I have a negative seven vertical shift. Well, one thing to think about it is g of x, g of x is going to be equal to f of, let me do it in a little darker color, it's going to be equal to f of x minus your horizontal shift, all right, horizontal shift. So x minus your horizontal shift plus your vertical shift. So plus your vertical shift. Well, what is our horizontal shift here? Well, we're shifting to the left so it's a negative shift. So our horizontal shift is negative four. Now, what's our vertical shift? Well, we went down so our vertical shift is negative seven. So it's negative seven. So there you have it. We get g of x. Let me do that in the same color. We get g of x is equal to f of x minus negative four or x plus four and then we have plus negative seven or you can just say minus seven. And we're done. And when I look at things like this, the negative seven is somewhat, it's more intuitive to me. As I shifted it down, it made sense that I have a negative seven. But first, when you work on these, you say, "I shifted to the left. "Why is it a plus four?" And though I think about it is in order to get the same value out of the function, instead of inputting, so if you want to get the value of x of zero, you now have to put x equals negative four in. And then you get that same value. You still get to zero. So that's, I know if that helps or hurts in terms of your understanding, but it often helps to try out some different values for x and see how it actually does shift the function. And if you just try to get your head on this piece, the horizontal shift, I recommended, you know, not even using this example. Use an example that only has a horizontal shift. It will become a little more intuitive. And we do, we have many videos that go into much more depth that explain that. Let's do another example of this. So here, we have y is equal to g of x in purple and y is equal to f of x in blue. And they say given that f of x is equal to square root of x plus four minus two, write an expression for g of x in terms of x. So first, let's me just try to, expression for g of x in terms of f of x. We can see once again, it's just a shifted version of f of x. And remember, I'll just write it in general. So g of x is going to be equal to f of x minus your horizontal shift plus your vertical shift. And so to go from f to g, what is your horizontal shift? Well, your horizontal shift is, if you take this point right over here, which should map to that point once we shift everything. Your horizontal shift is two to the left or you could say it's a negative two horizontal shift. So that should be negative two. And then, what is a vertical shift? Well, a vertical shift is removed, we go from y equals negative two to the y equals three. So we're shifting five up. So this is a vertical shift of positive five. So your vertical shift is five. So if we just want to write g of x in terms of f of x like we just did in the previous example, we could say g of x is going to be equal to f of x minus negative two which is x plus two. And then we have plus five. But that's not what they asked us to do. They asked us to write. They, whoops. They asked us to write an expression for g of x in terms of x. And so here we're actually gonna use the definition of f of x. So let me make it clear. We know that f of x is going to be equal to square root of x plus four minus two. So given that, what is f of x plus two? Well, f of x plus two is going to be equal to, everywhere we see an x, we're gonna replace it with an x plus two. Square root of x plus two plus four minus two which is equal to the square root of x plus six minus two. Well, that's fair enough. That's just f of x plus two. Now, what is f of x plus two plus five? So f of x plus two plus five is going to be in this thing right over here plus five. So it's going to be equal to square root of x plus six minus two and I'm going to add five, with a different color. So plus five, so plus five. And so what we end up with is going to be square root of x plus six minus two plus five is going to be plus three. So that is equal to g of x. Just as a reminder, what do we do here? First, I expressed g of x in terms of f of x. Let's say, hey, to get from f of x to g of x, I shift two to the left. Two to the left. So we're kinda intuitive, plus two makes it a shift of two to the left. This was minus two would be shifted two to the right. But like I just said in the previous example, it's good to try it some x's and to see why that makes sense. And then we shifted five up. So this was g of x in terms of f of x. Then they told us what f of x actually is in terms of x. So we said, "Okay, well, what is f of x plus two?" F of x plus two, we substituted x plus two for x and we got this. But g of x is f of x plus two plus five. So we took what we figured out f of x plus two is and then we added five and that's what g of x is. And then we are all done.