CP 5.3 - Mean value of a function

CP 5.3 - Mean value of a function

The mean value of a function is its average height across an interval. You will calculate it using an integral, interpret positive and negative contributions, and use a stated mean to find an unknown constant.

An average across a whole interval

At both ends of the interval [0,π][0,\pi], the function sin⁡x\sin x has value zero. Is its average value therefore zero? The graph is positive everywhere between those endpoints, so averaging just the endpoints has missed almost everything happening in between.

You already know

A definite integral gives signed area: regions above the horizontal axis contribute positively and regions below contribute negatively. If F′(x)=f(x)F'(x)=f(x), then ∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,\mathrm{d}x=F(b)-F(a).

Imagine replacing a changing height by one constant height mm, over the same width b−ab-a. To keep the signed area unchanged, the rectangle must satisfy m(b−a)=∫abf(x) dxm(b-a)=\int_a^b f(x)\,\mathrm{d}x. Dividing by the width gives the mean.

[DIAGRAM: asset_name: Sine curve and its equal-area mean rectangle; asset_slug: 9fm0-cp53-mean-rectangle; caption: The half-wave and the rectangle have the same area 2 over the same width pi; description: Two coordinate panels run from x=0 to x=pi. The first shades the positive sine half-wave in pale blue and labels integral area 2. The second shows a pale sage rectangle of width pi and height 2/pi, with the sine curve as a thin comparison line. Both endpoints of the sine curve are marked at height zero.]
The half-wave and the rectangle have the same area 2 over the same width pi

Mean value of a function

The mean value of an integrable function ff on a finite interval [a,b][a,b], where a<ba<b, is its integral divided by the interval's width. It averages the whole interval, rather than just selected function values.

The rectangle interpretation gives a formula you can use whether the graph stays above the axis or crosses it.

Mean value

For a<ba<b, with ff integrable on [a,b][a,b],

m=1b−a∫abf(x) dxm=\frac1{b-a}\int_a^b f(x)\,\mathrm{d}x

Not in the formula booklet: learn it.

For a constant function f(x)=cf(x)=c, this gives m=cm=c, as it should. A negative mean is possible: it means the net signed area is negative. It does not mean an ordinary geometric area is negative. If the function is continuous, its mean lies between its minimum and maximum on the interval; that gives a useful check on your arithmetic.

Key idea

Mean value is signed area divided by width. The denominator is b−ab-a, not bb, and the integral is not automatically an unsigned area.

Use the width to interpret the data in this short check.

Calculating a mean from an antiderivative

Write the mean-value factor before integrating. It is easy to find the integral correctly and then forget the one operation that turns it into a mean.

For instance, x2x^2 is not linear, so its average height need not be the average of its endpoint heights. Integration measures how long the function spends at each height as you move across the interval.

Worked example 1: a polynomial mean

Question. Find the mean value of f(x)=x2f(x)=x^2 on [0,3][0,3].

Plan. Integrate x2x^2 between the endpoints, then divide by the width 33.

m=13−0∫03x2 dxmean is integral over width=13[x33]03integrate the power=13(9−0)=3evaluate and average\begin{aligned} m&=\frac1{3-0}\int_0^3 x^2\,\mathrm{d}x && \text{mean is integral over width}\\ &=\frac13\left[\frac{x^3}{3}\right]_0^3 && \text{integrate the power}\\ &=\frac13(9-0)=3 && \text{evaluate and average} \end{aligned}

Why this step? The integral is 99, but that is spread across an interval of width 33. The required average height is 33.

Answer. The mean value is 33.

Check. The function ranges from 00 to 99, and the mean lies between them. A rectangle of height 33 and width 33 has area 99.

Worked example 2 changes only the lower endpoint. Both the width and the evaluated integral must change.

Worked example 2: a non-zero lower endpoint

Question. Find the mean value of f(x)=x2f(x)=x^2 on [1,3][1,3].

