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.

## AP®︎/College Calculus AB

### Course: AP®︎/College Calculus AB>Unit 1

Lesson 5: Determining limits using algebraic properties of limits: limit properties

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

Finding the limit of g(h(x)) at x=-1 when the limit of h(x) at x=-1 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?

• Shouldn't it be -3 from the left, so -3^- ? • It also took me some time to understand. Basically, he is shortening the stuff.

When you take the limit of h(x) from the right-hand side (x=>1^+) you get -2.

When you take the limit of h(x) from the right-hand side (x=>1^-) you get -3.

After that when you do the same for g(h(x)) from the left and right-hand side for h(x=>-2), you will get 3 for both hand sides.

Same for the h(x)=>-3, both left and right-hand sides will be the same, with the answer of 3.

instead of doing the whole stuff he just did the desired and required stuff.
• It is confusing from while taking the LH limit of g(h(x)) as x app-1^- and equating to LH limit of g(h(x)) as h(x) app -3 #should it be -3^- or -3^+. Please answer. • It also took me a while to figure out:

When you're thinking about what h(x) is approaching, you are looking at the y (vertical) axis .
It'd be as if you tilt the whole image by 90º (to the right), or tilt your head to the left like an owl. And so, on the y axis:
"right" (+) is the upper side of the graph,
"left" (-) is the lower side of the graph.

So if you look at this graph, h(x) is approaching both -2 and -3 from the right / upper (+) side.
You don't have to look at both + and - for each. You only have to figure out where it's approaching from.

Hope that helps!
• After an initial confusion, I think I have understood the procedure, but I would like confirmation that I have done it right, because I am not sure.
Towards the end, Sal calculates the limit of h(x) as x approaches -1 from the left. That is easy: -3.
But then the complicated thing comes, because to find the corresponding limit of g(x), looks for the limit from the right (!). What I think is the following:
We have -3 we got from the previous step. But if we look at the graph, the values of y are diminishing as they approach that point. That is, -3 is approximated from above.
Now, when we plug this value in the x-axis of g(x), we need to do it in the same way, that is, from above, i.e., from the values greater than -3, which means that we are approximating from the right.
Can anybody confirm that I have understood it right? Thanks. • Stuck at h(x) -> -3+, checked the comments here and on YT, people say its + and not - because we're looking at the Y values. I thinks that's right but how do we know which value to look at? In previous videos I was under the impression that we considered the X axis when determining right hand or left hand? • I think considering the Y-axis is just for when we are doing composite functions because in a composite function, we are taking the outputs/y-values of the internal function and then using them as inputs/x-values of the external function.

For other operations such as addition, subtraction, multiplication and division, the y-values remained as y-values, they never became x-values for another function which is why it was a lot more straight forward.

Here are steps that I found from someone else (I can't seem to find their comment anymore) that really helped me understand what was going on:

1) Take the limit of the function h(x) as x -> -1 from the right

2) The OUTPUT of that function will be -1.9, -1.99, -1.999...

3) That sequence of numbers will serve as the INPUT for g(x): g(-1.9), g(-1.99), g(-1.999)...

4) Following that same series of inputs in g(x) as x -> -2 means you get closer to -2 from the RIGHT/POSITIVE side of the graph

5) Do the same thing for the left side and. we see that x seems to be approaching -3 from both sides

Hope this helps and If I made a mistake anywhere please be sure to correct me!
• This is confusing. Inputting something that does not exist into a function should yield something that does not exist. How come it actually exists? • The meaning of a limit that DNE just means that the one-sided limits are different i.e. value of the function as x approaches a from below is different from the value of the function as x approach a from values above a. But this is only true for the inner function h(x).

We know that the lim x→-1 g(h(x)) exists and is true so long if lim x→-1⁺ g(h(x)) = lim x→-1⁻ g(h(x)). We just need to prove that the one-sided limits for the composite function are the same for the limit of the composite function to exist.
The composite function is taking the output of the inner function as input.
As x→-1⁺ for h(x), the output h(x)→-2⁺. Plugging this h(x) output as the x-input into g(x), lim h(x)→-2⁺ g(h(x)) = 3

As x→-1⁻ for h(x), h(x)→-3⁺. Plugging this h(x) output as the x-input into g(x), lim h(x)→-3⁺ g(h(x)) = 3

