# Proof that if f and g are continuous functions, then f/g is also continuous (as long as g(x) ≠ 0)

In almost any calculus or analysis textbook, in the chapter on continuity of functions, you’ll encounter four theorems about the operations on functions that preserve continuity: multiplying a continuous function by a scalar (real number), adding two continuous functions, multiplying two continuous functions, and dividing two continuous functions. But no textbooks that I have seen, nor websites nor lecture notes nor study guides nor homework solutions nor Stack Exchange questions nor anything else I’ve found online, have the proof to the last one! On the chance that I can add something new to the internet for the first time, here is the proof that Professor Yuri Ledyaev did in my Advanced Calculus (introductory real analysis) class at Western Michigan University:

Let $$f, g$$ be two continuous functions with domain $$A \subset \mathbb{R}$$ and let $$a \in A$$. Let $$g(a) \neq 0$$. Then $$f/g$$ is also continuous at point $$a$$. The proof is nearly identical if $$A \subset \mathbb{R}^n$$ —which is in fact the way we did the proof, in the first chapter on functions of multiple variables—but there’s no way I’m typing every single $$x$$ and $$a$$ in vector form in Latex. Just imagine they’re all bold or they have a little line over them, and imagine that the $$\left|~x-a~\right| < \delta$$ are all $$\vec{x} \in B_\delta \vec{a}$$.

Proof: For the function $$f/g$$ to be continuous, this means
$$\lim_{x \to a} \frac{f(x)}{g(x)} = \frac{f(a)}{g(a)}.$$

The way to prove this equality is to apply the Cauchy definition of continuity, i.e., $$\forall \epsilon > 0$$, $$\exists \delta > 0$$ such that if $$\left|~x – a~\right| < \delta$$, then $$\left|~\frac{f(x)}{g(x)} - \frac{f(a)}{g(a)}~\right| < \epsilon$$. To obtain this inequality, we start with the latter absolute-value expression, get a common denominator, use the ol' add-and-subtract-the-same-thing trick, and apply the fact that both $$f$$ and $$g$$ are individually continuous. Observe: $$\begin{eqnarray} \left|~\frac{f(x)}{g(x)} - \frac{f(a)}{g(a)}~\right| &=& \frac{\left|~f(x)g(a) - f(a)g(x)~\right|}{\left|g(x)~\right| \left|~g(a)~\right|} \nonumber\\[13pt] &=& \frac{\left|~f(x)g(a) - f(a)g(a) + f(a)g(a) - f(a)g(x)~\right|}{\left|~g(x)~\right| \left|~g(a)~\right|} \nonumber \\[13pt] &\leq& \frac{\left|~f(x)g(a) - f(a)g(a)~\right| + \left|~f(a)g(a) - f(a)g(x)~\right|}{\left|~g(x)~\right| \left|~g(a)~\right|} \nonumber \\[13pt] &=& \frac{\left|~g(a)~\right| \left|~f(x) - f(a)~\right| + \left|~f(a)~\right| \left|~g(x) - g(a)~\right|}{\left|~g(x)~\right| \left|~g(a)~\right|} \nonumber \\ \end{eqnarray}$$ (The $$\leq$$ comes from the Triangle Inequality.) Now, we have to interrupt our equation display to make use of the fact that $$g$$ is continuous. Since $$g$$ is continuous, we can let $$\epsilon_{\small{1}} = \frac{1}{2} \left|~g(a)~\right| > 0$$. Then there exists $$\delta_{\small{1}}$$ such that whenever $$\left|~x-a~\right|<\delta_{\small{1}}$$, $$\begin{eqnarray} \left|~g(a)~\right| - \left|~g(x)~\right| &\leq& \left|~g(x) - g(a)~\right| < \epsilon_{\small{1}} \nonumber \\[13pt] \left|~g(a)~\right| - \epsilon_{\small{1}} &<& \left|~g(x)~\right| \nonumber \\[13pt] \frac{1}{2} \left|~g(a)~\right| &<& \left|~g(x)~\right| \nonumber \\[13pt] \frac{2}{\left|~g(a)~\right|} &>& \frac{1}{\left|~g(x)~\right|} \end{eqnarray}$$
(Again the $$\leq$$ in this equation display is due to (one form of) the Triangle Inequality.)

