Why Use the Largest Values on Each Subinterval?
A partition breaks an interval into smaller pieces. On each piece, a function may take many different values. To construct an upper sum, we record the least height that is at least as large as every function value on that piece, then multiply that height by the piece’s width.
This construction gives a systematic way to describe a collection of enclosing rectangles. The height is chosen separately on each subinterval, so it reflects the function’s values there rather than relying on a single sample point.
Partitions, Supremums, and Upper Sums
Let \(a<b\). A partition \(P\) of \([a,b]\) is a finite increasing list of points
The partition divides \([a,b]\) into the closed subintervals \([x_{i-1},x_i]\), for \(i=1,\ldots,n\). The width of the \(i\)th subinterval is
Each width is positive because the partition points are strictly increasing. Suppose \(f:[a,b]\to\mathbb{R}\) is bounded. For each subinterval, its supremum is the least real number that is greater than or equal to every value of \(f\) on that subinterval. Write
The set inside the supremum is nonempty and bounded, so its supremum exists as a real number. The supremum need not be a value of the function: it is not always a maximum.
Each term uses the supremum on one subinterval, multiplied by that subinterval’s width. The sum then adds those contributions across the whole partition. The heights \(M_i\) can be positive, zero, or negative; the definition is algebraic and applies to signed function values as well as positive ones.
Why the Supremum Gives an Upper Height
For every \(x\in[x_{i-1},x_i]\), the definition of supremum gives \(f(x)\leq M_i\). In particular, if \(\xi_i\) is any chosen point in that subinterval, then \(f(\xi_i)\leq M_i\). Since \(\Delta x_i>0\), multiplying preserves the inequality:
Adding these inequalities for \(i=1,\ldots,n\) proves that the sum formed from any one chosen function value on each subinterval is at most the upper sum:
This calculation explains the role of the supremum: it provides a height that is at least as large as every function value on its subinterval. When \(f\) is continuous on \([a,b]\), it is also continuous on each closed subinterval \([x_{i-1},x_i]\). The extreme value theorem says it attains a maximum there. Thus for continuous \(f\), each supremum \(M_i\) can be found as the maximum value on that subinterval. For a bounded function that is not continuous, a supremum may exist without being attained.
Worked Examples
Worked Example: An Increasing Continuous Function
Find the upper sum for \(f(x)=x^2\) on \([0,2]\) using the partition \(0,\frac12,1,\frac32,2\).
The four subintervals all have width \(\frac12\). On \([0,2]\), \(x^2\) is increasing, so its maximum on each subinterval is at the right endpoint. The maximum values are
Therefore, the supremum on each subinterval is the corresponding value in this list, and
Check: the four rectangle areas are \(\frac18,\frac12,\frac98,\) and \(2\). Their sum is \(\frac{30}{8}=\frac{15}{4}\), matching the upper sum.
Worked Example: A Decreasing Function with Negative Values
Find the upper sum for \(f(x)=2-x\) on \([0,3]\) using the partition \(0,\frac12,2,3\).
The subintervals are \([0,\frac12]\), \([\frac12,2]\), and \([2,3]\), with widths \(\frac12,\frac32,\) and \(1\), respectively. Since \(2-x\) decreases as \(x\) increases, its maximum on each subinterval is at the left endpoint:
Using those heights and widths gives
Check: the three terms are \(1\), \(\frac94\), and \(0\), so their sum is \(\frac{4}{4}+\frac{9}{4}+\frac{0}{4}=\frac{13}{4}\). The last supremum is zero even though \(f(x)<0\) for \(x>2\); the value \(f(2)=0\) is included in the subinterval \([2,3]\).
Worked Example: A Piecewise Function with an Unattained Supremum
Define \(f:[0,2]\to\mathbb{R}\) by
Find the upper sum for the partition \(P=\{0,1,2\}\). On \([0,1]\), the function is constantly \(1\), so \(M_1=1\). On \([1,2]\), the function takes the value \(3\) at every point strictly between \(1\) and \(2\), but it takes the value \(1\) at \(1\) and \(0\) at \(2\). Its supremum is \(M_2=3\). This supremum is not attained on \([1,2]\): the function never equals \(3\) there.
Both subintervals have width \(1\). Therefore,
Check: the first interval contributes \(1\), the second contributes \(3\), and \(1+3=4\). This example shows why the definition uses a supremum rather than requiring a maximum.
A Reliable Calculation Process
The following sequence keeps the interval widths and the function heights distinct until each subinterval’s contribution is calculated.
Write them in increasing order, including both endpoints of the full interval.
For each adjacent pair, calculate \(\Delta x_i=x_i-x_{i-1}\).
Determine the least upper bound of the function values on that closed subinterval. If the function is continuous there, find its maximum.
Compute each \(M_i\Delta x_i\), then add the terms to obtain \(U(f,P)\).
For a piecewise-defined function, check the formula and the defined endpoint values carefully. If a partition point is a point of discontinuity, each adjacent closed subinterval includes that point, so its function value must be considered when finding the supremum on either subinterval.
Common Mistake: Using Right Endpoints Automatically
A frequent error is to evaluate the function at the right endpoint of every subinterval and treat those values as the upper heights. That works for some increasing functions, but it does not work in general. The decreasing function in the second example makes the error explicit. Using right endpoints \( \frac12,2,3\) gives the values \(\frac32,0,-1\), and the resulting calculation would be
This is not the upper sum. In particular, on \([0,\frac12]\), the function reaches \(2\), which is greater than its right-endpoint value \(\frac32\). On \([\frac12,2]\), it reaches \(\frac32\), not the right-endpoint value \(0\). The correct upper heights are determined by the supremum on each full subinterval, giving \(U(f,P)=\frac{13}{4}\), as calculated above.
What the Upper Sum Records
An upper sum depends on both the function and the particular partition. The same function can produce different upper sums when the partition points change, because the subintervals—and therefore their suprema and widths—change. To calculate one upper sum, no integration is needed: identify the supremum on each subinterval, multiply by the width, and add.
The result is a finite sum built from local information about the function. For continuous functions, the extreme value theorem often makes each local supremum straightforward to find. For piecewise functions, the supremum may instead come from a one-sided range of values, even if no point in the subinterval attains it. Keeping that distinction in view makes the definition applicable to both situations.
Check Your Understanding
For each question, keep the supremum and the subinterval width separate until you form the corresponding term of the upper sum.
- For a bounded function \(f\) and a partition \(a=x_0<\cdots<x_n=b\), what is the definition of \(M_i\) and of \(U(f,P)\)?
- For \(f(x)=x\) on \([0,2]\) with partition \(0,1,2\), find the supremum on each subinterval and calculate the upper sum.
- Why does continuity on a closed subinterval guarantee that its supremum is a maximum?
- Can a bounded function have a supremum on a subinterval that it never attains? Explain using the piecewise example above.
- For a decreasing function, why can evaluating only at each right endpoint fail to produce an upper sum?