2.7 Continuous Function

We now seek the gold standard. We want to isolate the functions whose values do not jump and do not present unexpected “holes”.

Definition 2.7.1 (Continuity at a Point).

We say a function ff is continuous at a point aa if the following three conditions are satisfied:

  1. 1.
    ​

    a∈dom⁡(f)a\in\operatorname{dom}(f) (The function must actually be defined at aa).

  2. 2.
    ​

    limx→af⁢(x)\lim_{x\to a}f(x) exists (The values must converge to a single destination).

  3. 3.
    ​

    limx→af⁢(x)=f⁢(a)\lim_{x\to a}f(x)=f(a) (The destination must exactly match reality).

As is common in mathematics, it pays to have multiple perspectives on a single concept. Depending on the problem at hand, we can recast this definition into equivalent forms.

Proposition 2.7.2.

The following statements are equivalent to ff is continuous at aa:

  1. 1.
    ​

    The Limit Definition: a∈dom⁡(f)a\in\operatorname{dom}(f) and limx→a−f⁢(x)=limx→a+f⁢(x)=f⁢(a)\lim_{x\to a^{-}}f(x)=\lim_{x\to a^{+}}f(x)=f(a).

  2. 2.
    ​

    The ε\varepsilon-δ\delta Definition: a∈dom⁡(f)a\in\operatorname{dom}(f), and for each ε>0\varepsilon>0, there exists a δ=δ⁢(a,ε)>0\delta=\delta(a,\varepsilon)>0 such that

    |f⁢(x)−f⁢(a)|<εwhenever0<|x−a|<δ.\left\lvert f(x)-f(a)\right\rvert<\varepsilon\quad\text{whenever}\quad 0<\left% \lvert x-a\right\rvert<\delta.
Caveat (A Subtlety in the ε\varepsilon-δ\delta Formulation).

The restriction 0<|x−a|<δ0<\left\lvert x-a\right\rvert<\delta is a legacy inherited from the definition of a limit (which intentionally ignores the behavior exactly at the point x=ax=a). However, because continuity demands that the limit equals f⁢(a)f(a), the inequality |f⁢(x)−f⁢(a)|<ε\left\lvert f(x)-f(a)\right\rvert<\varepsilon is trivially satisfied when x=ax=a (since 0<ε0<\varepsilon). Thus, for continuity, one often sees the simpler implication: |x−a|<δ⟹|f⁢(x)−f⁢(a)|<ε\left\lvert x-a\right\rvert<\delta\implies\left\lvert f(x)-f(a)\right\rvert<\varepsilon.

Example 2.7.3.

Consider the simple parabola f⁢(x)=x2f(x)=x^{2}. Let us verify its continuity at x=1x=1. We showed in Example 2.5.3 that limx→1x2=1\lim_{x\to 1}x^{2}=1. On the other hand, direct evaluation yields f⁢(1)=12=1f(1)=1^{2}=1. Since the limit and the function value coincide, i.e., limx→1f⁢(x)=f⁢(1)\lim_{x\to 1}f(x)=f(1), we conclude that f⁢(x)=x2f(x)=x^{2} is continuous at x=1x=1.

Moral (The Secret of Limits).

If you know a priori that ff is continuous at aa, then the arduous task of finding the limit limx→af⁢(x)\lim_{x\to a}f(x) is entirely equivalent to merely calculating f⁢(a)f(a). In fact, the whole business of evaluating limits in practice is largely an exercise in reducing complex expressions to known continuous functions!

For instance, consider f⁢(x)=xf(x)=\sqrt{x}. We know it is continuous on [0,∞)[0,\infty). Therefore, for any a>0a>0, evaluating the limit is as effortless as substitution:

limx→ax=a.\lim_{x\to a}\sqrt{x}=\sqrt{a}.

2.7.1 Global Continuity and the Limit Cheat Codes

The whole business of finding limits is ultimately a reduction to continuous functions.

— A guiding philosophy of Calculus

We can extend this local, point-wise property to a global property over an entire domain.

Definition 2.7.4 (Continuity on an Interval).

