From a Formula to an Average Value
A function can vary throughout an interval, so its average value is not generally the function’s value at the midpoint or the average of its endpoint values. To calculate the average value from a formula, we use the function’s definite integral over the interval and divide by the interval’s length.
The calculation has two essential parts: find the signed accumulation represented by the integral, then scale it by how long the interval is. The same procedure works whether the formula is a polynomial, a trigonometric function, an exponential function, or a combination of these.
The condition \(a<b\) ensures the interval has positive length, so division by \(b-a\) is defined. Continuity is sufficient for the definite integral and average value to exist; the polynomial, trigonometric, and exponential formulas used in the examples below are continuous on their specified intervals.
A Reliable Calculation Process
The formula is short, but accurate work depends on keeping the integral, its bounds, and the interval length together. In particular, the denominator is the difference between the right and left endpoints—not one of the endpoints by itself.
Write its endpoints \(a\) and \(b\), with \(a<b\), and calculate its length \(b-a\).
Find an antiderivative \(F\) of \(f\), then evaluate \(F(b)-F(a)\).
Use \(f_{\mathrm{avg}}=\frac{1}{b-a}\int_a^b f(x)\,dx\).
Multiply the proposed average by \(b-a\). The product must equal the definite integral.
When evaluating the integral, substitute the upper endpoint first and subtract the value at the lower endpoint. This order matters: the definite integral from \(a\) to \(b\) is \(F(b)-F(a)\), not the reverse.
Worked Example: A Polynomial on a Given Interval
Worked Example: A Polynomial on a Given Interval
Find the average value of \(f(x)=x^2+1\) on \([1,3]\).
Step 1: Find the interval length. The endpoints are \(a=1\) and \(b=3\), so
Step 2: Find and evaluate an antiderivative. An antiderivative is \(F(x)=\frac{x^3}{3}+x\), because
Substitute the endpoints, keeping the upper value first:
Step 3: Divide by the interval length.
Check: The antiderivative differentiates to the original function, and multiplying the calculated average by the interval length recovers the integral:
Therefore the average value is \(\frac{16}{3}\).
Worked Example: A Trigonometric Function
Worked Example: A Trigonometric Function
Find the average value of \(g(x)=\sin x\) on \([0,\pi]\).
Step 1: Find the interval length.
Step 2: Integrate. An antiderivative of \(\sin x\) is \(-\cos x\), since
Now evaluate at both endpoints:
Step 3: Divide by the interval length.
Check: The derivative of \(-\cos x\) is \(\sin x\), and the proposed average times the interval length gives the integral:
Thus the average value is exactly \(\frac{2}{\pi}\).
Worked Example: An Exponential Function
Worked Example: An Exponential Function
Find the average value of \(h(x)=e^{2x}\) on \([0,\ln 2]\).
Step 1: Find the interval length. The upper endpoint is \(\ln 2\) and the lower endpoint is \(0\), so
Step 2: Integrate. An antiderivative of \(e^{2x}\) is \(\frac{1}{2}e^{2x}\), because the chain rule gives
Evaluate it at the two endpoints. Since \(e^{2\ln 2}=e^{\ln 4}=4\),
Step 3: Divide by the interval length.
Check: The stated antiderivative differentiates to \(e^{2x}\), and multiplying the average by the interval length gives the evaluated integral:
The average value is \(\frac{3}{2\ln 2}\). This exact form avoids rounding; if a decimal is requested, round only at the final step.
Why Dividing by the Interval Length Works
The formula represents the average of function values across the interval, not just the total integral. To see why the length appears in the denominator, divide \([a,b]\) into \(n\) equal subintervals. Each has width \(\Delta x=\frac{b-a}{n}\). Choose a sample point \(x_i^*\) in each subinterval. The arithmetic mean of the \(n\) sampled function values is
Since \(n=\frac{b-a}{\Delta x}\), this mean can be rewritten as
As the subintervals become narrower, the sum in parentheses approaches the definite integral of \(f\) on \([a,b]\). Therefore the limiting average of the sampled function values is
This shows why the integral alone is not the average: it measures accumulation across the whole interval. Dividing by the interval length scales that accumulation to an average value per unit of input. If \(x\) represents time, for example, the length is a duration; the formula then averages the function’s values over that duration.
A Common Error: Dividing by an Endpoint
A frequent mistake is to divide the integral by the right endpoint rather than by the interval’s length. Those quantities are not generally the same. For example, consider \(q(x)=x^2\) on \([1,3]\). Its integral is
A wrong calculation might divide by \(3\), the upper endpoint, and report \(\frac{26}{9}\). But the interval length is \(3-1=2\), not \(3\). The correction is
The check exposes the error: the wrong value gives \(\frac{26}{9}\cdot2=\frac{52}{9}\), which is not the integral \(\frac{26}{3}\). The corrected value gives \(\frac{13}{3}\cdot2=\frac{26}{3}\), as required.
Putting the Calculation in Context
When the function has units, the average value has the same units as the function. For example, if \(f(x)\) measures a quantity in meters and \(x\) is measured in seconds, then the integral has units of meter-seconds and the interval length has units of seconds. Dividing leaves meters, matching the units of \(f\).
For exact answers, keep expressions such as \(\frac{2}{\pi}\) or \(\frac{3}{2\ln 2}\) in exact form unless a decimal is requested. For a decimal, retain precision during the calculation and round only the final result. In every case, a useful final check is to multiply the proposed average by the interval length and compare the result with the definite integral.
Check Your Understanding
For each question, show the interval length, evaluate the definite integral, and divide by that length.
- Find the average value of \(f(x)=3x^2-2\) on \([0,2]\).
- Find the average value of \(g(x)=\cos x\) on \([0,\frac{\pi}{2}]\).
- Find the average value of \(h(x)=e^x\) on \([0,\ln 3]\).
- A student calculates \(\int_2^5 p(x)\,dx=12\) and reports an average value of \(\frac{12}{5}\). What interval length should be used, and what is the corrected average?
- For any one of your answers, verify the antiderivative by differentiation and check that the average multiplied by the interval length equals the definite integral.