A derivative gives local slope, but a theorem is needed to convert local information into a conclusion over an interval.
Real closed sets: the sequence criterion and the open complement
Work on the real line in the usual classical set-theoretic setting, with countable witness selections available. A set is open when every in has some with contained in . We use the Archimedean consequence that tends to zero. For every subset of the real line, the following conditions are equivalent:
- Every sequence of points of that converges in the real line has its limit in .
- The complement of is open.
Proof of 2 implies 1. Suppose belongs to and tends to . If were outside , openness would give with disjoint from . Convergence gives a threshold after which , contradicting in . Therefore belongs to .
Proof of 1 implies 2. Fix outside . If no positive-radius interval around avoided , then for every positive integer there would be a point in with . Choose these witnesses as a sequence. Given , choose with . For , , so tends to . Condition 1 would force into , a contradiction. Hence some interval around avoids . This holds for every point of the complement, proving it open. The witness-sequence step uses the stated classical setting; this proof is not offered as a theorem about choice-free foundations. If is empty there is no sequence in , and its complement is the whole open line. If is the whole line, its empty complement is open vacuously. Both edge cases also satisfy the equivalence.
Learning goals and definitions
A set is compact if every family of open sets whose union contains has a finite subfamily still covering . A set is closed if it contains all limits of convergent sequences of its points, equivalently if its complement is open. Sequential compactness means every sequence in has a subsequence converging to a member of .
The empty set is compact, closed and bounded, and sequentially compact vacuously. In proofs using a selected point or an infinite sequence, treat that case separately. We may assume the real completeness property and its nested-interval and Bolzano–Weierstrass consequences from the earlier sequence units.
Theorem: Heine–Borel in the real line
For , the following are equivalent: compactness by open covers; closedness and boundedness; sequential compactness.
Compact implies closed and bounded. The intervals , , cover , hence . A finite subcover gives a bound. To show closedness, take . For each , the interval avoids . A finite subfamily covers . Let be the minimum of their positive half-distances to . Every point in the chosen interval centered at has distance from strictly greater than . Thus misses , showing its complement open. If is empty this is immediate.
Closed and bounded implies compact. Enclose nonempty in a closed bounded interval . Suppose an open cover of has no finite subcover. Bisect . At least one closed half meets in a set not finitely coverable; otherwise two finite collections would cover . Choose such a half and repeat. We obtain nested closed intervals with lengths tending to zero, and not finitely coverable. Each intersection is nonempty; choose . The nested-interval property gives a unique common point , and because both lie in . Closedness gives . Some member of the cover contains , and openness gives a ball around inside . For large , the whole interval lies in that ball, so alone covers , a contradiction.
Closed and bounded implies sequentially compact. Every sequence in is bounded, so Bolzano–Weierstrass supplies a convergent subsequence. Closedness retains its limit in .
Sequentially compact implies closed and bounded. If unbounded, choose with ; no subsequence can converge to a finite real number, a contradiction. If is a limit of points in , choose with . A subsequence converges to a point of by sequential compactness, but it also converges to ; uniqueness of real limits gives . Thus is closed. This completes all implications.
Fix an integer and the Euclidean norm on . A set is bounded if it lies in some finite-radius ball, closed if its complement is open, and compact if every cover by open subsets of has a finite subcover. We use real completeness, including the nested closed interval property.
Heine–Borel in finite-dimensional Euclidean space
Theorem. A set is compact if and only if it is closed and bounded. The empty set satisfies all three properties.
Compact implies bounded. The open balls , an integer, cover . A finite subcover puts inside the largest of these balls.
Compact implies closed. Suppose and . The balls , , cover . Choose a finite subcover with centers and set . If lies in the ball centered at , the triangle inequality gives . Hence misses , so the complement is open.
Closed and bounded implies compact. Let nonempty be closed and bounded. Enclose it in a closed cube with . Suppose an open cover of has no finite subcover. Divide each coordinate interval into two closed halves. The resulting closed subcubes cover . At least one subcube has intersection with that is not finitely coverable by the given family; otherwise the finite union of the finite subcovers would cover . Select such a subcube and repeat. This produces nested closed cubes with side length and not finitely coverable, hence nonempty.
For each coordinate, the nested interval property gives a common coordinate value. Together these give . Every pair of points in has distance at most , so the intersection contains only . Choose . Then . A closed set contains such a limit: if were in its open complement, a ball around would eventually contain outside , a contradiction. Thus .
One member of the cover contains , and openness gives for some . For sufficiently large , every point of is within of , so alone covers . This contradicts the selection of . Therefore every open cover has a finite subcover. The number is finite; replacing it by infinitely many subpieces would invalidate this argument.
Continuous images and extreme values
Theorem. If is compact and is continuous relative to , then is compact. In particular, a continuous on nonempty compact is bounded and attains its maximum and minimum.
Proof. An open cover of pulls back to relatively open sets , with open in . These cover , so finitely many suffice. Their corresponding cover , proving compactness. For scalar , the image is nonempty, closed and bounded by the theorem already proved in dimension one. Let . For each , the definition of supremum supplies with . Then , and closedness places in the image. Thus the maximum is attained. Applying the same argument to gives the minimum. This proves existence, not a formula for the maximizing input.
Worked example: the sphere needed for the real spectral theorem. The sphere is nonempty because it contains , and it is bounded. The reverse triangle inequality proves norm continuity, so is closed as the inverse image of the closed set . Heine–Borel makes it compact. For a real matrix , the polynomial is continuous, so its restriction to the sphere attains both extrema. Symmetry of is not needed for this existence claim; it is needed in the subsequent spectral argument and the gradient formula .
Exercises
P01. Explain why the compactness assertion fails for the open unit ball even though that ball is bounded.
P02. Which step of the cube proof fails if is not closed? Give an example.
P03. For on the unit circle, find the extreme values of and every point where equality holds. Distinguish the existence theorem from the calculation.
Full solutions
P01. The open unit ball is not closed: lies in it for and converges to outside it. A compact set would be closed by the proved necessity, so the ball is not compact. Boundedness alone is insufficient.
P02. The limit of may be outside , at a point , so no member of the cover need contain . Explicitly take , the cover for integers , and the nested closed intervals for integers . These open intervals cover , but any finite collection has a positive smallest left endpoint and therefore fails to cover . The intervals have common point zero, which is outside ; consequently no member of the cover contains . This is exactly where the closed-set proof can fail.
P03. Writing with gives . The minimum is two, attained exactly at , and the maximum is five, attained exactly at . Compactness and continuity guarantee that extrema exist; the displayed identity determines their values and all equality cases.
Fermat's necessary condition. At a differentiable interior local maximum or minimum, .
Proof. At a local maximum, sufficiently small positive increments give nonpositive difference quotients and negative increments give nonnegative ones. A two-sided derivative can satisfy both sign limits only by being zero. Negating the function treats a minimum.
The interior hypothesis matters: on has extrema at endpoints despite derivative 1. The converse fails: has zero derivative at zero but no extremum there.
Rolle's theorem. If , is continuous on , differentiable on and , then for some .
Proof. The extreme-value theorem supplies maximum and minimum. If the function is constant, every interior point works. Otherwise a value differs from the equal endpoint values, so either a maximum or a minimum occurs in the interior. Fermat's condition applies there.
Mean value theorem. Under the same continuity and differentiability hypotheses but without equal endpoint values, some satisfies .
Subtract the secant line from and apply Rolle. This proves the theorem without assuming is continuous. Consequences include: derivative zero on an interval makes the function constant; nonnegative derivative makes it nondecreasing; and on an interval gives for points in it. An interval-wide derivative bound cannot be inferred from one derivative value.
Thus if on an interval, is strictly increasing there; if everywhere on an interval, is constant there.
A critical point in the interior of the domain is a point where or does not exist. A differentiable interior local extremum must have derivative zero, but the converse fails: has zero derivative at zero and no local extremum there. A derivative changing from positive to negative gives a local maximum; a change from negative to positive gives a local minimum. If and , there is a local minimum; if , a local maximum. If , this test is inconclusive. Positive second derivative on an interval implies convexity there; a sign change of the second derivative indicates an inflection point when the curve is continuous there.
Worked example
Global optimisation on a closed interval
Find the maximum and minimum of on . Continuity guarantees both exist. The interior critical points solve , giving . Compare , , , and . Thus the minimum is and the maximum is , each attained at two points. Checking only critical points would omit necessary endpoint candidates.
Worked example
Related rates
If the radius of a sphere grows at centimetres per second, then gives by the chain rule. At centimetres, the volume increases at cubic centimetres per second. Differentiate the relationship before substituting the instant's values.
For curve sketching, find the domain and intercepts, then one-sided behaviour at domain boundaries, asymptotes where their defining limits exist, critical points and derivative signs, and curvature. A vertical asymptote at requires at least one one-sided limit to be infinite. A horizontal asymptote requires as or as . These are independent of whether the graph crosses the line elsewhere.
Worked example
An inequality from a derivative bound
For , let . Then : negative on and positive on . The mean value theorem makes decrease toward and increase after , so its global minimum is . Consequently for all , with equality only at .
A stationary point has , whereas a critical point may also be a point where the derivative fails to exist. For instance has a minimum at zero even though it is not stationary there. A sketch based solely on stationary points can miss corners and domain endpoints. On an open domain, a supremum need not be attained: on has supremum but no maximum.
Choosing a method
For a global extremum on a closed interval compare endpoints and all interior critical candidates. On an unbounded or open domain an extremum need not exist, so analyse boundary limits and justify attainment. For inequalities, apply the mean value theorem to an appropriate auxiliary function or prove its derivative has a sign. Related rates require consistent units and a relation valid as quantities change.
Exercises
- Show for .
- A rectangle has perimeter . Find the largest possible area, allowing nonnegative side lengths.
- Find all stationary points of and classify them locally.
Full solutions
- Let . For , . The mean value theorem implies .
- If sides are and with , area is . It is continuous, and vanishes only at . Comparing and gives maximum , attained by a square.
- vanishes at . As , the second derivative test gives a local maximum at with value and a local minimum at with value .
Connection
Mean-value reasoning also controls error in Taylor approximations. Optimisation uses the same derivative rules as related rates, but asks a different question: where is a value largest or smallest?
Proofs supporting the methods used in this note
Finite real limit laws and geometric sequences: the missing proofs
Work over the ordered real numbers, with the Archimedean property, positive-integer induction and the usual absolute-value triangle inequality. A sequence converges to a finite real when every admits an that works for every .
Uniqueness, boundedness and subsequences. If and , require both errors below at the same sufficiently large index. The triangle inequality gives , a contradiction. For boundedness, require in the tail, and take a maximum of and the finitely many initial absolute values. For a subsequence , induction gives ; hence every tail threshold for the original sequence also works eventually for the subsequence.
Sum, scalar and product. If , , choose both input errors below ; then
For a fixed scalar use input tolerance ; is immediate. Choose bounding all . Require
The common later threshold gives .
Reciprocal and quotient. If , first require , ensuring and nonzero denominators. Then
Requiring also proves reciprocal convergence. The product law now proves . Any undefined initial quotients may be omitted; convergence is a tail assertion.
Order and squeeze. If eventually and , , then : otherwise errors below would force . If eventually and both outer limits are , require both errors below . Then , proving . This proof does not require a previously known limit of .
For the corresponding function-limit laws, fix a common allowed approach domain and an accumulation point of : every punctured neighborhood of contains a point of . Let have the stated finite relative-domain limits at . Replace each tail threshold in the displayed estimates by a punctured-domain radius, and take the minimum of finitely many positive radii. For the product proof only local boundedness is needed: gives on a sufficiently small punctured -neighborhood, even if is unbounded elsewhere on . The same estimates prove sum, scalar, product, reciprocal and quotient laws with their stated nonzero limiting-denominator condition; the same order and squeeze estimates apply on the common approach domain. Accumulation supplies actual points when proving uniqueness or excluding an incompatible order of limiting values.
For composition let , let , and let be continuous at relative to . Suppose tends to and throughout some sufficiently small punctured -neighborhood of . Given , continuity supplies such that and imply . The limit of and the composition-domain condition supply a common positive radius forcing both conditions for every allowed approaching . Thus . This includes inputs with and does not divide by an inner increment.
Geometric classification. Bernoulli's bound for follows by induction: multiply the case by the positive and retain the nonnegative remainder . If , set . Thus
For any requested tolerance, the Archimedean property supplies making the right side smaller. Hence for by ; gives zero for every positive index. At the sequence is constantly one. At , the even and odd subsequences are one and minus one, so uniqueness and subsequence inheritance exclude convergence. If , Bernoulli with gives . If , by the same argument, contradicting boundedness of any convergent real sequence. These cases exhaust all real ratios.
Subsequences
Definition
Subsequence
A subsequence of is where are positive integers. If , then every subsequence converges to because and therefore eventually lies beyond any prescribed index.
Theorem
Bolzano–Weierstrass
Every bounded real sequence has a convergent subsequence.
Proof
Nested-interval proof
Place every term in a closed bounded interval . Bisect it. At least one half contains infinitely many terms; choose that half as . Continue, obtaining nested closed intervals of lengths tending to zero, each containing infinitely many terms. Choose indices strictly increasing with ; this is possible because each interval contains infinitely many terms. Completeness gives a common point in all intervals: the supremum of their left endpoints lies in each interval because every left endpoint is at most every right endpoint. Since , their distance is at most the interval length and tends to zero.
The conclusion is about a subsequence, not necessarily the whole sequence. For example, has constant subsequences converging to and , but does not converge.
Fix an integer and the Euclidean norm on . A set is bounded if it lies in some finite-radius ball, closed if its complement is open, and compact if every cover by open subsets of has a finite subcover. We use real completeness, including the nested closed interval property.
Heine–Borel in finite-dimensional Euclidean space
Theorem. A set is compact if and only if it is closed and bounded. The empty set satisfies all three properties.
Compact implies bounded. The open balls , an integer, cover . A finite subcover puts inside the largest of these balls.
Compact implies closed. Suppose and . The balls , , cover . Choose a finite subcover with centers and set . If lies in the ball centered at , the triangle inequality gives . Hence misses , so the complement is open.
Closed and bounded implies compact. Let nonempty be closed and bounded. Enclose it in a closed cube with . Suppose an open cover of has no finite subcover. Divide each coordinate interval into two closed halves. The resulting closed subcubes cover . At least one subcube has intersection with that is not finitely coverable by the given family; otherwise the finite union of the finite subcovers would cover . Select such a subcube and repeat. This produces nested closed cubes with side length and not finitely coverable, hence nonempty.
For each coordinate, the nested interval property gives a common coordinate value. Together these give . Every pair of points in has distance at most , so the intersection contains only . Choose . Then . A closed set contains such a limit: if were in its open complement, a ball around would eventually contain outside , a contradiction. Thus .
One member of the cover contains , and openness gives for some . For sufficiently large , every point of is within of , so alone covers . This contradicts the selection of . Therefore every open cover has a finite subcover. The number is finite; replacing it by infinitely many subpieces would invalidate this argument.
Continuous images and extreme values
Theorem. If is compact and is continuous relative to , then is compact. In particular, a continuous on nonempty compact is bounded and attains its maximum and minimum.
Proof. An open cover of pulls back to relatively open sets , with open in . These cover , so finitely many suffice. Their corresponding cover , proving compactness. For scalar , the image is nonempty, closed and bounded by the theorem already proved in dimension one. Let . For each , the definition of supremum supplies with . Then , and closedness places in the image. Thus the maximum is attained. Applying the same argument to gives the minimum. This proves existence, not a formula for the maximizing input.
The second-derivative test with only pointwise second differentiability
Let be differentiable on an open interval around , suppose , and suppose is differentiable at . If , then is a strict local minimum. No continuity of on a neighborhood is assumed.
Put . By its definition there is within that open interval such that
Because , this makes for negative and for positive . If , the mean value theorem on gives . If , its version on gives , again . This proves the strict minimum. The theorem applies because differentiability supplies continuity on these closed subintervals. Apply the same result to when to obtain a strict local maximum. When there is no conclusion: , and at zero have respectively a minimum, a maximum and no extremum, while all have first and second derivatives zero there. The stationarity and interior-neighborhood conditions are essential; positivity of alone is not sufficient, as at zero shows.