Average Value of a Function

April 12, 2026

Problem

Find the average value of f(x) = sin(x) on the interval [0, π].

Explanation

The average value of a continuous function over an interval is exactly what you'd expect: the integral divided by the length of the interval. Geometrically, it's the height of a rectangle with the same area and the same base as the region under the curve.

The Formula

fˉ=1baabf(x)dx\bar f = \dfrac{1}{b - a}\int_{a}^{b} f(x)\,dx

This is sometimes called the mean value of ff on [a,b][a, b]. The Mean Value Theorem for integrals guarantees that there exists at least one point c(a,b)c \in (a, b) where f(c)=fˉf(c) = \bar f.

Step-by-Step Solution

Given: f(x)=sinxf(x) = \sin x, a=0a = 0, b=πb = \pi.

Find: The average value fˉ\bar f on [0,π][0, \pi].


Step 1 — Compute the interval length.

ba=π0=πb - a = \pi - 0 = \pi

Step 2 — Set up the formula.

fˉ=1π0πsinxdx\bar f = \dfrac{1}{\pi}\int_{0}^{\pi} \sin x\,dx

Step 3 — Find the antiderivative of sinx\sin x.

sinxdx=cosx+C\int \sin x\,dx = -\cos x + C

Step 4 — Apply the Fundamental Theorem.

0πsinxdx=[cosx]0π\int_{0}^{\pi} \sin x\,dx = \left[-\cos x\right]_{0}^{\pi}

=cosπ(cos0)= -\cos\pi - (-\cos 0)

=(1)((1))=1+1=2= -(-1) - (-(1)) = 1 + 1 = 2

Step 5 — Divide by the interval length.

fˉ=1π(2)=2π\bar f = \dfrac{1}{\pi}(2) = \dfrac{2}{\pi}

Step 6 — Decimal value.

fˉ=2π23.141590.6366\bar f = \dfrac{2}{\pi} \approx \dfrac{2}{3.14159} \approx 0.6366

Step 7 — Find the points where ff achieves this average.

By the Mean Value Theorem, there's a cc where sinc=2/π0.6366\sin c = 2/\pi \approx 0.6366. Solving:

c=arcsin(0.6366)0.6901  or  c=π0.69012.4515c = \arcsin(0.6366) \approx 0.6901 \;\text{or}\; c = \pi - 0.6901 \approx 2.4515

Both are in (0,π)(0, \pi). The function reaches the average twice — once on the way up and once on the way down. (At the peak c=π/2c = \pi/2, sinc=1\sin c = 1, which is well above the average.)


Answer: The average value of sinx\sin x on [0,π][0, \pi] is

  fˉ=2π0.637  \boxed{\;\bar f = \dfrac{2}{\pi} \approx 0.637\;}

This is the height of the rectangle (with base π\pi) that has the same area as the region under the sine curve on [0,π][0, \pi]. Note that the average is less than 1 even though the curve reaches a maximum of 1 — because much of the interval has smaller values.

Try It

  • The horizontal green line marks the average value 2/π2/\pi.
  • The two yellow dots show where the curve crosses the average — those are the cc values from the Mean Value Theorem.
  • Toggle show rectangle to see the area under the sine curve (cyan) compared to the equivalent rectangle (green outline) — they have the same area.

Interactive Visualization

Parameters

Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Average Value of a Function | MathSpin