Continuity Rules from Local Estimates
Many functions are built from simpler functions using addition, multiplication, and division. To show that such a function is continuous, it is useful to control how much its value can change when its input moves a small distance. The sum rule follows directly from the triangle inequality. The product rule also needs a local bound on one factor, while the quotient rule needs the denominator to stay away from zero near the point.
Let \((X,d)\) be a metric space, let \(a\in X\), and let \(f,g:X\to\mathbb{R}\), where \(\mathbb{R}\) has its standard metric and topology. We use the pointwise definition of continuity.
Each choice of \(\delta\) may depend on \(a\), on \(\varepsilon\), and on the function. We will use only the pointwise assumption that \(f\) and \(g\) are continuous at the point under consideration. In the examples, the reverse triangle inequality gives \(||u|-|v||\leq |u-v|\); consequently, functions built from absolute values in those examples satisfy the required continuity estimates.
The Sum and Product Rules
Proof. Let \(\varepsilon>0\). By continuity of \(f\) at \(a\), choose \(\delta_f>0\) so that \(d(x,a)<\delta_f\) implies \(|f(x)-f(a)|<\varepsilon/2\). By continuity of \(g\) at \(a\), choose \(\delta_g>0\) so that \(d(x,a)<\delta_g\) implies \(|g(x)-g(a)|<\varepsilon/2\). Set \(\delta=\min(\delta_f,\delta_g)\). If \(d(x,a)<\delta\), the triangle inequality gives \[ |(f+g)(x)-(f+g)(a)|\leq |f(x)-f(a)|+|g(x)-g(a)|<\varepsilon/2+\varepsilon/2=\varepsilon. \] This is continuity of \(f+g\) at \(a\). \(\square\)
For products, the identity \[ f(x)g(x)-f(a)g(a)=f(x)\bigl(g(x)-g(a)\bigr)+g(a)\bigl(f(x)-f(a)\bigr) \] separates the change in the two factors. The first term contains \(f(x)\), which is not automatically bounded everywhere. Continuity supplies the local bound needed.
Proof. Let \(\varepsilon>0\). Continuity of \(f\) gives \(\delta_0>0\) such that \(d(x,a)<\delta_0\) implies \(|f(x)-f(a)|<1\). Therefore \(|f(x)|\leq |f(a)|+|f(x)-f(a)|<M\), where \(M=|f(a)|+1>0\). Set \(N=|g(a)|\). By continuity of \(g\), choose \(\delta_g>0\) so that \(d(x,a)<\delta_g\) implies \(|g(x)-g(a)|<\varepsilon/(2M)\). By continuity of \(f\), choose \(\delta_f>0\) so that \(d(x,a)<\delta_f\) implies \(|f(x)-f(a)|<\varepsilon/(2(N+1))\). Let \(\delta=\min(\delta_0,\delta_g,\delta_f)\). For \(d(x,a)<\delta\), the identity above and the triangle inequality give \[ |f(x)g(x)-f(a)g(a)| \leq |f(x)|\,|g(x)-g(a)|+N|f(x)-f(a)| <\frac{\varepsilon}{2}+\frac{N\varepsilon}{2(N+1)} \leq \varepsilon. \] The last inequality holds because \(N/(N+1)<1\) for \(N\geq 0\). Thus \(fg\) is continuous at \(a\). \(\square\)
These proofs also cover zero values: if \(g(a)=0\), then \(N=0\) and the second term in the product estimate is zero. More generally, continuity is preserved by constant functions and scalar multiples: a constant has zero change, and \(|cf(x)-cf(a)|=|c|\,|f(x)-f(a)|\) for a real constant \(c\). If \(c=0\), the scalar multiple is constant; if \(c\ne0\), use the continuity estimate for \(f\) with tolerance \(\varepsilon/|c|\).
Worked Example: Adding Two Continuous Functions
In \(\mathbb{R}\) with its standard metric, let \(f(x)=|x|\) and \(g(x)=|x-2|\). Verify the sum estimate at \(a=0\) for \(\varepsilon=0.2\).
The reverse triangle inequality gives \(|f(x)-f(0)|=||x|-0|\leq |x|\) and \(|g(x)-g(0)|=||x-2|-2|\leq |x|\). Thus for each function, the choice \(\delta=0.1\) makes its change less than \(0.1=\varepsilon/2\) whenever \(|x-0|<0.1\). The sum rule gives \[ |(f+g)(x)-(f+g)(0)|\leq |f(x)-f(0)|+|g(x)-g(0)|<0.1+0.1=0.2. \]
Check: Take \(x=-0.06\), which satisfies \(|x-0|=0.06<0.1\). Then \(f(x)=|-0.06|=0.06\), \(g(x)=|-0.06-2|=2.06\), and \((f+g)(x)=2.12\). At \(0\), \((f+g)(0)=|0|+|0-2|=2\), so the actual change is \(|2.12-2|=0.12<0.2\), as required.
Worked Example: Multiplying Two Continuous Functions
Let \(f(x)=|x|\) and \(g(x)=|x-2|\) in \(\mathbb{R}\). Verify product continuity at \(a=1\) for \(\varepsilon=0.3\).
At \(1\), \(f(1)=|1|=1\) and \(g(1)=|1-2|=1\). If \(|x-1|<1\), continuity estimates give \(|f(x)-1|\leq |x-1|<1\), so \(|f(x)|<2\). Also \(|g(x)-1|\leq |x-1|\). For the other change, \(|f(x)-1|\leq |x-1|\). The product identity therefore gives \[ |f(x)g(x)-1| \leq |f(x)|\,|g(x)-1|+|f(x)-1| <2|x-1|+|x-1|=3|x-1|. \] Choose \(\delta=0.1\), which is less than \(1\). Then \(|x-1|<\delta\) implies the product change is less than \(3(0.1)=0.3\).
Check: For \(x=1.05\), \(|x-1|=0.05<0.1\). The values are \(f(x)=1.05\) and \(g(x)=|1.05-2|=0.95\), so \(f(x)g(x)=1.05(0.95)=0.9975\). The value at \(1\) is \(1(1)=1\), and the actual change is \(|0.9975-1|=0.0025<0.3\).
The Quotient Rule
Division has an additional condition. A denominator that is nonzero at \(a\) remains nonzero for all points sufficiently close to \(a\). The estimate below proves this as part of the quotient rule, rather than assuming the quotient is defined near \(a\).
Proof. Put \(c=|g(a)|>0\). By continuity of \(g\), there is \(\delta_0>0\) such that \(d(x,a)<\delta_0\) implies \(|g(x)-g(a)|<c/2\). The reverse triangle inequality then gives \(|g(x)|\geq |g(a)|-|g(x)-g(a)|>c/2\), so \(g(x)\ne0\) whenever \(d(x,a)<\delta_0\).
Let \(\varepsilon>0\). By continuity of \(f\), choose \(\delta_f>0\) such that \(d(x,a)<\delta_f\) implies \(|f(x)-f(a)|<\varepsilon c/4\). If \(f(a)\ne0\), continuity of \(g\) gives \(\delta_g>0\) such that \(d(x,a)<\delta_g\) implies \(|g(x)-g(a)|<\varepsilon c^2/(4|f(a)|)\). If \(f(a)=0\), choose any \(\delta_g>0\), for example \(\delta_g=\delta_0\), since the term involving \(f(a)\) below vanishes. Set \(\delta=\min(\delta_0,\delta_f,\delta_g)\). For \(x\in D\) with \(d(x,a)<\delta\), algebra and the triangle inequality give \[ \left|\frac{f(x)}{g(x)}-\frac{f(a)}{g(a)}\right| \leq \frac{|f(x)-f(a)|}{|g(x)|} +\frac{|f(a)|\,|g(x)-g(a)|}{|g(x)|\,|g(a)|}. \] Since \(|g(x)|>c/2\), the first term is less than \(2|f(x)-f(a)|/c<\varepsilon/2\). If \(f(a)\ne0\), the second term is less than \(2|f(a)|\,|g(x)-g(a)|/c^2<\varepsilon/2\); if \(f(a)=0\), it is zero. In either case the total is less than \(\varepsilon\). The quotient is therefore continuous at \(a\). \(\square\)
Worked Example: A Quotient with a Nonzero Denominator
In \(\mathbb{R}\), let \(f(x)=|x|\) and \(g(x)=2+|x-1|\). Verify quotient continuity at \(a=1\) for \(\varepsilon=0.1\).
We have \(f(1)=1\) and \(g(1)=2+|1-1|=2\), so the quotient at \(1\) is \(1/2\). The reverse triangle inequality gives \(|f(x)-1|\leq |x-1|\) and \(|g(x)-2|\leq |x-1|\). To ensure the denominator stays away from zero, require \(|g(x)-2|<1\); then \(|g(x)|>1\). The quotient estimate from the proof becomes \[ \left|\frac{f(x)}{g(x)}-\frac12\right| \leq \frac{|f(x)-1|}{|g(x)|}+\frac{|g(x)-2|}{2|g(x)|} <|x-1|+\frac{|x-1|}{2}. \] Thus choosing \(\delta=0.05\) ensures both \(|g(x)-2|<1\) and a quotient change less than \(1.5(0.05)=0.075<0.1\).
Check: At \(x=1.04\), \(f(x)=1.04\), \(g(x)=2+|1.04-1|=2.04\), and \(f(x)/g(x)=1.04/2.04=26/51\). The difference from \(1/2\) is \(|26/51-1/2|=|52/102-51/102|=1/102<0.1\). Also \(g(x)=2.04\ne0\).
A Common Product Pitfall
A tempting but false estimate is \[ |f(x)g(x)-f(a)g(a)|\leq |f(x)-f(a)|+|g(x)-g(a)|. \] It omits the size of the factors. For a concrete failure, take \(f(x)=g(x)=x\), \(a=1\), and \(x=3\). The left side is \(|9-1|=8\), while the right side is \(|3-1|+|3-1|=4\). Thus the proposed inequality says \(8\leq4\), which is false. The correct product identity has the factor \(|f(x)|\) in its first term and \(|g(a)|\) in its second. Continuity bounds \(|f(x)|\) near \(a\), which is why the product proof works.
The quotient condition is just as important: if \(g(a)=0\), the quotient need not even be defined at \(a\). For example, \(f(x)=1\) and \(g(x)=x\) give a quotient defined only when \(x\ne0\); there is no value \(f(0)/g(0)\). The quotient rule makes no claim at that point. When \(g(a)\ne0\), the proof shows more: there is a metric neighborhood of \(a\) on which the denominator never vanishes.
Check Your Understanding
Use the estimates and hypotheses from this tutorial to answer the following.
- If \(f\) and \(g\) are continuous at \(a\), which choice of tolerances for \(f\) and \(g\) proves the sum rule for a given \(\varepsilon>0\)?
- In the product proof, why is it necessary to obtain a local bound on \(|f(x)|\)?
- Suppose \(g(a)=0\). Does the quotient rule establish continuity of \(f/g\) at \(a\)? Explain the issue.
- For \(f(x)=|x|\) and \(g(x)=|x-2|\), find \(f(1)g(1)\) and use the product identity to bound the change near \(x=1\).
- For the quotient rule, explain how \(|g(x)-g(a)|<|g(a)|/2\) ensures that the denominator is nonzero.