A function ff is continuous on an open interval (a,b)(a,b) if it is continuous at every point in that interval. In particular, if (a,b)=(−∞,∞)(a,b)=(-\infty,\infty), we say ff is continuous everywhere.

For ff to be continuous on a closed interval [a,b][a,b], ff must be continuous on the interior (a,b)(a,b), and in addition, it must respect the boundary values via its one-sided limits:

limx→a+f⁢(x)=f⁢(a)andlimx→b−f⁢(x)=f⁢(b).\lim_{x\to a^{+}}f(x)=f(a)\quad\text{and}\quad\lim_{x\to b^{-}}f(x)=f(b).
Intuition.

Geometrically, a continuous function on an interval corresponds to a graph that you can draw as a single, unbroken curve without lifting your pen. There are no holes, jumps, or vertical asymptotes.

To practically evaluate limits using our guiding philosophy above, we need an arsenal of continuous functions.

Theorem 2.7.5.

The following families of functions are continuous everywhere on their respective domains:

  1. 1.
    ​

    Polynomials: p⁢(x)=an⁢xn+an−1⁢xn−1+⋯+a1⁢x+a0p(x)=a_{n}x^{n}+a_{n-1}x^{n-1}+\dots+a_{1}x+a_{0}.

  2. 2.
    ​

    Rational Functions: r⁢(x)=p⁢(x)q⁢(x)r(x)=\frac{p(x)}{q(x)} (where q⁢(x)≠0q(x)\neq 0).

  3. 3.
    ​

    Radicals and Powers: f⁢(x)=xnf(x)=\sqrt[n]{x}, and more generally f⁢(x)=xαf(x)=x^{\alpha} for α∈ℝ\alpha\in\mathbb{R}.

  4. 4.
    ​

    Trigonometric Functions: sin⁡x\sin x, cos⁡x\cos x, tan⁡x\tan x, cot⁡x\cot x, etc., and their inverses sin−1⁡x\sin^{-1}x, cos−1⁡x\cos^{-1}x, etc.

  5. 5.
    ​

    Exponentials and Logarithms: ex\mathrm{e}^{x}, bxb^{x}, log⁡x\log x, logb⁡x\log_{b}x, etc.

An important detail is the domain. For example f⁢(x)=x2f(x)=x^{\sqrt{2}} is continuous on dom⁡(f)=[0,∞)\operatorname{dom}(f)=[0,\infty), but is not defined outside this interval, let alone continuous.

Exercise 2.7.6.

For the curious minds: Use the formal ε\varepsilon-δ\delta definition to prove the continuity of these families. (Hint: A good starting point is proving that sin⁡x\sin x and cos⁡x\cos x are continuous everywhere via trigonometric identities).

Let us see our limit cheat code in action. What happens when our point of interest lies smoothly inside the domain?

Example 2.7.7.

Evaluate limx→1x+1x3+1\displaystyle\lim_{x\to 1}\frac{x+1}{x^{3}+1}.

Solution.

Let r⁢(x)=x+1x3+1r(x)=\frac{x+1}{x^{3}+1}. This is a rational function. We must first determine its domain. The denominator vanishes when x3+1=0x^{3}+1=0, which implies x3=−1x^{3}=-1, or x=−1x=-1. Thus, the domain is:

dom⁡(r)=ℝ∖{−1}=(−∞,−1)∪(−1,∞).\operatorname{dom}(r)=\mathbb{R}\setminus\{-1\}=(-\infty,-1)\cup(-1,\infty).

Since x=1∈dom⁡(r)x=1\in\operatorname{dom}(r), and rr is continuous on its entire domain, we can evaluate the limit purely by direct substitution:

limx→1r⁢(x)=r⁢(1)=1+113+1=22=1.\lim_{x\to 1}r(x)=r(1)=\frac{1+1}{1^{3}+1}=\frac{2}{2}=1.

∎

But what happens when the point of interest lies outside the domain?

Example 2.7.8.

Evaluate limx→−1x+1x3+1\displaystyle\lim_{x\to-1}\frac{x+1}{x^{3}+1}.

