Tutorials › Calculus I › Changing Function Values at Finitely Many Points

Riemann Sums and the Integral · Tutorial 966 of 1495

Changing Function Values at Finitely Many Points

Learn why finitely many altered values cannot change a Riemann integral, and how to prove it by isolating those points in a partition.

Intermediate 10 min read

What You'll Learn

  • State the result for a bounded Riemann-integrable function changed at finitely many points.
  • Construct a partition that confines the altered points to intervals of small total length.
  • Use Darboux upper and lower sums to prove the modified function is integrable.
  • Compare the two functions’ Darboux sums to prove their integrals are equal.
  • Recognize why merely placing an altered point at a partition boundary is not enough.

Why finitely many values can be changed

A definite Riemann integral records accumulated behavior over an interval. A function’s value at one point, or at any finite collection of points, does not occupy an interval of positive length. This suggests that changing finitely many values should not change the integral. The proof must nevertheless account for the fact that a Riemann sum or Darboux sum can be affected by values at partition boundaries.

The key is to surround each changed point with a small interval. The total length of these intervals can be made as small as desired. Since the functions are bounded, their contributions on those intervals are correspondingly small. Away from them, the functions agree.

Theorem: Let \(f:[a,b]\to\mathbb{R}\) be bounded and Riemann integrable. Suppose \(g:[a,b]\to\mathbb{R}\) is bounded and differs from \(f\) at only finitely many points. Then \(g\) is Riemann integrable and \(\int_a^b g(x)\,dx=\int_a^b f(x)\,dx\).

Darboux sums and the proof strategy

A partition \(P\) of \([a,b]\) is a finite list \(a=x_0<x_1<\cdots<x_m=b\). Its subintervals are \([x_{j-1},x_j]\), with lengths \(\Delta x_j=x_j-x_{j-1}\). For a bounded function \(u\), let \(M_j(u)\) and \(m_j(u)\) denote its supremum and infimum on the \(j\)-th subinterval. The upper and lower Darboux sums are

$$ U(u,P)=\sum_{j=1}^{m} M_j(u)\,\Delta x_j, \qquad L(u,P)=\sum_{j=1}^{m} m_j(u)\,\Delta x_j. $$

The Darboux criterion says that a bounded function is Riemann integrable if, for every \(\varepsilon>0\), there is a partition \(P\) such that \(U(u,P)-L(u,P)<\varepsilon\). For an integrable function, its integral lies between the lower and upper sums for every partition. We will use these facts to prove both integrability and equality of integrals.

Write the distinct points where \(f\) and \(g\) differ as \(c_1,\ldots,c_n\). Choose small, disjoint intervals around these points, using one-sided intervals if a changed point is an endpoint. We can make their total length as small as we wish. Refine a partition by adding the endpoints of these intervals and the points \(c_i\). Then every subinterval whose closure contains a changed point lies inside one of the small intervals. Call such subintervals affected. All other subintervals are unaffected, and \(f=g\) everywhere on each of them.

Proof of the theorem

Because both functions are bounded, choose \(M\geq 0\) such that \(|f(x)|\leq M\) and \(|g(x)|\leq M\) for every \(x\in[a,b]\). On any affected subinterval, the oscillation of either function is at most \(2M\). Here the oscillation means the supremum minus the infimum. The total length of affected subintervals can be made arbitrarily small by the choice of the surrounding intervals.

1
Choose a partition good for \(f\).
Given \(\varepsilon>0\), integrability of \(f\) gives a partition \(P\) with \(U(f,P)-L(f,P)<\varepsilon/2\).
2
Isolate the changed points.
Choose disjoint surrounding intervals whose total length is less than \(\eta\), where \(\eta>0\) will be chosen small. Refine \(P\) to a partition \(Q\) that includes their endpoints and every \(c_i\). The total length of affected subintervals of \(Q\) is less than \(\eta\).
3
Bound the upper-minus-lower sum for \(g\).
On unaffected subintervals, \(f=g\), so their contributions to the Darboux gap for \(g\) equal those for \(f\). Refinement cannot increase the Darboux gap for \(f\). Affected subintervals contribute at most \(2M\) times their total length. Thus \(U(g,Q)-L(g,Q)<\varepsilon/2+2M\eta\).

If \(M=0\), both functions are identically zero and the result is immediate. If \(M>0\), choose \(\eta<\varepsilon/(4M)\). The bound just obtained is then less than \(\varepsilon\), so the Darboux criterion proves that \(g\) is integrable.

It remains to prove the equality of integrals. Use the same refined partition \(Q\). On unaffected subintervals, the upper contribution for \(g\) minus the lower contribution for \(f\) is exactly the corresponding Darboux-gap contribution for \(f\). On affected subintervals, the supremum of \(g\) minus the infimum of \(f\) is at most \(2M\). Consequently,

$$ U(g,Q)-L(f,Q) \leq U(f,Q)-L(f,Q)+2M\eta <\frac{\varepsilon}{2}+2M\eta. $$

