Signed accumulation and absolute accumulation
A definite integral records signed accumulation: contributions where the integrand is negative reduce the total. Taking the absolute value of the integral gives the size of that final signed total. By contrast, integrating the absolute value of the function makes every contribution nonnegative before adding them. These two procedures need not give the same answer.
The distinction matters whenever a function changes sign. For instance, positive and negative parts can cancel in the integral, even though both contribute positively to the integral of the absolute value. The relationship between the two quantities is governed by a useful bound.
Continuity is a convenient sufficient condition here: it ensures that both \(f\) and \(|f|\) are integrable on the interval. The result also holds whenever the relevant integrals exist and the usual comparison and linearity properties apply. We state the theorem for continuous functions to keep the conditions straightforward.
Why the bound holds
At every point, a real number lies between its negative absolute value and its absolute value. Thus \(-|f(x)|\le f(x)\le |f(x)|\). Integrating these inequalities preserves their order because integral comparison applies to integrable functions on an interval with \(a\le b\).
Write \(I=\int_a^b f(x)\,dx\) and \(J=\int_a^b |f(x)|\,dx\). Since \(J\ge 0\), the inequalities \(-J\le I\le J\) mean exactly that \(|I|\le J\). This proves the result.
This argument also explains the mechanism behind the bound. The signed integral cannot exceed the total nonnegative accumulation in either direction. The bound may be strict if positive and negative contributions both occur, but sign change alone does not guarantee strictness: cancellation could be absent if one sign occurs only at isolated points. In particular, if \(f\ge0\) throughout the interval, then \(\int_a^b f(x)\,dx\ge0\) and \(|f(x)|=f(x)\), so equality holds.
Computing the integral of an absolute value
To evaluate \(\int_a^b|f(x)|\,dx\), first determine where \(f\) is positive, negative, or zero. On an interval where \(f\ge0\), \(|f|=f\); where \(f\le0\), \(|f|=-f\). A zero where the sign changes is therefore a natural place to split the integral. The absolute-value bound itself does not require splitting, but calculating its right-hand side often does.
Worked Example: A linear function with unequal positive and negative contributions
Compare \(\left|\int_0^3(x-1)\,dx\right|\) with \(\int_0^3|x-1|\,dx\). The function \(x-1\) is negative on \([0,1)\), zero at \(x=1\), and positive on \((1,3]\).
First calculate the signed integral. An antiderivative is \(F(x)=x^2/2-x\), since \(F'(x)=x-1\). Therefore
Its absolute value is \(\left|\frac32\right|=\frac32\). Next split the absolute-value integral at the sign change. On \([0,1]\), \(|x-1|=1-x\); on \([1,3]\), \(|x-1|=x-1\). Hence
Thus \(\frac32\le\frac52\), as the theorem requires. The signed integral subtracts the negative contribution from the positive one; the absolute-value integral adds their magnitudes. Differentiating \(F\) gives \(F'(x)=x-1\), and the piecewise expressions used for \(|x-1|\) have the correct signs on their respective intervals.
Complete cancellation does not mean zero total magnitude
A particularly clear case occurs when the positive and negative contributions balance exactly. The signed integral is then zero, but the absolute-value integral can still be positive. This is why the bound is useful: it controls the final net accumulation by a quantity that does not hide cancellation.
Worked Example: A sign-changing function whose integral is zero
Let \(f(x)=x-2\) on \([0,4]\). It is negative for \(0\le x<2\), zero at \(2\), and positive for \(2<x\le4\). An antiderivative is \(F(x)=x^2/2-2x\), because \(F'(x)=x-2\). The signed integral is
So its absolute value is also zero. For the integral of the absolute value, use \(|x-2|=2-x\) on \([0,2]\) and \(|x-2|=x-2\) on \([2,4]\):
The result is \(0\le4\). To check the sign and the cancellation directly, the signed integrals on the two pieces are \(\int_0^2(x-2)\,dx=-2\) and \(\int_2^4(x-2)\,dx=2\); they add to zero. Their absolute-value contributions are \(2\) and \(2\), which add to \(4\).
Equality and strict inequality
The inequality can be an equality, including when the function changes sign only at points that contribute no interval of positive or negative accumulation. For a simple equality case, take a nonnegative function: removing its absolute value changes nothing. Here is a direct calculation.
Worked Example: Equality for a nonnegative function
Let \(f(x)=x^2\) on \([0,2]\). Since \(x^2\ge0\), we have \(|x^2|=x^2\) throughout the interval. An antiderivative is \(F(x)=x^3/3\), since \(F'(x)=x^2\). Therefore
Consequently, \(\left|\int_0^2x^2\,dx\right|=\frac83=\int_0^2|x^2|\,dx\). The antiderivative check is \(\frac{d}{dx}(x^3/3)=x^2\), and the equality follows because the integrand never contributes a negative amount.
When both positive and negative contributions have nonzero accumulated magnitude, cancellation makes the absolute value of the signed integral smaller than the integral of the absolute value. The example \(x-2\) on \([0,4]\) showed the extreme case: complete cancellation on the left, while the right side remains positive. The inequality covers both equality and strict inequality without requiring a separate formula for each situation.
A common mistake: taking the absolute value too late
A tempting but incorrect shortcut is to calculate the signed integral and then treat its absolute value as the total magnitude accumulated by the function. The calculation for \(x-2\) exposes the error:
The first quantity is the magnitude of the net signed result, not the sum of the magnitudes of all contributions. To find the latter, take the absolute value of the integrand before integrating, determine its sign on each subinterval, and split at sign changes when needed. The theorem says the first quantity is no larger than the second; it does not say the quantities are always equal.
Check Your Understanding
Try each question by identifying the sign of the integrand before evaluating any absolute-value integral.
- In one sentence, explain why \(\int_a^b|f(x)|\,dx\) cannot be smaller than \(\left|\int_a^b f(x)\,dx\right|\) when \(f\) is continuous and \(a\le b\).
- For \(f(x)=x-1\) on \([0,3]\), at what point should you split the integral of \(|f(x)|\), and why?
- Can a function change sign while still having \(\int_a^b f(x)\,dx=0\) and \(\int_a^b|f(x)|\,dx>0\)? Give a reason based on the worked examples.
- Give a condition on \(f\) that guarantees equality in the absolute-value bound, and explain why.
- What does \(\left|\int_a^b f(x)\,dx\right|\) measure that \(\int_a^b|f(x)|\,dx\) does not?