To visualise this, I found it very helpful to visualise this on the graphs. Look at the video again, notice Sal uses the arrows in both h(x) and g(x).
As x→-1⁺, draw an arrow of h(x)→-2⁺. Now look at g(x) which takes h(x) as its x-input.
For g(x), as x (now x is h(x)) → -2⁺, g(x) = 3.
Now go back to h(x). As x→-1⁻, limit h(x) → -3⁻ and draw an arrow as h(x) → -3⁻.
Now go to g(x) which takes h(x) as its x-input, as x (now is equal to h(x)) → -3⁺, g(x) = 3

So we have proven that lim x→-1 g(h(x)) exists and is equivalent to: lim x→-1⁺ g(h(x)) = lim x→-1⁻ g(h(x)) because the one-sided limits are the same.

Avoid being overly fixated on the thought that the limit that DNE. DNE just means the one-sided limits are different. Just because the one-sided limits are different for one function does not mean that the one-sided limits of another function (which could take these different one-sided limits as input) are different.
Thus, even if a limit does not exist (one-sided limits are different) for one function, does not mean that the limit for another function who takes these different one-sided limits as input, does not exist.
• I'm in 6th grade, so this is taking a bit to comprehend. • `h(x)` has no limit as it approaches the x-position of -1. From the left side, the function seems to be approaching y = -3, while from the left side, the function seems to be approaching y = -2. Since the "left and right limits" don't match, the function doesn't have one single limit.

However, we are not focusing on the limit of `h(x)` by itself, we are focusing on the composite function `f(h(x))`. The limit of `h(x)` from the left side is -3, so plugging that into our function `f(h(x))` would result in `f(-3)` from the left side, since `h(x)` = 3 (as the function approaches -1 from the left).

The limit of `h(x)` from the right side is -2, so that would be `f(-2)`. In the graph `f(x)`, the limit of f as it approaches -2 and the limit of `f(x)` as it approaches -3 are both equal to 3, so the limit of the composite function `f(h(x))` is equal to three.

I hope you understand! If I made anything unclear, please let me know. Also, nice job taking the initiative and learning Calculus in 6th grade (I am learning it early too)!
• What happens when you get two different answers for both the g(h(x))? • So why can you not just sub x = -1 into h(x), since the value is defined in the function? h(-1) is defined as -3, so finding lim x→-1 g(-3) is 3. Unless I'm missing something here?

I understand that if you are instead operating on g[lim x→-1 h(x)] then the limit doesn't exist. But it seems like an unnecessary step in this case. Sal even states in a previous video that:

lim x→-1 g(h(x)) = g[lim x→-1 h(x)], only if:

- lim x→-1 h(x) exists (it doesn't); and
- g(x) is continuous at L. Which when you work it out g(-3) = L is not continuous.

From what I've been researching, it seems that for lim x→-1 g(h(x)) to exist, the limit for h(x) must also exist. From study.com:

Find the limit of the inner function. If the limit of the inner function at a given value is undefined, then the limit of the composite function is undefined also.

Does that means you cannot simply sub x into h(x), and you must instead use lim x→-1 h(x)? If this is the case, then it's a little confusing as I haven't seen that fact explained on Khan Academy. • lim 𝑥→−1 ℎ(𝑥) ≠ −3

In other words, 𝑥 → −1 ⇏ ℎ(𝑥) → −3

Thus, lim 𝑥→−1 𝑔(ℎ(𝑥)) ≠ lim ℎ(𝑥)→−3 𝑔(ℎ(𝑥)) = lim 𝑥→−3 𝑔(𝑥)

– – –

By the way...

"If the limit of the inner function at a given value is undefined, then the limit of the composite function is undefined also."

That is NOT necessarily true, which Sal basically showed in the video.

As another example, take the functions
ℎ(𝑥) = −1 for 𝑥<0, 1 for 𝑥≥0
𝑔(𝑥) = 𝑥²

Then 𝑔(ℎ(𝑥)) = 1
and lim 𝑥→0 𝑔(ℎ(𝑥)) = 1
even though lim 𝑥→0 ℎ(𝑥) is undefined.

If you could provide a link to that article I'd very much appreciate it.
• In the video I think there was a mistake. Where it is approaching -1 from the left h is approaching-3 the values are less not greater but the solution is right but the terminology is wrong. Am I right?  