Plan. Use width 22, evaluate the same antiderivative at both endpoints, then simplify.

m=13−1∫13x2 dxnew interval width=12(273−13)upper minus lower=12×263=133simplify exactly\begin{aligned} m&=\frac1{3-1}\int_1^3 x^2\,\mathrm{d}x && \text{new interval width}\\ &=\frac12\left(\frac{27}{3}-\frac13\right) && \text{upper minus lower}\\ &=\frac12\times\frac{26}{3}=\frac{13}{3} && \text{simplify exactly} \end{aligned}

Why subtract the lower value? The accumulated integral up to x=1x=1 is outside the interval being averaged.

Answer. The mean value is 133\frac{13}{3}.

Check. 1<133<91<\frac{13}{3}<9, and the mean is larger than in Worked example 1 because the low values on [0,1][0,1] have been removed.

The average of the endpoint heights here is 1+92=5\frac{1+9}{2}=5, which differs from 133\frac{13}{3}. Endpoint averaging is exact for a straight-line graph, but is not a general mean-value method.

Watch out

Wrong: m=13∫13x2 dxm=\frac13\int_1^3 x^2\,\mathrm{d}x. Right: divide by 3−1=23-1=2. The width changes whenever either endpoint changes.

The next interval changes the upper endpoint instead.

Signed means and periodic functions

A mean describes the net contribution. For a wave that spends equal amounts above and below the axis, those contributions can cancel even though the function is rarely zero.

This distinction matters whenever a function changes sign. Integrating ∣f(x)∣|f(x)| would instead give a mean magnitude, which is a different quantity. Use f(x)f(x) itself when asked for its mean value.

Worked example 3: the positive half-wave

Question. Determine the exact mean value of sin⁡x\sin x on [0,π][0,\pi].

Plan. Integrate the sine function and divide by the width π\pi.

m=1π∫0πsin⁡x dxuse radians=1π[−cos⁡x]0πantiderivative=1π(1−(−1))=2πevaluate exactly\begin{aligned} m&=\frac1\pi\int_0^\pi\sin x\,\mathrm{d}x && \text{use radians}\\ &=\frac1\pi[-\cos x]_0^\pi && \text{antiderivative}\\ &=\frac1\pi(1-(-1))=\frac2\pi && \text{evaluate exactly} \end{aligned}

Why this step? Although both endpoint heights are zero, the whole interior contributes positive area.

Answer. The mean is 2π\frac2\pi, approximately 0.6370.637.

Check. 0<2π<10<\frac2\pi<1. The mean rectangle has area π×2π=2\pi\times\frac2\pi=2, matching the half-wave.

Worked example 4 changes only the upper endpoint, extending the interval to a complete cycle. The new half-wave contributes negative signed area.

Worked example 4: a complete cycle

Question. Determine the mean value of sin⁡x\sin x on [0,2π][0,2\pi].

Plan. Integrate across the complete cycle, keeping the sign of each contribution.

m=12π∫02πsin⁡x dxnew width=12π[−cos⁡x]02πintegrate=12π(−1+1)=0signed cancellation\begin{aligned} m&=\frac1{2\pi}\int_0^{2\pi}\sin x\,\mathrm{d}x && \text{new width}\\ &=\frac1{2\pi}[-\cos x]_0^{2\pi} && \text{integrate}\\ &=\frac1{2\pi}(-1+1)=0 && \text{signed cancellation} \end{aligned}

Why this step? The second half-cycle has signed area −2-2, which cancels the first half-cycle's +2+2.

Answer. The mean is 00.

Check. Pair each point xx in the first half-cycle with x+πx+\pi: their function values are opposites, since sin⁡(x+π)=−sin⁡x\sin(x+\pi)=-\sin x.

The opening puzzle has a surprisingly substantial answer: zero at both ends, yet a mean of about two thirds of the maximum. A graph can tell you immediately why endpoint sampling is misleading, even before you integrate.

Watch out

