In this video, I will explain
why composition of functions does not respect limits,
but it respects continuity.
What do we mean by this?
I know that the limit of a sum of functions
is the sum of the individual limits
-- assuming that the two individual limits exist --
and a similar result holds for products.
But there isn't an equivalent result for composition!
Just knowing that two functions have limits
does not guarantee the composition has a limit.
This can produce surprising examples.
Here's a challenge for you: can you construct a function f
such that the limit as x approaches 0 of f(x) is 0,
but the limit as x approaches 0 of f(f(x)) is 1?
Pause the video for a few seconds,
and think about it to understand what I am asking.
This feels a bit counterintuitive, doesn't it?
If x is close to 0, then f(x) is close to 0,
but f of IT is close to 1?
Surprisingly, it can be done.
And once you come up with the right function,
it turns out to be a simple one.
If you do not know how to solve this yet, do not worry.
Continue watching the video, and afterwards come back to the problem.
It will be easier then.
There is a pseudo-theorem that appears true intuitively,
but it is false. And that is what causes all the trouble.
Here it is.
IF I assume the limit as x approaches a of f(x) is L
AND the limit as y approaches L of g(y) is M
-- I am using y as the variable because it will come in handy later;
do not worry about it --
THEN the limit as x approaches a of g(f(x)) must be…
I want to say M
...but it isn’t.
This theorem is FALSE.
It is not a theorem; I cannot draw a conclusion in this case.
By contrast, if we care about continuity rather than only about limits,
everything works fine.
I will call this Theorem 1, and this one is true:
IF f is continuous at a AND g is continuous at f(a),
THEN g composed with f is continuous at a.
I will try to give you enough intuition to understand why this happens,
why this is natural rather than surprising.
After that I will offer two different ways
to fix the false theorem.
But first,
I want to present a counterexample to fully convince you
that the false theorem is, indeed, false.
Here is the counterexample:
I will define f(x) to be x ⋅ sin(π/x) when x is not 0,
and I will define f(0) to be 0.
Because of the sin(π ÷ x),
this function oscillates wildly as x approaches 0,
but it is sandwiched between x and -x
so it DOES have limit 0 as x approaches 0;
it can be proven with the Squeeze Theorem.
Next, I will define the function g to be 2 at 0,
and 1 everywhere else.
It looks like a constant function,
with just a hole and the "wrong" value at 0.
This function ALSO has a limit at 0; the limit is 1.
And yet, I claim that for this example,
the limit at 0 of the composition of g and f
does NOT exist.
To understand why,
it is convenient to write an explicit equation for g(f(x)).
It will be 2 for some values of x, and 1 for others.
I am going to leave the rest as an exercise;
it is very doable, and I think it is a VERY USEFUL exercise.
If you work out yourself
when the composition is 2 and when it is 1
and then use it to conclude that the limit does not exist,
it will clarify a lot what the problem with composition of limits is,
and why the false theorem is false.
So go ahead and pause the video; it will make the rest easier.
Back to comparing these two statements.
What I’ll do next is point at the CORE of the problem.
There is a way to look at this problem that helps gain intuition,
and I personally find it
much more enlightening than writing a formal proof.
I have introduced this idea before: there is a key difference
between asking for a limit to exist,
and asking for a function to be continuous.
Roughly speaking, when I say that lim_(x → a) f(x) = L,
I mean that IF x is close to a BUT NOT a, THEN f(x) is close to L.
By contrast, when I say that f is continuous at a,
I mean that
IF x is close to a, INCLUDING a, THEN f(x) is close to f(a).
Notice that, in a way, the definition of continuity
has some symmetry between the input and the output.
But the definition of limit doesn’t.
In a composition,
we are making the output of one function be the input of another,
and this lack of symmetry will cause trouble.
This observation should help us understand
why one theorem is true, and the other one is false.
Let’s look first at the actual theorem, Theorem 1.
The first hypothesis roughly means
that IF x is close to a, THEN f(x) is close to f(a).
The second hypothesis roughly means
that IF y is close to f(a), THEN g(y) is close to g(f(a)).
Now, simply concatenate the two implications:
IF x is close to a, THEN f(x) is close to f(a),
and THEN g of IT is close to g(f(a)),
Hey!
That is exactly what the conclusion means!
So the two hypotheses imply the conclusion.
THAT wasn’t too bad.
By contrast,
let’s try to do the same thing with the FALSE theorem,
and watch it fail and burn.
The first hypothesis roughly means
that IF x is close to a, but not a, THEN f(x) is close to L.
The second hypothesis roughly means
that IF y is close to L, BUT NOT L,
THEN g(y) is close to M.
And…
I cannot concatenate these two implications!
Because the "then" part in the first
does NOT match the "if" part in the second.
THAT is why the theorem is false!
Okay. If we understood that, let’s move to the last part of the video.
The theorem is false, but can I fix it?
Can I still get a conclusion about the limit of a composition
by using different hypotheses?
Yes!
There are two ways to fix the theorem. We can either:
ask for a stronger hypothesis on f, or ask for a stronger hypothesis on g.
I will call these new results Theorems 2 and 3.
First: I could ask for g to have a limit, just like before,
But then I request something stronger for f:
I need f to have limit L, and ALSO I want f(x) to NOT be L.
Think about it:
this is what was preventing us
from concatenating the two implications earlier.
When I say f(x) is not L, I need to specify FOR WHICH values of x.
I will say for all x
in an interval centered at a, except maybe at a.
I could rewrite it as mathematical symbols,
but I will leave it as words.
And with that extra condition, then yes,
I can conclude that the limit of g(f(x)), as x approaches a, is M.
THAT is Theorem 2.
Alternatively,
I can keep the original hypothesis on f: just asking that it has a limit,
and require a stronger hypothesis on g. If I ask for g to be continuous at L,
then I can also conclude that the composition has a limit.
I will call THIS Theorem 3.
Now, I advise that you try to do with these two theorems
what I did earlier with Theorem 1 and the False Theorem:
write the hypotheses as implications,
and see that they can be concatenated to end up with the conclusion.
After you do that,
you will have a VERY clear understanding of limit of compositions of functions,
of all the results that are or are not true, and why.