Solution.

Consider the rational function r⁢(x)=x+1x3+1r(x)=\frac{x+1}{x^{3}+1}. As computed in Example 2.7.7, dom⁡(r)=(−∞,−1)∪(−1,∞)\operatorname{dom}(r)=(-\infty,-1)\cup(-1,\infty).

Crucially, notice that x=−1∉dom⁡(r)x=-1\notin\operatorname{dom}(r). If we recklessly attempt to substitute x=−1x=-1, the term x+1x+1 generates a 0 in both the numerator and the denominator, yielding the indeterminate form 0/00/0.

Our central idea is to remove the offending x+1x+1 factor from the denominator x3+1x^{3}+1. Recall the algebraic identity for the sum of cubes:

a3+b3=(a+b)⁢(a2−a⁢b+b2).a^{3}+b^{3}=(a+b)(a^{2}-ab+b^{2}).

Applying this, we can factor the denominator as x3+1=(x+1)⁢(x2−x+1)x^{3}+1=(x+1)(x^{2}-x+1). Therefore, we rewrite r⁢(x)r(x) as:

r⁢(x)=x+1x3+1=x+1(x+1)⁢(x2−x+1).r(x)=\frac{x+1}{x^{3}+1}=\frac{x+1}{(x+1)(x^{2}-x+1)}.

Now, we must pause. Can we simply cancel the (x+1)(x+1) terms?

Yes, and the justification lies deep in the philosophy of the limit! The expression limx→−1\lim_{x\to-1} means that we consider values of xx that are arbitrarily close to −1-1, but strictly not equal to −1-1. Because x≠−1x\neq-1, it follows that x+1≠0x+1\neq 0. Thus, division by (x+1)(x+1) is a perfectly legal operation inside the limit.

We can now cleanly reduce our function:

limx→−1r⁢(x)=limx→−11x2−x+1.\lim_{x\to-1}r(x)=\lim_{x\to-1}\frac{1}{x^{2}-x+1}.

Let g⁢(x)=1x2−x+1g(x)=\frac{1}{x^{2}-x+1}. The roots of x2−x+1=0x^{2}-x+1=0 are complex, meaning this new denominator never vanishes on the real line (equivalently, you can complete the square x2−x+1=(x−12)2+34>0x^{2}-x+1=\left(x-\frac{1}{2}\right)^{2}+\frac{3}{4}>0). Consequently, dom⁡(g)=(−∞,∞)\operatorname{dom}(g)=(-\infty,\infty), meaning our new function gg is continuous everywhere!

Having successfully reduced our problem to a continuous function evaluated comfortably inside its domain, we finish with direct substitution:

limx→−1x+1x3+1=limx→−1g⁢(x)=1(−1)2−(−1)+1=11+1+1=13.\lim_{x\to-1}\frac{x+1}{x^{3}+1}=\lim_{x\to-1}g(x)=\frac{1}{(-1)^{2}-(-1)+1}=% \frac{1}{1+1+1}=\frac{1}{3}.

∎

Exercise 2.7.9.

Multiply the numerator and denominator by the conjugate (x+1+1)(\sqrt{x+1}+1) to eliminate the indeterminate form, and show that limx→0xx+1−1=2\lim_{x\to 0}\frac{x}{\sqrt{x+1}-1}=2.

2.7.2 Discontinuity: What Does It Mean to Break?

Definition 2.7.10 (Discontinuity).

If a function ff is not continuous at a point aa, we say that ff is discontinuous at aa, and that aa is a discontinuity of ff.

We classify these breaks into two physical archetypes:

  • •
    ​

    Removable Discontinuity: A trivial flaw. If ff can be made continuous by appropriately defining (or redefining) f⁢(a)f(a), the discontinuity is removable. Think of this as a missing pebble in an otherwise smoothly paved road; the overall macroscopic structure remains perfectly intact, and we can simply drop a new pebble into the hole.

  • •
    ​

    Non-removable Discontinuity: A fundamental structural failure. The gap cannot be bridged by redefining a single point (e.g., a jump, an oscillation, or an asymptote).33 3 In a physical fluid system, this is akin to a sudden shockwave where quantities jump instantaneously. The solution of Burger equation is a prototype of this behavior.

