# Average value of a function on an interval

> AP Calculus AB · Applications of Integration
> Source: https://www.owlsprep.com/study/ap-calculus-ab-u8-average-value-of-a-function/

This module covers the definition, formula, and applications of average value of a continuous function on an interval, including the Mean Value Theorem for Integrals and calculation from multiple input types for AP Calculus AB.

**Prerequisites:** [Evaluating definite integrals via Fundamental Theorem of Calculus](https://www.owlsprep.com/study/ap-calculus-ab-u6-fundamental-theorem-calculus/); [Approximating integrals from graphs and tables](https://www.owlsprep.com/study/ap-calculus-ab-u7-riemann-sums-trapezoidal-rule/)

## Learning objectives

- State the definition and formula for the average value of a continuous function on an interval
- Apply the Mean Value Theorem for Integrals to find the guaranteed point c
- Calculate average value from explicit functions, graphs, and tables
- Interpret average value in real-world applied contexts

## What Is the Average Value of a Function?

Unlike the average of a finite set of numbers (calculated by summing values and dividing by the number of terms), the average value of a continuous function accounts for infinitely many output values across an entire closed interval. This is a core application of definite integration, worth approximately 2-3% of the total AP Calculus AB exam score, and it appears in both multiple-choice and free-response sections.

Intuitively, the average value is the constant height that, when multiplied by the width of the interval, gives the exact net area under the original function over the interval. It is directly tied to the Mean Value Theorem for Integrals, which guarantees that any continuous function actually equals its average value at least once in the open interval.

> **info**
>
> On the AP exam, you will be asked to compute average value from an explicit function, from a graph or table of values, and interpret the result in applied contexts such as temperature, velocity, or cost.

## The Average Value Formula

**Derivation:** Derive the average value formula for a continuous function on $[a,b]$

*Starting from:* The average of $n$ discrete points on $[a,b]$

1. The average of $n$ discrete points on $[a,b]$ is given by:
2. $$\text{Average} = \frac{f(x_1) + f(x_2) + ... + f(x_n)}{n}$$
3. If we split $[a,b]$ into $n$ equal subintervals, $\Delta x = \frac{b-a}{n}$, so $\frac{1}{n} = \frac{\Delta x}{b-a}$. Substitute this into the discrete average:
4. $$\text{Average} = \frac{1}{b-a} \sum_{i=1}^n f(x_i) \Delta x$$
5. As $n \to \infty$, the Riemann sum on the right converges to the definite integral of $f(x)$ from $a$ to $b$.

*Conclusion:* The average value of any continuous function $f(x)$ on the closed interval $[a,b]$ is:

$$f_{\text{avg}} = \frac{1}{b-a} \int_a^b f(x) dx$$

**Average Value of a Continuous Function** — The constant height of a rectangle with width $b-a$ that has the same net area as $f(x)$ over $[a,b]$, calculated by dividing the definite integral of $f(x)$ by the interval width.

*Notation:* f_{\text{avg}}

*Example:* For $f(x) = 3x^2 + 2x$ over $[1,3]$, $f_{\text{avg}} = 17$

**Worked example:** Find the average value of $f(x) = 3x^2 + 2x$ over the interval $[1, 3]$.

1. Identify interval endpoints and width: $a = 1$, $b = 3$, so $b - a = 3 - 1 = 2$.
2. Substitute into the average value formula:
3. $$f_{\text{avg}} = \frac{1}{2} \int_1^3 (3x^2 + 2x) dx$$
4. Evaluate the definite integral using the Fundamental Theorem of Calculus: the antiderivative is $x^3 + x^2$, so:
5. $$\left[x^3 + x^2\right]_1^3 = (27 + 9) - (1 + 1) = 34$$
6. Multiply by $\frac{1}{b-a}$ to get the final result:
7. $$f_{\text{avg}} = \frac{1}{2}(34) = 17$$

> **Exam tip:** Always calculate $b-a$ first and confirm your endpoints are ordered correctly—AP problems sometimes give the interval in reverse order, and a negative width will flip the sign of your final answer.

## The Mean Value Theorem for Integrals

The Mean Value Theorem for Integrals (MVT for Integrals) is the theoretical result that underpins the average value concept, and it is frequently tested in conceptual multiple-choice questions and as a short free-response part. It is analogous to the Mean Value Theorem for derivatives, which applies to average rates of change.

**Mean Value Theorem for Integrals** — If $f(x)$ is continuous on the closed interval $[a,b]$, then there exists at least one point $c$ in the open interval $(a,b)$ such that $f(c) = f_{\text{avg}}$.

*Example:* For $f(x) = 3x^2 + 2x$ over $[1,3]$, $c \approx 2.07$ is the guaranteed point inside the interval.

To solve MVT for Integrals problems, you first calculate $f_{\text{avg}}$ using the standard formula, then set $f(c) = f_{\text{avg}}$ and solve for $c$, discarding any solutions that do not lie inside the open interval $(a,b)$.

**Worked example:** For $f(x) = 3x^2 + 2x$ over $[1, 3]$, find the value of $c$ guaranteed by the Mean Value Theorem for Integrals.

1. From the previous example, we already calculated $f_{\text{avg}} = 17$.
2. Set $f(c) = 17$ per the MVT for Integrals:
3. $$3c^2 + 2c = 17$$
4. Rearrange into standard quadratic form:
5. $$3c^2 + 2c - 17 = 0$$
6. Solve with the quadratic formula:
7. $$c = \frac{-2 \pm \sqrt{2^2 + 4(3)(17)}}{2(3)} = \frac{-1 \pm 2\sqrt{13}}{3}$$
8. The negative solution $c \approx -2.73$ lies outside $[1, 3]$, so we discard it. The positive solution $c \approx 2.07$ lies inside $(1, 3)$, so it is our result.

> **Exam tip:** Always verify that your value of $c$ falls inside the open interval $(a,b)$—AP problems intentionally include extra roots outside the interval that you must discard to earn full credit.

## Average Value from Graphs and Tables

A very common AP exam question asks for average value when you are not given an explicit function, but rather a graph of $f(x)$ or a table of values over the interval. For graphs, you can calculate the definite integral by finding the net area under the curve (subtracting area below the x-axis from area above the x-axis) then divide by $b-a$ exactly as you would for an explicit function.

For tables with equally spaced x-values, you approximate the integral using the requested method (left Riemann sum, right Riemann sum, trapezoidal rule) then divide by $b-a$ to get the approximate average value. This tests your ability to apply the average value concept beyond just integrating a given function, aligned with AP CED learning objectives.

**Worked example:** The velocity of a particle moving along the x-axis, $v(t)$ in meters per second, is given in the table below for $0 \leq t \leq 8$:

| t (s) | 0 | 2 | 4 | 6 | 8 |
|-------|---|---|---|---|---|
| v(t)  | 2 | 5 | 7 | 3 | 0 |

Use the trapezoidal rule with 4 equal-width subintervals to approximate the average value of $v(t)$ over $[0, 8]$.

1. Identify endpoints and width: $a=0$, $b=8$, so $b-a=8$, $\Delta t = 2$.
2. Set up the trapezoidal approximation for the integral:
3. $$\int_0^8 v(t) dt \approx \frac{\Delta t}{2} \left[v(0) + 2v(2) + 2v(4) + 2v(6) + v(8)\right]$$
4. Substitute the table values:
5. $$\int_0^8 v(t) dt \approx \frac{2}{2} \left[2 + 2(5) + 2(7) + 2(3) + 0\right] = 32$$
6. Calculate approximate average value:
7. $$v_{\text{avg}} = \frac{1}{8}(32) = 4 \text{ m/s}$$

> **Exam tip:** When approximating average value from a table, remember you still need to divide by $b-a$ after approximating the integral—this is one of the most commonly missed steps on AP exams.

## Additional AP-Style Worked Examples

**Worked example:** What is the average value of $f(x) = 2\cos x + e^x$ over the interval $[0, \pi]$?

A. $\frac{1}{\pi}(e^\pi + 1)$
B. $\frac{1}{\pi}(e^\pi + 2)$
C. $\frac{1}{\pi}(e^\pi - 1)$
D. $e^\pi$

1. Identify $a=0$, $b=\pi$, so the interval width $b-a = \pi$. Substitute into the average value formula:
2. $$f_{\text{avg}} = \frac{1}{\pi} \int_0^\pi (2\cos x + e^x) dx$$
3. The antiderivative of $2\cos x + e^x$ is $2\sin x + e^x$. Evaluate from 0 to $\pi$:
4. $$(2\sin \pi + e^\pi) - (2\sin 0 + e^0) = e^\pi - 1$$
5. Multiply by $\frac{1}{\pi}$ to get the final result. The correct answer is option C.

**Worked example:** Let $R$ be the region bounded by $y = x^2$ and $y = 4$ for $0 \leq x \leq 2$.
(a) Find the average value of $f(x) = 4 - x^2$ over the interval $[0, 2]$.
(b) Find the value of $c$ in $(0, 2)$ guaranteed by the Mean Value Theorem for Integrals.
(c) Explain what your result from part (a) means geometrically in terms of the area of region $R$.

1. Part (a): We have $a=0$, $b=2$, so $b-a=2$. Set up the average value integral:
2. $$f_{\text{avg}} = \frac{1}{2} \int_0^2 (4 - x^2) dx$$
3. The antiderivative is $4x - \frac{x^3}{3}$, so evaluating from 0 to 2 gives:
4. $$\left(8 - \frac{8}{3}\right) - 0 = \frac{16}{3}$$
5. Multiply by $\frac{1}{2}$: $f_{\text{avg}} = \frac{8}{3}$
6. Part (b): Set $f(c) = \frac{8}{3}$:
7. $$4 - c^2 = \frac{8}{3} \implies c^2 = \frac{4}{3} \implies c = \pm \frac{2\sqrt{3}}{3}$$
8. The negative solution is outside $(0, 2)$, so the only valid solution is $c = \frac{2\sqrt{3}}{3} \approx 1.15$.
9. Part (c): The average value $\frac{8}{3}$ is the constant height of a rectangle with width 2 (from $x=0$ to $x=2$) that has the same area as region $R$. The area of this rectangle, $2 \cdot \frac{8}{3} = \frac{16}{3}$, equals the exact area of region $R$.

**Worked example:** The temperature of a city over a 12-hour period from 6 AM to 6 PM is modeled by $T(h) = -0.05h^2 + 0.8h + 12$, where $h$ is the number of hours after 6 AM, and $T(h)$ is measured in degrees Celsius. Find the average temperature of the city over this 12-hour period, and interpret your result in context.

1. The interval is $h \in [0, 12]$, so $a=0$, $b=12$, $b-a=12$. Set up the average value formula:
2. $$T_{\text{avg}} = \frac{1}{12} \int_0^{12} (-0.05h^2 + 0.8h + 12) dh$$
3. The antiderivative is $-\frac{h^3}{60} + 0.4h^2 + 12h$. Evaluating from 0 to 12 gives:
4. $$-28.8 + 57.6 + 144 = 172.8$$
5. Divide by 12: $T_{\text{avg}} = 14.4^\circ C$.
6. Interpretation: Between 6 AM and 6 PM, the average temperature of the city is 14.4°C, meaning a constant temperature of 14.4°C over 12 hours would produce the same total temperature accumulation as the actual varying temperature over the day.

## Common pitfalls

- **Wrong:** Calculating $\int_a^b f(x) dx$ and stopping, forgetting to divide by $b-a$.
  - Why it fails: Students confuse total net area under the curve with the average height (average value), since the integral is computed first.
  - Correct: After evaluating the definite integral, always explicitly write $f_{\text{avg}} = \frac{1}{b-a} (\text{integral result})$ as a final step before moving on.
- **Wrong:** Using $\frac{1}{n}$ (number of subintervals/number of table points) instead of $\frac{1}{b-a}$ when finding average value from a table.
  - Why it fails: Confusion between the discrete average of the points in the table and the average value of the continuous function over the entire interval.
  - Correct: Always use the full width of the entire interval ($b-a$) as the denominator, regardless of how many subintervals you use.
- **Wrong:** Keeping a solution for $c$ that lies outside the open interval $(a, b)$ when applying the MVT for Integrals.
  - Why it fails: Students solve the equation and forget to check that the result satisfies the theorem's requirement that $c$ is inside the interval.
  - Correct: After solving $f(c) = f_{\text{avg}}$, cross out any solutions that are less than $a$ or greater than $b$, and only report solutions in $(a, b)$.
- **Wrong:** Swapping $a$ and $b$, leading to a negative $b-a$ and a negative average value when it should be positive.
  - Why it fails: AP problems sometimes state "over the interval from $b$ to $a$" to test attention to detail.
  - Correct: Always label $a$ as the lower endpoint and $b$ as the upper endpoint of the interval, so $b-a$ is always positive.
- **Wrong:** Adding area below the x-axis instead of subtracting it when calculating the integral from a graph.
  - Why it fails: Students confuse total geometric area with net area, which is what the definite integral uses for average value.
  - Correct: For any region of the graph below the x-axis, count its area as negative when calculating the net integral before dividing by $b-a$.

## Cheatsheet

| Category | Formula / Statement | Key Notes |
| --- | --- | --- |
| Average Value of Continuous $f(x)$ on $[a,b]$ | $f_{\text{avg}} = \frac{1}{b-a} \int_a^b f(x) dx$ | Requires $f$ continuous on $[a,b]$; $b-a$ is full interval width, not number of subintervals |
| Mean Value Theorem for Integrals | If $f$ continuous on $[a,b]$, $\exists c \in (a,b)$ such that $f(c) = f_{\text{avg}}$ | Always discard $c$ solutions that fall outside $(a,b)$ |
| Average Value from Graph | $f_{\text{avg}} = \frac{\text{Net Area under } f(x)}{b-a}$ | Net Area = Area above x-axis minus Area below x-axis, not total geometric area |
| Average Value from Equally Spaced Table | $f_{\text{avg}} \approx \frac{1}{b-a} (\text{Approximate Integral})$ | Use the integration approximation method specified in the question |
| Average Velocity | $v_{\text{avg}} = \frac{1}{b-a} \int_a^b v(t) dt = \frac{\text{Displacement}}{b-a}$ | Average velocity is not the same as average speed, which uses total distance instead of displacement |
| Geometric Interpretation | $\text{Net Area under } f(x) = f_{\text{avg}} \cdot (b-a)$ | $f_{\text{avg}}$ is the constant height of a rectangle with width $b-a$ that matches the net area under $f(x)$ |

## What's next

Mastering average value of a function is a critical prerequisite for the next core topics in Unit 8 of AP Calculus AB: volumes with known cross-sections, which directly extends the area-height relationship of average value to three dimensions by averaging cross-sectional area over an axis. It also underpins all applied problems involving accumulative change, such as average cost, average population growth, and average energy consumption, which are common topics on AP FRQs. Conceptually, average value bridges the gap between discrete averages you learned in algebra and the continuous summing that defines integration, reinforcing the core intuition of the definite integral as an infinite sum.

- [The Mean Value Theorem for Derivatives](https://www.owlsprep.com/study/ap-calculus-ab-u5-mean-value-theorem/)
- [Position, velocity, acceleration via integration](https://www.owlsprep.com/study/ap-calculus-ab-u8-position-velocity-acceleration-via-integration/)
- [Accumulation functions and definite integrals in applied contexts](https://www.owlsprep.com/study/ap-calculus-ab-u8-accumulation-functions-and-definite-integrals/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ap-calculus-ab-u8-average-value-of-a-function/
