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.

# Limits of composite functions: external limit doesn't exist

Finding the limit of g(h(x)) at x=1 when the limit of h(x) at x=1 is 2 and the limit of g(x) at x=2 doesn't exist. Does it mean that the composite limit doesn't exist? Not necessarily! See how we analyze it. Created by Sal Khan.

## Want to join the conversation?

• I am lost in the last part of the video here.
I see the limit of h(x) is 2, both from the left and from the right.
Then, we pass the 2 to g(x), and the limit of g(x) as x approaches 2 from the left is clearly -2, as Sal says.
But then, when x approaches 2 from the right, the limit should be 0, but instead Sal is approaching it again from the left getting the result of -2, again.
Why is Sal approaching it again from the left instead of from the right?
Thanks.
• Let's look at actual values that approach 1 and see what happens.

so we are looking at limit of g(h(x)) as x approaches 1. So let's make a table. I think I only need to explain the approaching fromt he right so that is all I will write

g(h(4)) = g(0) = 2
g(h(3)) = g(1) = 0
g(h(2)) = g(1.5) = -1

So as you see, as x goes down, or approaches fromt he right, h(x) goes up. So when we look at g(h(x)) x is decreasing and h(x) is increasing which means the "x axis" in g(h(x)) which we can call the h(x) axis in this instance to make it make more sense is approaching from the left.

If that doesn't make sense you can think of following it with your finger. starting at g(h(0)) your finger is on (0,2) and as x decreases you actually move your finger to the right along the graph. This is the exact same as increasing x from below 1. At least from (-1,-2) in h(x)

Another another way to think about it is that in h(x) y is increasing weather you approach x from the let or right. Since y is increasing on both sides it's basically following the same path. So that means you are following the same path, that is appraching from the left, when you do g(h(x)). maybe it would be more clear to think of it as g(y)

I really hope something there helped.

Really quick, if you think h(0) = 0 = h(4) so if you increase x from 0 to 1 h(x) changes from 0 to 2, and x going from 4 to 1 is ALSO making h(x) go from 0 to 2. so in g(h(x)) fom both diretion you are inputting h(x) from 0 to 2
• "2 from below"? What does that even mean?? I keep hearing below yet he keeps on drawing a horizontal line towards 2.
• The graph of h(x) kind of looks like a mountain to me, so that's the analogy I'm going to use.

2 is the peak of the mountain, and we want to go towards it. Since 2 is the peak, and we're not there yet, we have to be under it. So "approaching 2 from below" means this: we're getting closer to 2, but we're somewhere under 2.

Now let's imagine this graph flipped, so that it looks like a valley. Same idea: we're trying to get to the bottom of the valley. This valley is the lowest point around, so if we're getting really close to it, we have to be coming from a higher point. So "approaching 2 from above" would mean that we're getting closer to 2, but we're somewhere over 2.

Sal drew a horizontal arrow for a good reason: sometimes, direction matters. What if we were taking the limit of h(x) as x→0? Here we can imagine we're on the side of the mountain. If we're coming from the left, we're below what we want to get to. If we're coming from the right, we're above what we want to get to. Therefore, if we were coming from the left, we would be "approaching from below", but if we were coming from the right, we would be "approaching from above".

Now that I think about it, he probably should have drawn a diagonal line following the graph instead, to indicate that we're going up as well as horizontal, but oh well. Hope this cleared it up instead of making it even more confusing.
• The last part of the video makes no sense to me.

If you had a standard parabola like y=-x^2, then from the right-hand side, it would be approaching from below. But if you were asked to find lim x->0+ (-x^2), you would still go from the right, even though it is decreasing ("coming from below") on that side.

Like, say you had a composite function, wherein y=-x^2 was true for x>0, and y=-x^2+1 was true for x<0. In that case, both sides are coming from "below," therefore telling you to take lim x->0- could be either 1 or 0, and limx->0+ wouldn't exist. But that doesn't make any sense.

Am I missing something?

I'm so confused.

In previous videos, it's always been true that the +/- distinction for one-sided limits is in reference to the x values, not the y. This is the only way it makes sense because the function can be increasing/decreasing on both or either side regardless of whether it is on the right or left, so using approaching from below/above rather than left and right would make the rule that both one sided limits must exist and be equal to each other for the limit to exist no longer make sense and it's not what you've been doing for this entire course.

None of the comments answering similar questions make sense because all they do is repeat what was in the video by saying that he's coming from below.

