Tutorials › Real Analysis › Existence of Zeros

Connectedness · Tutorial 314 of 1000

Existence of Zeros

See how the Intermediate Value Theorem and compactness provide complementary ways to establish that a continuous function has a zero.

Intermediate 9 min read

What You'll Learn

  • Define a zero and the zero set of a function.
  • Use the Sign-Change Root Theorem to establish a zero from opposite endpoint signs.
  • Prove that a continuous function on a compact set has a zero when it has arbitrarily small absolute values.
  • Characterize zero existence on a compact set using the minimum of the absolute value.
  • Explain why approximate zeros need not produce an actual zero on a noncompact domain.
  • Show that a continuous function’s zero set is closed relative to its domain.

Two Routes to a Zero

A zero of a real-valued function is an input where the function takes the value \(0\). The Intermediate Value Theorem gives a direct way to find one: if a continuous function takes values of opposite signs at two points in an interval, it must take the value \(0\) somewhere between them. The Sign-Change Root Theorem, established earlier in the course, states this conclusion precisely.

A sign change is a useful sufficient condition, but it is not necessary for a zero to exist. There is also a different route: on a compact domain, if a continuous function takes values arbitrarily close to zero, then it must take the value zero. This second route is important when approximate calculations suggest a root but do not reveal opposite signs at particular endpoints. We will also see why the compactness assumption matters.

Zeros and the Zero Set

Definition: Let \(E\subseteq\mathbb{R}\) and \(f:E\to\mathbb{R}\). A point \(c\in E\) is a zero of \(f\) if \(f(c)=0\). The zero set of \(f\) is \(Z(f)=\{x\in E:f(x)=0\}\).

The equation \(f(x)=0\) asks whether the zero set is nonempty. A function may have one zero, many zeros, or none. When continuity and connectedness are available, a sign change forces the zero set to be nonempty. When compactness is available, values approaching zero also suffice, even if no sign change has been identified.

Earlier result (Sign-Change Root Theorem): If \(f\) is continuous on an interval \([a,b]\) and \(f(a)<0<f(b)\), then \(f(c)=0\) for some \(c\in[a,b]\). The reversed sign condition \(f(b)<0<f(a)\) gives the same conclusion by applying the theorem to \(-f\).

We will use this theorem as a tool rather than prove it again. The compactness method that follows is different: it does not require values of both signs. It requires a compact domain and a sequence of function values whose absolute values tend to zero.

Worked Example: A Sign Change Forces a Zero

Consider \(f(x)=x^3-4x+1\) on \([0,1]\). This polynomial is continuous on the interval. Direct substitution gives \(f(0)=0^3-4(0)+1=1\), while \(f(1)=1^3-4(1)+1=-2\). Thus \(f(1)<0<f(0)\). The reversed-sign version of the Sign-Change Root Theorem guarantees some \(c\in[0,1]\) such that \(f(c)=0\).

The conclusion is an existence statement; it does not give an exact value for \(c\). In fact, \(f(0)\ne0\) and \(f(1)\ne0\), so the guaranteed zero lies in \((0,1)\). A numerical approximation can help locate it, but the sign-change theorem is what establishes that an exact zero exists.

Approximate Zeros on Compact Sets

In calculations, one often obtains inputs where the function value is very small rather than exactly zero. Compactness turns this kind of approximation into an existence result, provided the function is continuous and the inputs remain in a fixed compact set.

Theorem (Compactness Turns Approximate Zeros into a Zero): Let \(K\subseteq\mathbb{R}\) be compact, and let \(f:K\to\mathbb{R}\) be continuous. If there is a sequence \((x_n)\) in \(K\) such that \(f(x_n)\to0\), then there exists \(x_*\in K\) with \(f(x_*)=0\).

