What is the average value of f(x)?
Type a function of x and an interval [a, b]. The page gives the average value of f on the interval, exactly when it can, and the definite integral.
- Average value
- 3.5
The average value of x + 1 from 0 to 5 is 3.5.
- Exact average
- 7/2
- ∫ f(x) dx from a to b
- 17.5
Average value: 3.5. The average value of x + 1 from 0 to 5 is 3.5.
How to calculate
Finds the average value of a function, f_ave = (1/(b − a)) ∫ f(x) dx from a to b, exactly when it can.
Example with the default inputs (Function f(x) x + 1, From x = a 0, To x = b 5): The average value of x + 1 from 0 to 5 is 3.5.
Method: f_ave = (1/(b − a)) ∫ₐᵇ f(x) dx, the integral from a computer algebra system, checked numerically.
- f is integrable on [a, b]; angles in radians.
- An answer that fails its check is not shown.
Worked examples
Each example is checked against the calculator on every build.
- Function f(x) x + 1, From x = a 0, To x = b 5 gives Average value 3.5, Exact average 7/2, ∫ f(x) dx from a to b 17.5.Source: OpenStax, Calculus Volume 1, section 5.2 The Definite Integral, Example 5.14 (https://openstax.org/books/calculus-volume-1/pages/5-2-the-definite-integral): ∫₀⁵ (x + 1) dx = 35/2, average 7/2
- Function f(x) sin(x), From x = a 0, To x = b pi gives Average value 0.63662, Exact average 2/π, ∫ f(x) dx from a to b 2.
- Function f(x) 6 - 2x, From x = a 0, To x = b 3 gives Average value 3, Exact average 3, ∫ f(x) dx from a to b 9.
How it works
For a function f of x and numbers a < b (a constant such as pi is allowed):
- A computer algebra system (nerdamer, open source) finds ∫ₐᵇ f(x) dx. The SDK checks it against a numeric integral and refuses it when f has a pole or is not real inside [a, b].
- f_ave = (1/(b − a)) ∫ₐᵇ f(x) dx.
- The exact average is the algebra’s simplified (exact integral)/(b − a), shown when it holds no rounded number and is at most 120 characters long. When it agrees with the decimal average to 10⁻⁹, its value is the one shown, so b − a from typed decimals is exact.
Angles are in radians and ln is the natural logarithm. An answer that fails its check is not shown.
Worked examples by hand
f(x) = x + 1 on [0, 5] (OpenStax Calculus Volume 1, Example 5.14). The region is a trapezoid of area (1 + 6)/2 × 5 = 35/2, so f_ave = (35/2)/5 = 7/2 = 3.5.
f(x) = sin x on [0, π]. ∫₀^π sin x dx = [−cos x]₀^π = 1 + 1 = 2, so f_ave = 2/π ≈ 0.6366197724.
f(x) = 6 − 2x on [0, 3] (Checkpoint 5.13). ∫₀³ (6 − 2x) dx = 18 − 9 = 9, so f_ave = 9/3 = 3.
Other questions people ask
What is the average value of a function?
The height of the rectangle on [a, b] that has the same area as the region under f: f_ave = (1/(b − a)) ∫ₐᵇ f(x) dx. It is the limit of the ordinary average of f at n equally spaced points as n grows.
How do I find the average value of a function?
Integrate f from a to b, then divide by the length b − a. For f(x) = x + 1 on [0, 5]: ∫₀⁵ (x + 1) dx = 35/2, and 35/2 ÷ 5 = 7/2.
Can the average value be negative?
Yes. Area below the x-axis counts as negative in the integral, so a function that is mostly negative on [a, b] has a negative average. The average of sin x on [0, 2π] is 0.
What is the mean value theorem for integrals?
If f is continuous on [a, b], there is at least one c in [a, b] with f(c) = f_ave. The graph of f crosses the height of its average somewhere on the interval.
Is the average value the same as the average rate of change?
No. The average rate of change is (f(b) − f(a))/(b − a), the slope of a secant line. The average value is the average height of f. The average value of f′ on [a, b] is the average rate of change of f.
Can I use pi in the limits?
Yes. Type a and b as numbers or constants such as pi/2 or 2pi. The exact answer then keeps π: the average of sin x on [0, π] is 2/π.
How is the answer checked?
The definite integral comes from a computer algebra system and is checked against a numeric integral. When the algebra finds no exact value, the page still shows the checked decimal.