Applying this inequality to the $$\left|~g(x)~\right|$$ in the denominator up above gives us
$$\begin{eqnarray} \frac{\left|~g(a)~\right| \left|~f(x) – f(a)~\right| + \left|~f(a)~\right| \left|~g(x) – g(a)~\right|}{\left|~g(x)~\right| \left|~g(a)~\right|} \nonumber \\[13pt] < \frac{2}{\left|~g(a)~\right|^2} \cdot \Big[ \left|~g(a)~\right| \left|~f(x) - f(a)~\right| + \left|~f(a)~\right| \left|~g(x) - g(a)~\right| \Big] \nonumber \\[13pt] = \frac{2}{\left|~g(a)~\right|} \left|~f(x) - f(a)~\right| + \frac{2\left|~f(a)~\right|}{\left|~g(a)~\right|^2} \left|~g(x) - g(a)~\right| \nonumber \\[13pt] \end{eqnarray}$$

(I apologize for the funky appearance of that last equation display; I’m not good enough with Latex…or WordPress or anything else, for that matter…to make those long expressions all fit into the allowable space; the right side always went over into the sidebar.)

Now, since $$f$$ is continuous, we know that for any $$\frac{\epsilon}{2}$$, there exists $$\delta_2$$ such that making $$\left|~x – a~\right| < \delta_2$$ will make $$\left|~f(x) - f(a)~\right| < \frac{\epsilon}{2}\cdot\frac{\left|~g(a)~\right|}{2}$$.

Similarly, since $$g$$ is continuous, there exists $$\delta_3$$ such that making $$\left|~x – a~\right| < \delta_3$$ will make $$\left|~g(x) - g(a)~\right| < \frac{\epsilon}{2}\cdot\frac{\left|~g(a)~\right|^2}{2\left|~f(a)~\right| + 1}$$. (The $$+1$$ must be added in case $$f(a) = 0$$.)

Finally, we simply choose $$\delta = \min{\{\delta_1, \delta_2, \delta_3\}}$$, and this will give us

$$\begin{eqnarray} \left|~\frac{f(x)}{g(x)} – \frac{f(a)}{g(a)}~\right| &<& \frac{2}{\left|~g(a)~\right|} \left|~f(x) - f(a)~\right| + \frac{2\left|~f(a)~\right|}{\left|~g(a)~\right|^2} \left|~g(x) - g(a)~\right| \nonumber\\[13pt] &<& \frac{\epsilon}{2} + \frac{\epsilon}{2} = \epsilon \end{eqnarray}$$ $$\tag*{\blacksquare}$$ To summarize, this proof showed that if $$f$$ and $$g$$ are continuous, then for any $$\epsilon > 0$$, letting $$\left|~x-a~\right| <\delta$$ will make $$\left|~\frac{f(x)}{g(x)} - \frac{f(a)}{g(a)}~\right| < \epsilon$$, meaning $$\frac{f(x)}{g(x)}$$ is continuous at $$x=a$$. (This post has been edited to correct a mathematical error found by L. Anderson; see comments.)

This entry was posted in Math, Theorems. Bookmark the permalink.

### 3 Responses to Proof that if f and g are continuous functions, then f/g is also continuous (as long as g(x) ≠ 0)

1. L. Anderson says:

The inequality above which follows the statement beginning with the words “Applying this inequality to the |g(x)| in the denominator…” appears to have a mistake on the right side. I don’t think you meant to divide the expression in the numerator by |g(x)||g(a)|.

2. John says:

Thanks. I’ll have a look at it this week if I can.

3. John says:

Ah! You’re right! It’s fixed now (along with other, aesthetic issues).

For anyone who might come here wondering what the error was, after I established that $$\frac{2}{\left|~ g(a)~\right|} > \frac{1}{\left|~g(x)~\right|}$$, I meant to replace the $$\left|~g(x)~\right| \left|~g(a)~\right|$$ from the earlier denominator with $$\left|~ g(a)~\right|^2$$, except I accidentally left the $$\left|~g(x)~\right| \left|~g(a)~\right|$$ there for one step while still including the $$\left|~ g(a)~\right|^2$$.

It was a silly, obvious mistake that any slight scrutiny would have discovered, so I’m not the least bit surprised I made it. (In my defense, this was probably just a copy-pasta error, as I went back to my lecture notes and found that I didn’t make the same mistake there.)