Why Absolute Values and Maximums Need Care
Expressions such as \(|f(x)|\), \(\max(f(x),g(x))\), and \(\min(f(x),g(x))\) often appear to introduce new complications. Absolute value changes a sign, while a maximum or minimum may use different formulas in different parts of the domain. The useful fact is that these operations can be described using familiar continuous operations.
In particular, the maximum and minimum of two continuous functions are continuous. This conclusion follows from exact algebraic formulas, not from a guess about how their graphs look. It is important, however, that the functions being combined are continuous: applying a maximum or minimum to arbitrary functions does not automatically remove discontinuities.
Absolute Value Preserves Continuity
The absolute value of a real number is nonnegative and measures its distance from zero. For a function \(f:A\to\mathbb R\), the function \(|f|\) is defined on the same domain by \(|f|(x)=|f(x)|\).
The reason is the inequality \(\bigl||u|-|v|\bigr|\leq |u-v|\), valid for all real numbers \(u\) and \(v\). To see it, the triangle inequality gives \(|u|=|(u-v)+v|\leq |u-v|+|v|\), and hence \(|u|-|v|\leq |u-v|\). Interchanging \(u\) and \(v\) gives \(|v|-|u|\leq |u-v|\). Together these inequalities imply the stated bound.
Here is how that estimate proves the theorem. Given \(\varepsilon>0\), continuity of \(f\) at \(a\) guarantees that \(x\) sufficiently close to \(a\) satisfies \(|f(x)-f(a)|<\varepsilon\). For those same \(x\),
This is precisely the condition that \(|f|\) be continuous at \(a\). The estimate also explains why a sign change in \(f\) does not by itself cause a discontinuity in \(|f|\).
Worked Example: Continuity of an Absolute-Value Expression
Consider \(h(x)=|x^2-4|\). The polynomial \(x^2-4\) is continuous for every real \(x\). By the theorem, applying absolute value preserves continuity, so \(h\) is continuous for every real \(x\).
The formula can also be written piecewise. When \(x^2-4\geq 0\), equivalently \(x\leq -2\) or \(x\geq 2\), its absolute value is \(x^2-4\). When \(-2<x<2\), the expression \(x^2-4\) is negative, so its absolute value is \(4-x^2\). Thus
For an explicit switch-point check at \(x=2\), the function value is \(h(2)=|2^2-4|=|0|=0\). Approaching \(2\) from the left uses \(4-x^2\), whose limit is \(4-2^2=0\). Approaching from the right uses \(x^2-4\), whose limit is \(2^2-4=0\). Both one-sided limits equal the function value, confirming continuity there. The general theorem already guarantees continuity at every other point, including \(x=-2\).
Maximum and Minimum as Algebraic Formulas
For two real numbers \(r\) and \(s\), \(\max(r,s)\) is the larger of the two, and \(\min(r,s)\) is the smaller. If \(f\) and \(g\) have the same domain and real values, these operations are applied at each input: \(\max(f,g)(x)=\max(f(x),g(x))\), and similarly for the minimum.
These identities hold pointwise. To check the maximum formula, first suppose \(f(x)\geq g(x)\). Then \(|f(x)-g(x)|=f(x)-g(x)\), and
In this case \(f(x)\) is the maximum. If \(f(x)<g(x)\), then \(|f(x)-g(x)|=g(x)-f(x)\), so the same expression becomes \(\frac{f(x)+g(x)+g(x)-f(x)}{2}=g(x)\), the maximum in that case. For the minimum, when \(f(x)\geq g(x)\), subtracting \(|f(x)-g(x)|=f(x)-g(x)\) gives \(g(x)\); when \(f(x)<g(x)\), subtracting \(g(x)-f(x)\) gives \(f(x)\). Thus the second formula gives the smaller value in both cases.
Indeed, \(f+g\) and \(f-g\) are continuous at \(a\) by the sum and difference rules. The absolute-value result shows that \(|f-g|\) is continuous there. The displayed formulas build the maximum and minimum from these continuous functions using addition, subtraction, and division by the nonzero constant \(2\). The sum and constant-multiple rules therefore give continuity of both expressions at \(a\).
Finding and Checking Switch Points
When \(f\) and \(g\) are continuous, their order cannot change abruptly at a point where they have unequal values. More precisely, if \(f(a)>g(a)\), continuity of \(f-g\) means \(f(x)-g(x)\) remains positive for all \(x\) sufficiently close to \(a\). If \(f(a)<g(a)\), it remains negative nearby. Thus a change in which function is larger can occur only at a point where \(f(a)=g(a)\). Solving \(f(x)=g(x)\) can therefore locate candidate switch points for continuous inputs.
This reasoning depends on continuity. For arbitrary functions, their ordering can switch without the values being equal at the switch point. Even when a switch point is found, the maximum and minimum formulas above already guarantee continuity there if both inputs are continuous; a piecewise representation is useful for understanding which formula applies, not a replacement for the theorem.
Worked Example: Maximum of Two Polynomials
Find and analyze \(M(x)=\max(x^2,2x)\). Both \(x^2\) and \(2x\) are polynomials, hence continuous for every real \(x\). The maximum theorem immediately implies that \(M\) is continuous for every real \(x\).
To describe which expression gives the maximum, solve the equality \(x^2=2x\):
Compare the expressions by calculating \(x^2-2x=x(x-2)\). For \(x<0\), both factors are negative, so their product is positive and \(x^2>2x\). For \(0<x<2\), the factors have opposite signs, so \(x^2<2x\). For \(x>2\), both factors are positive, so \(x^2>2x\). At \(x=0\) and \(x=2\), the two expressions are equal. Therefore
The overlapping endpoint descriptions agree because the competing values are equal there. At \(x=0\), \(M(0)=\max(0,0)=0\); the left formula has limit \(0^2=0\), and the middle formula has limit \(2(0)=0\). At \(x=2\), \(M(2)=\max(4,4)=4\); the middle formula has limit \(2(2)=4\), and the right formula has limit \(2^2=4\). The piecewise checks agree with the theorem: \(M\) is continuous at both switch points.
Worked Example: Minimum of Two Linear Functions
Consider \(m(x)=\min(x,2-x)\). The inputs \(x\) and \(2-x\) are continuous on the real line, so their minimum is continuous everywhere. To find the switch point, solve \(x=2-x\), obtaining \(2x=2\), hence \(x=1\).
For \(x<1\), \(x<2-x\), so the minimum is \(x\). For \(x>1\), \(2-x<x\), so the minimum is \(2-x\). At \(x=1\), both values are \(1\). Thus
At the switch point, \(m(1)=\min(1,1)=1\). The left-hand limit is \(1\), and the right-hand limit is \(2-1=1\). Both equal \(m(1)\), so the piecewise calculation confirms continuity at \(1\). Away from \(1\), each formula is linear and hence continuous.
What These Results Do Not Say
The theorems require continuous inputs. They do not claim that taking an absolute value, maximum, or minimum always turns a discontinuous function into a continuous one. Nor do they say that the continuity of a maximum proves that each input is continuous. The formulas give a reliable sufficient condition: when the inputs are continuous, these operations preserve continuity. A particular discontinuity may disappear after an operation, but that must be checked rather than assumed.
Worked Example: A Maximum That Is Discontinuous
Define \(f(x)=-1\) when \(x<0\), and \(f(x)=1\) when \(x\geq 0\). Let \(g(x)=0\) for every real \(x\), and set \(H(x)=\max(f(x),g(x))\). The function \(g\) is continuous, but \(f\) has a jump at \(0\). Direct comparison gives
At \(x=0\), \(H(0)=\max(1,0)=1\). The left-hand limit is \(0\), while the right-hand limit is \(1\). Since these one-sided limits are unequal, \(H\) is discontinuous at \(0\). It would be incorrect to invoke the maximum theorem here: its required hypothesis that both inputs be continuous at \(0\) is not satisfied. This example also shows why, without continuity assumptions, the order of two functions can change across a point even though their values are unequal at that point.
A Reliable Procedure
For an expression involving absolute values, maximums, or minimums, use the following sequence of checks.
Write down the functions inside the absolute value, maximum, or minimum, and note their common domain.
Use known continuity rules to determine whether each input is continuous at the point or throughout the interval in question.
Absolute value preserves continuity, and the maximum and minimum formulas reduce to sums, differences, absolute values, and constant multiples.
For continuous inputs, solve their equality to locate possible changes in ordering, compare them on each side, and check that the formulas agree at the switch.
The central distinction is between a formula and its hypotheses. Absolute value and maximum or minimum operations behave well with continuous inputs, but the continuity conclusion must be supported by the relevant assumptions. Piecewise comparisons can make the behavior visible, while the algebraic identities explain why the general continuity results hold.
Check Your Understanding
Use the continuity results and formulas from this tutorial to answer the following.
- Why does continuity of \(f\) at \(a\) imply continuity of \(|f|\) at \(a\)? State the inequality that justifies the implication.
- Write formulas for \(\max(f,g)\) and \(\min(f,g)\) using \(f\), \(g\), and \(|f-g|\).
- Find the switch point for \(\max(x+1,3-x)\), and state which expression is larger on each side.
- If \(f\) and \(g\) are continuous at \(a\), what conclusion follows about \(\min(f,g)\)? Briefly explain why.
- Why can the maximum theorem not be applied to two functions unless its continuity hypotheses are checked?