Wrong: add the unsigned areas of both half-waves when finding the mean of sin⁡x\sin x. Right: retain the negative contribution below the axis. Mean value and mean magnitude are different questions.

An extra half-cycle changes the cancellation once more.

Using a known mean to find a constant

A stated mean gives an equation for an unknown constant. Form the mean correctly first; then solve the resulting algebraic equation.

For f(x)=ax2+1f(x)=ax^2+1, the term 11 contributes mean 11 on any interval. The remaining mean depends on both aa and the interval. This provides a check on the algebra rather than another formula to memorise.

Worked example 5: a mean condition

Question. The mean value of f(x)=ax2+1f(x)=ax^2+1 on [0,2][0,2] is 55. Determine aa.

Plan. Set the mean-value integral equal to 55, evaluate it in terms of aa, and solve.

5=12∫02(ax2+1) dxuse the given mean=12[ax33+x]02integrate with a constant=4a3+1evaluate and simplifya=3solve the equation\begin{aligned} 5&=\frac12\int_0^2(ax^2+1)\,\mathrm{d}x && \text{use the given mean}\\ &=\frac12\left[\frac{ax^3}{3}+x\right]_0^2 && \text{integrate with }a\text{ constant}\\ &=\frac{4a}{3}+1 && \text{evaluate and simplify}\\ a&=3 && \text{solve the equation} \end{aligned}

Why this step? The mean is 55, so the integral itself must be 5×2=105\times2=10, not 55.

Answer. a=3a=3.

Check. With f(x)=3x2+1f(x)=3x^2+1, the integral is [x3+x]02=10[x^3+x]_0^2=10, and 10/2=510/2=5.

Worked example 6 changes only the lower endpoint. The required mean stays 55, so the coefficient must adapt.

Worked example 6: the same mean on another interval

Question. The mean value of ax2+1ax^2+1 on [1,2][1,2] is 55. Determine aa.

Plan. Use width 11, evaluate both limits, and solve the new equation.

5=∫12(ax2+1) dxwidth is 1=(8a3+2)−(a3+1)upper minus lower=7a3+1collect termsa=127solve exactly\begin{aligned} 5&=\int_1^2(ax^2+1)\,\mathrm{d}x && \text{width is }1\\ &=\left(\frac{8a}{3}+2\right)-\left(\frac a3+1\right) && \text{upper minus lower}\\ &=\frac{7a}{3}+1 && \text{collect terms}\\ a&=\frac{12}{7} && \text{solve exactly} \end{aligned}

Why is aa smaller? Removing [0,1][0,1] removes the lower values of x2x^2, so a smaller coefficient achieves the same target mean.

Answer. a=127a=\frac{12}{7}.

Check. 73×127+1=4+1=5\frac73\times\frac{12}{7}+1=4+1=5.

These examples also show why the interval is essential information. A function has a mean on a specified interval, not one universal mean independent of where you look.

Watch out

Wrong: use 5=∫02(ax2+1) dx5=\int_0^2(ax^2+1)\,\mathrm{d}x in Worked example 5. The stated 55 is the mean height, not the integral over width 22. Right: 5=12∫02(ax2+1) dx5=\frac12\int_0^2(ax^2+1)\,\mathrm{d}x, or equivalently set the integral equal to 1010.

Once the width is included, the remaining equation is ordinary algebra.

Exam tip

For a “determine the constant” question, show the mean-value equation before solving it. The integral alone does not show that you have used the stated mean.

Use a different width in the final check.

Quick Recap

  • The mean is 1b−a∫abf(x) dx\frac1{b-a}\int_a^b f(x)\,\mathrm{d}x: signed area divided by width.
  • Evaluate both endpoints of the antiderivative and retain the mean-value factor.
  • Negative contributions cancel positive contributions; mean value is different from mean magnitude.
  • A stated mean can be used as an equation for a constant.

The mean of sin⁡x\sin x on [0,π][0,\pi] is 2/π2/\pi, even though both endpoint values are zero.