# Box 3.1: Proof -- Continuity of Composite Functions Let's suppose that we have two real functions of a real variable, f(x) and g(x). Since they are both real functions of a real variable, we can form the composite function, f(g(x)), which is simply the operation of applying g to x, then applying f to the result.

Let's also suppose that g(x) is continuous at a particular point,  x = a, and that f(x) is continuous at the point,  x = g(a).

We shall prove that f(g(x)) is continuous at  x = a.

By the limits definition of continuity, we know that:

```   lim   g(x)  =  g(a)                                          eq. 3.1a-1a
x  > a
```
and
```   lim   f(x)  =  f(g(a))                                       eq. 3.1a-1b
x  > g(a)
```
What we would like to prove is:
```   lim   f(g(x))  =  f(g(a))                                    eq. 3.1a-2
x  > a
```
If you don't understand how I came up with 3.1a-1a through 3.1a-2, then you should review section 3.0 carefully, paying special attention to what the limit definition of continuity means. These three equations can be derived simply by symbol substitution from 3.0-1 or 3.0-2. 3.1a-1a is straightforward. In 3.1a-1b, we are saying that as x gets close to g(a), f(x) gets close to f(g(a)). In 3.1a-2 we are saying that we would like to show that as x gets close a, f(g(x)) gets close to f(g(a)) -- in other words, that 3.1a-2 is an inescapable consequence of 3.1a-1a and 3.1a-1b.

As always, we return to our contract interpretation of limits. The contract for 3.1a-1a is: for any  eg > 0  you might name, no matter how small, I can name a  dg > 0  such that:

```   |g(x) - g(a)|  £  eg                                          eq. 3.1a-3a
```
whenever  |x - a| £ dg. In other words, you tell me how close g(x) has to be to g(a), and I can tell you how close to make x to a to make that come true.

Likewise, the contract for 3.1a-1b is: for any  ef > 0  you name, no matter how small, I can name a  df > 0  such that:

```   |f(x) - f(g(a))|  £  ef                                      eq. 3.1a-3b
```
whenever  |x - g(a)| £ df. In other words, you tell me how close f(x) has to be to f(g(a)) and I can tell you how close to make x to g(a) to make that come true.

Now suppose that you name an epsilonf > 0, and you tell me that you want me to come up with a deltag > 0 such that:

```   |f(g(x)) - f(g(a))|  £  ef                                   eq. 3.1a-4
```
whenever  |x - a| £ dg.

Well, 3.1a-3b says I already have a recipe to go from ef to a df that satisfies the conditions given there. Then I can say, set eg equal to the df I got from that recipe. Now 3.1a-3a says I already have a recipe to go from any eg to a dg that satisfies the conditions given there. But the "whenever" part of that contract is the same as the "whenever" part of the contract I'm trying to prove (i.e. 3.1a-4). So, overall, I have given you a recipe to go from any ef that you might name to a dg that satisfies 3.1a-4. You have said you would like f(g(x)) to be within ef of f(g(a)), and I have given you a recipe to find how close x needs to be to a to make that so, that is I have told you how to find dg. That such a recipe exists is what I was trying to prove.

If you are still unsteady on delta-epsilon proofs, keep at it. If you can't seem to get this one, then go back to some others that we did previously and review. Then tackle this one again. Also try reading the proofs out loud. That often helps. And remember, the likelihood of a delta-epsilon proof turning up on an exam is high.