Proof. Since \(K\) is compact, it is sequentially compact by the Theorem (Compact Sets Are Sequentially Compact). Therefore the sequence \((x_n)\) has a subsequence \((x_{n_k})\) that converges to some \(x_*\in K\). Continuity of \(f\) at \(x_*\) implies \(f(x_{n_k})\to f(x_*)\). But \(f(x_n)\to0\), so its subsequence also satisfies \(f(x_{n_k})\to0\). Uniqueness of limits in \(\mathbb{R}\) gives \(f(x_*)=0\). Hence \(x_*\) is a zero of \(f\). \(\square\)

The sequence is allowed to repeat points, and the theorem does not require the values \(f(x_n)\) to have different signs. Its key hypotheses are that all the inputs lie in one compact set and that \(f\) is continuous there. Compactness supplies a convergent subsequence whose limit remains in the domain; continuity then transfers the limiting function value to that point.

Worked Example: Approximate Zeros for a Polynomial

Let \(f(x)=x^2-2\) on \(K=[0,2]\). For each positive integer \(n\), define \(k_n=\lfloor 2^n\sqrt{2}\rfloor\) and \(x_n=k_n/2^n\). Since \(1<\sqrt{2}<2\), we have \(2^n<2^n\sqrt{2}<2^{n+1}\), so \(1\leq x_n\leq2\) and \(x_n\in K\). The defining property of the floor gives \(0\leq\sqrt{2}-x_n<2^{-n}\), and therefore \(x_n\to\sqrt{2}\).

The residuals satisfy \(|f(x_n)|=|x_n^2-2|=|x_n-\sqrt{2}|(x_n+\sqrt{2})\). Because \(x_n\leq2\) and \(\sqrt{2}<2\), we have \(x_n+\sqrt{2}<4\). Consequently, \(0\leq |f(x_n)|<4\cdot2^{-n}\), which tends to zero. The polynomial \(f\) is continuous and \(K\) is compact, so the theorem guarantees a point \(x_*\in[0,2]\) with \(f(x_*)=0\). The construction exhibits increasingly accurate approximate zeros, while the theorem ensures an exact zero in the domain.

A Minimum-Value Test for Existence

The approximate-zero theorem has an equivalent formulation using the minimum of the absolute value. The function \(x\mapsto |f(x)|\) is continuous whenever \(f\) is continuous. On a nonempty compact set it attains a minimum, by the Extreme Value Theorem. That minimum records exactly how close the function gets to zero on the whole domain.

Theorem (Minimum Absolute Value Criterion for a Zero): Let \(K\subseteq\mathbb{R}\) be nonempty and compact, and let \(f:K\to\mathbb{R}\) be continuous. Then \(f\) has a zero in \(K\) if and only if \(\min_{x\in K}|f(x)|=0\).

Proof. The function \(x\mapsto |f(x)|\) is continuous on \(K\). By the Extreme Value Theorem, it attains a minimum at some \(x_0\in K\). Since absolute values are nonnegative, this minimum is at least zero. If \(f\) has a zero \(c\in K\), then \(|f(c)|=0\), so the minimum is at most zero and hence equals zero. Conversely, if the minimum equals zero, then at its point of attainment \(x_0\) we have \(|f(x_0)|=0\). The only real number with absolute value zero is zero itself, so \(f(x_0)=0\). Thus \(f\) has a zero in \(K\). \(\square\)

This criterion makes the role of compactness visible: the minimum is attained, rather than merely approached. If the minimum is positive, there is a uniform positive distance between all function values and zero. The earlier theorem that positive continuous functions on compact sets have a positive minimum applies when \(f\) never vanishes, since then \(|f|\) is positive everywhere.

Worked Example: A Zero Without an Endpoint Sign Change

Let \(f(x)=(x-1)^2\) on \(K=[-1,3]\). For every \(x\in K\), \(f(x)\geq0\), and direct substitution gives \(f(-1)=(-2)^2=4\) and \(f(3)=(2)^2=4\). The endpoint values have the same sign, so the Sign-Change Root Theorem does not apply to these endpoints. Nevertheless, \(f(1)=(1-1)^2=0\), so \(1\) is a zero. In fact, \(|f(x)|=(x-1)^2\) has minimum zero on \(K\), attained at \(x=1\).