Moral (Classification of Discontinuities).

Not all discontinuities are created equal. Some are mere scratches on the surface of a function, while others are fundamental tears in its graph.

If you can fix a discontinuous function with a single drop of ink from your pen, the discontinuity is removable. If you need to lift your pen to redraw a whole section of the curve, it is non-removable.

Example 2.7.11 (Patching a Removable Discontinuity).

Consider the rational function

equation (2.20) (2.20)
r⁢(x)=x+1x3+1.r(x)=\frac{x+1}{x^{3}+1}.

The domain of rr is (−∞,−1)∪(−1,∞)(-\infty,-1)\cup(-1,\infty). Notice that r⁢(−1)r(-1) does not exist, so the function is undefined there. However, as we have seen in Example 2.7.8, the limit itself exists:

equation (2.21) (2.21)
limx→−1r⁢(x)=13.\lim_{x\to-1}r(x)=\frac{1}{3}.

If we construct a new function f⁢(x)f(x) that patches this hole,

equation (2.22) (2.22)
f⁢(x)≔{r⁢(x),x≠−113,x=−1,f(x)\coloneqq\begin{cases}r(x),&x\neq-1\\ \frac{1}{3},&x=-1,\end{cases}

then for a=−1a=-1, we have

equation (2.23) (2.23)
limx→−1f⁢(x)=limx→−1r⁢(x)=13=f⁢(−1).\lim_{x\to-1}f(x)=\lim_{x\to-1}r(x)=\frac{1}{3}=f(-1).

By definition, ff is continuous at x=−1x=-1. Furthermore, for a≠−1a\neq-1, f⁢(x)=r⁢(x)f(x)=r(x) is continuous on its original domain.

So ff is continuous on the entirety of ℝ\mathbb{R}. We simply redefined r⁢(x)=1/3r(x)=1/3 at x=−1x=-1 to obtain a continuous function ff. This perfectly illustrates that x=−1x=-1 is a removable discontinuity.

Example 2.7.12 (An Unbridgeable Gap).

Now, consider the hyperbola f⁢(x)=1xf(x)=\frac{1}{x}, with domain (−∞,0)∪(0,∞)(-\infty,0)\cup(0,\infty). Let us examine the behavior near the origin:

equation (2.24) (2.24)
limx→0+f⁢(x)=+∞andlimx→0−f⁢(x)=−∞.\lim_{x\to 0^{+}}f(x)=+\infty\quad\text{and}\quad\lim_{x\to 0^{-}}f(x)=-\infty.

We clearly have limx→0+f⁢(x)≠limx→0−f⁢(x)\lim_{x\to 0^{+}}f(x)\neq\lim_{x\to 0^{-}}f(x). The function diverges, violently tearing in opposite directions. Thus, we have a non-removable discontinuity at x=0x=0.

Story (The Ultraviolet Catastrophe).

In the early 20th century, classical physics predicted that the energy radiated by a black body at short wavelengths would go to infinity–a massive, real-world divergence akin to our 1/x1/x example. This ultraviolet catastrophe was a glaring non-removable discontinuity in the laws of physics. Max Planck resolved it by introducing quantum mechanics, fundamentally redefining the domain of our universe to fix the divergence!

2.7.3 Continuous Functions Commute with Limits

Continuity behaves beautifully under the standard operations of calculus. When we build complex functions out of simpler, continuous building blocks, the resulting structures usually inherit this smoothness.

Theorem 2.7.13 (Continuity of Composite Functions).

If gg is continuous at aa, and ff is continuous at g⁢(a)g(a), then the composition f∘gf\circ g is continuous at aa.

The rigorous proof requires an ε−δ\varepsilon-\delta argument, which is left as an exercise for the reader. However, the heuristic of Theorem 2.7.13 is quite straightforward. Theorem 2.7.13 says that

limx→a(f∘g)⁢(x)=(f∘g)⁢(a).\begin{split}\lim_{x\to a}(f\circ g)(x)=(f\circ g)(a).\end{split}

Note that (f∘g)⁢(a)=f⁢(g⁢(a))=f⁢(limx→ag⁢(x))(f\circ g)(a)=f(g(a))=f\left(\lim_{x\to a}g(x)\right), we can write (2.7.3) as

equation (2.25) (2.25)
limx→af⁢(g⁢(x))=f⁢(limx→ag⁢(x)).\lim_{x\to a}f(g(x))=f\left(\lim_{x\to a}g(x)\right).
Moral.

Continuous functions commute with limits. This is their superpower. If ff is continuous, you can safely pull limits inside its argument.

Let’s see this elegant machinery in action.

Example 2.7.14.

Compute limx→3x2−1\lim_{x\to 3}\sqrt{x^{2}-1}.

Let g⁢(x)=x2−1g(x)=x^{2}-1 and f⁢(x)=xf(x)=\sqrt{x}. Because the square root function is continuous on its domain, we can pull the limit right inside:

equation (2.26) (2.26)
limx→3x2−1=limx→3(x2−1)=32−1=8=2⁢2.\lim_{x\to 3}\sqrt{x^{2}-1}=\sqrt{\lim_{x\to 3}(x^{2}-1)}=\sqrt{3^{2}-1}=\sqrt% {8}=2\sqrt{2}.
Example 2.7.15.

Compute limx→π/2ecos⁡(x−π)\lim_{x\to\pi/2}\mathrm{e}^{\cos(x-\pi)}.

Let g⁢(x)=cos⁡(x−π)g(x)=\cos(x-\pi) and f⁢(x)=exf(x)=\mathrm{e}^{x}. By Theorem 2.7.13,

equation (2.27) (2.27)
limx→π/2ecos⁡(x−π)=elimx→π/2cos⁡(x−π)=ecos⁡(π/2−π)=ecos⁡(−π/2)=e0=1.\lim_{x\to\pi/2}\mathrm{e}^{\cos(x-\pi)}=\mathrm{e}^{\lim_{x\to\pi/2}\cos(x-% \pi)}=\mathrm{e}^{\cos(\pi/2-\pi)}=\mathrm{e}^{\cos(-\pi/2)}=\mathrm{e}^{0}=1.
Theorem 2.7.16 (Continuity and Arithmetic).

Suppose ff and gg are continuous at x=ax=a. Then the following functions are also continuous at aa:

  1. 1.
    ​

    c⁢fcf, where cc is a constant.

  2. 2.
    ​

    f±gf\pm g.

  3. 3.
    ​

    f⁢gfg.

  4. 4.
    ​

    1f\frac{1}{f}, provided that f⁢(a)≠0f(a)\neq 0.

Example 2.7.17.

Consider the limit limx→1log⁡xx2+1\lim_{x\to 1}\frac{\log x}{x^{2}+1}.

Let g⁢(x)=log⁡xg(x)=\log x and f⁢(x)=1x2+1f(x)=\frac{1}{x^{2}+1}. Both are continuous on (0,∞)(0,\infty). Since 1∈dom⁡(log⁡xx2+1)1\in\operatorname{dom}\left(\frac{\log x}{x^{2}+1}\right), we simply evaluate:

equation (2.28) (2.28)
limx→1log⁡xx2+1=log⁡112+1=02=0.\lim_{x\to 1}\frac{\log x}{x^{2}+1}=\frac{\log 1}{1^{2}+1}=\frac{0}{2}=0.

We often encounter a limit that looks completely undetermined (0/00/0 or ∞/∞\infty/\infty). It tries to trick us into believing there is a singularity, but with a little algebraic surgery, we can reveal the smooth reality underneath.

Example 2.7.18 (Removal of a Singularity).

Evaluate the limit

equation (2.29) (2.29)
limx→4x2−16x−2.\lim_{x\to 4}\frac{x^{2}-16}{\sqrt{x}-2}.

Direct substitution yields x=4⟹00x=4\implies\frac{0}{0}, which is undetermined. The core idea here is to remove the singularity at x=4x=4 to obtain a function that is continuous at x=4x=4. Notice that the problematic term is (x−4)→0(x-4)\to 0. We must hunt for this hidden (x−4)(x-4) in both the numerator and the denominator.

There are two paths we can take to conquer this limit.

  1. 1.
    ​

    Method 1: Rationalizing the Denominator.
    For the top, we factor a difference of squares:

    x2−16=(x−4)⁢(x+4).\begin{split}x^{2}-16=(x-4)(x+4).\end{split}

    For the bottom, we multiply by the conjugate, exploiting the identity a2−b2=(a−b)⁢(a+b)a^{2}-b^{2}=(a-b)(a+b):

    (x−2)⋅x+2x+2=x−4x+2.\begin{split}(\sqrt{x}-2)\cdot\frac{\sqrt{x}+2}{\sqrt{x}+2}=\frac{x-4}{\sqrt{x% }+2}.\end{split}

    Putting it all together, we have:

    limx→4x2−16x−2=limx→4(x−4)⁢(x+4)x−2=limx→4(x−4)⁢(x+4)x−4x+2=limx→4(x+4)⁢(x+2).\begin{split}\lim_{x\to 4}\frac{x^{2}-16}{\sqrt{x}-2}&{}=\lim_{x\to 4}\frac{(x% -4)(x+4)}{\sqrt{x}-2}\\ &{}=\lim_{x\to 4}\frac{(x-4)(x+4)}{\frac{x-4}{\sqrt{x}+2}}\\ &{}=\lim_{x\to 4}(x+4)(\sqrt{x}+2).\end{split}
  2. 2.
    ​

    Method 2: Factoring the Numerator.
    Alternatively, we can be slightly more clever and recognize that (x−4)(x-4) itself is a difference of squares!

    equation (2.30) (2.30)
    x−4=(x)2−22=(x−2)⁢(x+2).x-4=(\sqrt{x})^{2}-2^{2}=(\sqrt{x}-2)(\sqrt{x}+2).

    Then, the limit becomes:

    limx→4x2−16x−2=limx→4(x−4)⁢(x+4)x−2=limx→4(x−2)⁢(x+2)⁢(x+4)x−2=limx→4(x+2)⁢(x+4).\begin{split}\lim_{x\to 4}\frac{x^{2}-16}{\sqrt{x}-2}&{}=\lim_{x\to 4}\frac{(x% -4)(x+4)}{\sqrt{x}-2}\\ &{}=\lim_{x\to 4}\frac{(\sqrt{x}-2)(\sqrt{x}+2)(x+4)}{\sqrt{x}-2}\\ &{}=\lim_{x\to 4}(\sqrt{x}+2)(x+4).\end{split}

    By algebraically cancelling the singularity, we are left with a polynomial-like expression that is fully continuous at x=4x=4. We can now evaluate:

    limx→4x2−16x−2=(4+4)⁢(4+2)=8⋅4=32.\begin{split}\lim_{x\to 4}\frac{x^{2}-16}{\sqrt{x}-2}=(4+4)(\sqrt{4}+2)=8\cdot 4% =32.\end{split}
Caveat.

It is incredibly tempting to cancel out x−4x−4\frac{x-4}{x-4} without a second thought. But remember, this division is only mathematically valid precisely because in a limit x→4x\to 4, xx is never actually equal to 4! The limit asks what happens as we get close?, and algebra lets us answer without breaking the math by dividing by zero.

Exercise 2.7.19 (Power Rule).

Show that if limx→ah⁢(x)\lim_{x\to a}h(x) exists and limx→ah⁢(x)≥0\lim_{x\to a}h(x)\geq 0 then limx→a(h⁢(x))β=(limx→ah⁢(x))β\lim_{x\to a}\left(h(x)\right)^{\beta}=\left(\lim_{x\to a}h(x)\right)^{\beta}. Hint: Use (2.25). Why do we need limx→ah⁢(x)\lim_{x\to a}h(x) to be nonnegative?