Is it that f(g(x)) is, in a way, a new function, to be understood as semi-independent from f(x) and g(x), such that if you were to graph inputs and outputs it would form a new graph where that would be true somehow?
• I have the same concern as other who mentioned it. There is no consistency in this example as the approach goes on different directions. I assume that the analysis when the start from the left side (for both functions) must be equal to the analysis from the RIGHT side (for BOTH functions too). The exercise was going well until the last part there was a mix between left and right approaches and this way doesn't show consistency on the analysis. From my perspective, there is a mistake and the composite limit doesn't exist.
• There is no mistake. The limit does exist, but I agree that Sal's explanation is a bit poor. Here's an explanation I gave to a couple of other commenters:

First, see h(x). When we're approaching h(x) = 2, we're doing so from values lesser than 2 (In other words, think of h(x) = 2 as the top of a mountain. See that as we approach x = 1 from either side, we're climbing the mountain, not descending it).

Now, onto g(h(x)). Now, this function's input itself is h(x). As h(x) approaches 2 from values less then 2 in both cases, we approach 2 on the graph of g(x) twice from only the left. As we approach the same number (because we're literally retracing our path), we get that the limits are equal.
• At why is it approaching from above and below and not from the left and right limits? Isn't that what you're supposed to do to find the limit for x -> 1?
• pay attention that the y value of h(x) is the x value of g(x) so approaching 1 in h(x) gives us y=2 then the input of g(x) is 2. so now we want to approach 2 in g(x) and we know from h(x) that to approach 2 we approach 1 which is less than 2 (with respect to g(x)). To get my point read this reply more than one time, try to visualize this or draw it in from of you.
• Hey, I've seen many people ask this question already but the responses have been a bit confusing to me. Until this point in these Khan Academy lessons, the concept of "approaching from below" hasn't been mentioned, which seems to be tripping me up. In the h(x) graph, as you approach 1 from either the left or the right side, the y-value approaches 2. So let's say we start with approaching 1 from the left. Well, in that case, the corresponding y-value is obviously still 2, and so when we go back to the g(x) graph, we would have to find the value when x = 2, and the graph approaches this value from THE LEFT. until this point it all made sense. But then when it came to approaching 1 from the right side, Sal Khan approaches 2 on the g(x) graph from the left again. Shouldn't he have approached 2 from the RIGHT side? Please give me a very simple and straightforward answer otherwise I'll get confused LOL
• Hey there! Let's make sure we're on the same page before we dive into this. When we talk about approaching a value from the left, it means we're moving towards it in the x-direction from a value that is less than it (for example, 0 -> 1 -> 2). On the other hand, approaching a value from the right means we're moving towards it in the x-direction from a value that is greater than it (for example, 4 -> 3 -> 2). The same goes for approaching a value from below (less) or above (greater) but in the y-direction.

Now, let's take a closer look at function h. As we get closer to 1 from either side, the y-value approaches 2 from below. This is important because the y-value of function h passes to function g as the x-value. So, as we approach 2 from below (less) on the h graph, we'll approach 2 from the left (less) on the g graph. That's why Sal approached 2 on the g graph from the left for both cases. No matter which side we approach x on the h graph, we'll approach 2 from below (which is from the left in the x-direction).
• I see what you are doing here and I follow up but it isn't clear how to apply this, what the rule is or when to use it.
• From what I gather the rule is that (going back to the previous video the internal limit doesn't exist) when one of them seems to not exist, whether it be the inside or outside (so the g part of g(h(x)) or the h part of g(h(x))) you should instead break it down and look at the seemingly undefined one and split it into what you would get by approaching from values to the left and then values to the right. Plug both of those in and then find the answer for each of them. If they are the same then that's the answer.
So...
When to use it: When one of them is seemingly undefined/doesn't exist
The rule: Break the one that is undefined/doesn't exist into what you get by approaching from the left then what you get by approaching from the right
How to apply it: If one of them is undefined, use the rule and solve that way. If you end up with the same two answers then that is your limit for g(h(x)).

I hope this makes sense
• I wish this was explained better, I have absolutely no idea how this "approaching from below" thing works. I cannot make sense of any of the comments down here either. Why aren't we approaching g(h(x)) from the right in the last part? Why did he do it twice from the left?
• I'll try to explain this as simply as possible. First, see h(x). When we're approaching f(x) = 2, we're doing so from values lesser than 2 (In other words, think of f(x) = 2 as the top of a mountain. See that as we approach x = 1 from either side, we're climbing the mountain, not descending it).

Now, onto g(h(x)). Now, this function's input itself is h(x). As h(x) approaches 2 from values less then 2 in both cases, we approach 2 on the graph of g(x) twice from only the left. As we approach the same number (because we're literally retracing our path), we get that the limits are equal.

I do agree that this concept could've been explained better. See if this helps! :)
• Ngl This is kinda stupid or maybe im dumb because i dont know how to proof it. So does that mean we also just choose how our limit is? what happens if it is the opposite case and we want the limit that approaches g(x) from the right, do we just always take the h(x) rising or can we just choose apparently now?