This example shows why an absence of sign change does not prove that a function has no zero. A graph can touch the horizontal axis and turn back without crossing it. The minimum absolute value criterion captures this possibility, whereas a sign-change test does not.

Why Compactness Cannot Be Omitted

A sequence of approximate zeros need not lead to a zero if its inputs escape the domain or converge to a point outside it. Compactness prevents this failure by ensuring that a subsequence converges to a point in the set. Continuity can then be used at that limit point.

Worked Example: Approximate Zeros Without a Zero

Take \(E=(0,1)\) and \(f:E\to\mathbb{R}\) defined by \(f(x)=x\). The function is continuous, but it has no zero in \(E\), because every \(x\in E\) is strictly positive. For \(n\geq2\), let \(x_n=1/n\). Then \(x_n\in E\) and \(f(x_n)=1/n\to0\).

There is no contradiction with the compactness theorem: \((0,1)\) is not compact, and \(x_n\to0\) with \(0\notin E\). The approximating inputs approach a missing boundary point, so they do not yield a convergent subsequence with limit in the domain. Small function values alone are not enough.

On a compact domain, the minimum criterion also provides a practical distinction. If a continuous function has no zero, then its absolute value has a strictly positive minimum, so every function value stays at least that far from zero. On a noncompact domain, a function can remain positive while taking values as close to zero as desired, as \(f(x)=x\) on \((0,1)\) demonstrates.

The Zero Set and Continuity

Continuity also controls the shape of the entire zero set, not just whether it is empty. Because \(\{0\}\) is closed in \(\mathbb{R}\), the preimage of \(\{0\}\) under a continuous function is closed relative to its domain.

Theorem (Zero Sets of Continuous Functions Are Relatively Closed): If \(E\subseteq\mathbb{R}\) and \(f:E\to\mathbb{R}\) is continuous, then \(Z(f)=\{x\in E:f(x)=0\}\) is closed relative to \(E\).

Proof. By definition, \(Z(f)=f^{-1}(\{0\})\). The singleton \(\{0\}\) is closed in \(\mathbb{R}\). Since \(f\) is continuous, the preimage of a closed set is closed relative to the domain \(E\). Therefore \(Z(f)\) is closed relative to \(E\). \(\square\)

“Closed relative to \(E\)” does not always mean closed in the whole real line. For example, the zero set of \(f(x)=x\) on \(E=(0,1)\) is empty, which is closed in \(\mathbb{R}\); but in general a relatively closed subset of a nonclosed domain need not be closed in \(\mathbb{R}\). The domain must be kept in view when interpreting the conclusion.

Choosing an Existence Argument

When proving that a zero exists, first identify which information is available. Opposite signs at two points of an interval give the Sign-Change Root Theorem directly. A compact domain together with approximate values tending to zero gives the compactness theorem. If a continuous function on a nonempty compact set is known not to vanish, the minimum absolute value criterion instead gives a strictly positive lower bound for its absolute value.

These arguments establish existence without necessarily locating a zero exactly. They also have different hypotheses: the sign-change result uses an interval and endpoint values, while the approximate-zero result uses compactness and a sequence. Keeping those conditions distinct avoids a common mistake—concluding that a function has a zero merely because its values can be made small, without checking that the inputs stay in a compact part of the domain.

Check Your Understanding

Use the definitions and results in this tutorial to answer the following questions.

  1. What hypotheses allow the Sign-Change Root Theorem to guarantee a zero?
  2. Why does compactness ensure that a sequence of approximate zeros yields an actual zero?
  3. For a continuous function on a nonempty compact set, what does a positive minimum of the absolute value tell you?
  4. Why can \(f(x)=x\) on \((0,1)\) take values arbitrarily close to zero without having a zero?
  5. What does it mean for a zero set to be closed relative to its domain?