Since \(\int_a^b g(x)\,dx\leq U(g,Q)\) and \(\int_a^b f(x)\,dx\geq L(f,Q)\), this bounds \(\int_a^b g(x)\,dx-\int_a^b f(x)\,dx\) from above. Interchanging \(f\) and \(g\) gives the same bound for the difference in the other direction. Therefore

$$ \left|\int_a^b g(x)\,dx-\int_a^b f(x)\,dx\right| <\frac{\varepsilon}{2}+2M\eta. $$

We can choose \(\eta\) arbitrarily small, as well as choose the original Darboux gap arbitrarily small. Thus the absolute difference between the two integrals is less than every positive tolerance. It must be zero, proving that the integrals are equal.

Worked examples

Worked Example: Changing two values of a constant function

Let \(f(x)=2\) on \([0,4]\). Define \(g\) to equal \(f\) except that \(g(1)=7\) and \(g(3)=-4\). The constant function has integral

$$ \int_0^4 f(x)\,dx=2(4-0)=8. $$

The functions are bounded, and they differ at just two points. For example, both are bounded in absolute value by \(M=7\). The theorem therefore gives

$$ \int_0^4 g(x)\,dx=\int_0^4 f(x)\,dx=8. $$

Check: Outside \(x=1\) and \(x=3\), the function \(g\) is still \(2\). The changed values occur at only two points, so the theorem applies; the integral remains \(8\), not the result of adding the isolated values \(7\) and \(-4\) to the area.

Worked Example: Changing values of a linear function

Let \(f(x)=x\) on \([0,1]\). Define \(g\) to equal \(f\) except that \(g(1/4)=4\) and \(g(3/4)=-3\). The area under \(f\) is a triangle with base \(1\) and height \(1\), so

$$ \int_0^1 f(x)\,dx=\frac{1}{2}(1)(1)=\frac{1}{2}. $$

Both functions are bounded in absolute value by \(M=4\), and they differ at only two points. Hence

$$ \int_0^1 g(x)\,dx=\int_0^1 f(x)\,dx=\frac{1}{2}. $$

Check: The original function has height \(f(0)=0\) at the left endpoint and \(f(1)=1\) at the right endpoint, giving the stated triangular area. The two altered values do not change the integral because they are confined to finitely many points.

Worked Example: Changing values at endpoints and an interior point

Let \(f(x)=2x+1\) on \([0,2]\). Define \(g\) to equal \(f\) except that \(g(0)=10\), \(g(1)=-5\), and \(g(2)=0\). The endpoint values of \(f\) are \(f(0)=1\) and \(f(2)=5\). The area under the line is a trapezoid, so

$$ \int_0^2 f(x)\,dx =\frac{1}{2}(1+5)(2) =6. $$

The functions differ at the three listed points only. They are bounded in absolute value by \(M=10\), so the theorem applies even though two changed points are endpoints:

$$ \int_0^2 g(x)\,dx=6. $$

Check: The unmodified line has endpoint heights \(1\) and \(5\), width \(2\), and trapezoid area \(6\). Altering its values at \(0\), \(1\), and \(2\) does not alter that integral.

A common partition mistake

It is tempting to think that placing a changed point at a partition point makes its new value irrelevant. That is not generally true: the supremum and infimum on a partition subinterval include its endpoints. For example, let \(f(x)=0\) on \([0,1]\), and change only \(g(1/2)\) to \(100\). The partition \(P=\{0,1/2,1\}\) places the changed point at a boundary, but both subintervals include it. On each subinterval, the supremum of \(g\) is \(100\) and the infimum is \(0\). Thus

$$ U(g,P)=100\left(\frac12\right)+100\left(\frac12\right)=100, \qquad L(g,P)=0, \qquad U(g,P)-L(g,P)=100. $$

This partition does not demonstrate integrability. The correction is to put boundaries on both sides of \(1/2\), close enough that the total length of the affected intervals is small. The changed value can still influence their suprema, but its contribution to the Darboux gap is bounded by \(100\) times that small total length.

Why the result matters

The theorem explains why the integral is insensitive to isolated alterations in a bounded function. A graph can have a few points moved far above or below its usual values without changing its accumulated integral. Boundedness matters: it supplies a uniform limit on the size of the effect inside the small intervals. The finiteness of the changed set matters too: finitely many points can be enclosed in intervals with arbitrarily small total length.

The proof does not say that changed values are ignored by every partition. Rather, it shows that their influence can be confined to intervals whose total length is as small as needed. This distinction is the reason the partition must be designed around the changed points.

Check Your Understanding

Use the theorem and the Darboux-sum argument to answer the following questions.

  1. What two conditions on the functions are required for the theorem?
  2. Why can the total length of intervals surrounding finitely many changed points be made arbitrarily small?
  3. Why does a partition with a changed point as a boundary not automatically remove its effect on Darboux sums?
  4. If \(f(x)=0\) on \([0,1]\) and \(g\) differs from \(f\) at three points, what is \(\int_0^1 g(x)\,dx\), provided \(g\) is bounded?
  5. In the equality proof, what bounds the difference between the upper sum for one function and the lower sum for the other on affected subintervals?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon