Two Different Kinds of Average
A function can take both positive and negative values on an interval. Its average value accounts for the signs: positive contributions increase the average, while negative contributions decrease it. As a result, contributions can cancel.
Sometimes the question is instead about the typical magnitude of the function, regardless of its sign. That calls for averaging the absolute values. These are related quantities, but they answer different questions.
The denominator \(b-a\) is the interval's length in the input variable. Both averages therefore use the same normalization. The difference is the integrand: \(f(x)\) for the signed average and \(|f(x)|\) for the average absolute value.
Separate the Positive and Negative Contributions
To describe cancellation precisely, define the positive and negative parts of \(f\) by \(f^+(x)=\max(f(x),0)\) and \(f^-(x)=\max(-f(x),0)\). Both are nonnegative. At each input, at most one is nonzero, and they satisfy \(f=f^+-f^-\) and \(|f|=f^++f^-\).
Let \(P=\int_a^b f^+(x)\,dx\) and \(N=\int_a^b f^-(x)\,dx\). These quantities are nonnegative. The signed integral is \(P-N\), whereas the integral of the absolute value is \(P+N\). Dividing each by the interval length gives the corresponding averages.
This decomposition explains why a signed average can be small even when the function's values are often far from zero: substantial positive and negative contributions may nearly or completely cancel. In contrast, the average absolute value adds their magnitudes instead of subtracting them.
A Relationship Between the Two Averages
The average absolute value is always at least as large as the absolute value of the signed average. To see why, use the nonnegative quantities \(P\) and \(N\). For any nonnegative numbers, the absolute value of their difference is no greater than their sum. Thus \(|P-N|\leq P+N\). Dividing by the positive interval length preserves the inequality.
The inequality does not say that the signed average is always positive. It says that its magnitude cannot exceed the average absolute value. If positive and negative contributions balance exactly, the signed average is zero even though the average absolute value may be positive.
Worked Example: A Linear Function with Equal Positive and Negative Contributions
Worked Example: A Linear Function with Equal Positive and Negative Contributions
Find the signed average value and the average absolute value of \(f(x)=x-1\) on \([0,2]\).
The interval length is \(2-0=2\). First calculate the signed integral:
Therefore the signed average is \(0/2=0\). For the absolute value, \(x-1\) is negative on \([0,1)\) and positive on \((1,2]\), so split at \(x=1\):
Thus the average absolute value is \(1/2\). As a check, the negative contribution to the signed integral is \(-1/2\), and the positive contribution is \(1/2\); their sum is \(0\), while their magnitudes sum to \(1\). Dividing these totals by the interval length \(2\) gives \(0\) and \(1/2\), respectively.
Finding Where to Split
To calculate an integral of \(|f(x)|\), identify where \(f\) is positive and where it is negative. On intervals where \(f(x)\geq 0\), \(|f(x)|=f(x)\); where \(f(x)<0\), \(|f(x)|=-f(x)\). A sign change can therefore require splitting the integral at a zero of \(f\).
Determine where \(f\) is positive, negative, or zero on the interval.
Use \(f\) where \(f\geq 0\), and \(-f\) where \(f<0\).
Add the pieces for \(\int_a^b |f(x)|\,dx\), then divide by \(b-a\).
Zeros inside the interval are natural places to split, but the sign must still be checked: a function can touch zero without changing sign. The absolute-value integral uses the function's sign on each subinterval, not merely a list of its zeros.
Worked Example: A Piecewise Function with Exact Cancellation
Worked Example: A Piecewise Function with Exact Cancellation
Let \(g(x)=2\) for \(0\leq x<1\), and \(g(x)=-1\) for \(1\leq x\leq 3\). Find both averages on \([0,3]\). The value assigned at the single point \(x=1\) does not affect either integral.
The interval length is \(3\). The signed integral is the sum of the constant value times the length of each piece:
So the signed average is \(0/3=0\). For the absolute-value integral, the two magnitudes are \(2\) and \(1\):
The average absolute value is \(4/3\). Check the contributions: the positive signed contribution is \(2\), and the negative signed contribution is \(-2\), giving net change \(0\). Their magnitudes add to \(4\), so dividing by \(3\) gives the stated absolute average.
Worked Example: A Function with Unequal Positive and Negative Contributions
Worked Example: A Function with Unequal Positive and Negative Contributions
For \(h(x)=x^2-1\) on \([-2,2]\), find the signed average and the average absolute value. The function is negative for \(-1<x<1\) and positive for \(-2\leq x<-1\) and \(1<x\leq 2\).
An antiderivative of \(x^2-1\) is \(F(x)=x^3/3-x\). The signed integral is
The interval length is \(2-(-2)=4\), so the signed average is \((4/3)/4=1/3\). To find the average absolute value, calculate the positive and negative contributions separately. On \([1,2]\), the positive contribution is
By symmetry, the contribution on \([-2,-1]\) is also \(4/3\), giving total positive contribution \(8/3\). On \([-1,1]\), the function is negative, so its contribution to the integral of the absolute value is
Consequently, \(\int_{-2}^{2}|x^2-1|\,dx=8/3+4/3=4\), and the average absolute value is \(4/4=1\). Check the signed integral using the same contributions: \(8/3-4/3=4/3\), which reproduces the signed average \(1/3\). The inequality also holds: \(|1/3|\leq 1\).
A Common Mistake: Treating Cancellation as Magnitude
A frequent error is to calculate the signed integral correctly, then interpret its average as the typical size of the function. For \(f(x)=x-1\) on \([0,2]\), one might write:
The first equation correctly gives the signed average, but the conclusion about magnitude is wrong. Positive and negative contributions canceled; neither contribution had magnitude zero. To find the average magnitude, the absolute value must be inside the integral:
Use the signed average when direction or net effect matters. Use the average absolute value when the question asks about magnitude without regard to sign. The wording of a problem determines which quantity is appropriate.
Check Your Understanding
For each question, distinguish carefully between a signed contribution and a contribution to the average absolute value.
- For \(f(x)=x-2\) on \([0,4]\), where does the function change sign?
- For that function, compute the signed average value.
- For the same function and interval, compute the average absolute value.
- If the positive and negative contributions to an integral are equal in magnitude, what is the signed average?
- State the inequality relating the absolute value of the signed average to the average absolute value.