The Mean Value Theorem for Integrals

Suppose a car's velocity over a two-hour trip is continuous but wildly variable. Is there always a moment when the instantaneous velocity exactly equals the trip's average velocity? The Mean Value Theorem for Integrals answers yes. It does so by turning a statement about an average into something different. That average is an integral divided by a length. The theorem converts it into a statement about a value actually attained by the function somewhere on the interval. This matters because averages are integrals in disguise. Integrals, in turn, are notoriously hard to pin to a single point. The theorem builds a bridge between two things. One is the global, aggregate information carried by ∫abf\int_a^b f. The other is the local, pointwise behavior of ff. That bridge is exactly what is needed one step later. It comes into play when the Fundamental Theorem of Calculus differentiates an integral. At that point it must locate a representative value of ff near each point. The big picture: continuity is the crucial ingredient. It guarantees, via the Extreme Value Theorem, that ff attains a maximum and minimum on [a,b][a,b]. Via the Intermediate Value Theorem, it also guarantees that ff hits every value in between. This includes the average. The proof is short but the idea is structural. Sandwich the average between the extreme values of ff. Then let the Intermediate Value Theorem do the rest. This article proves the basic Mean Value Theorem for Integrals. It then covers its more flexible cousin, the weighted (generalized) Mean Value Theorem for Integrals. This version allows averaging against a nonnegative weight function. Both are stated with full hypotheses and proved rigorously. Both are illustrated with asymmetric worked examples. Both are stress-tested with a counterexample. That counterexample shows exactly why continuity cannot be dropped.

Key takeaways
  • If ff is continuous on [a,b][a,b], some point c∈[a,b]c\in[a,b] satisfies f(c)=1b−a∫abf(x) dxf(c) = \frac{1}{b-a}\int_a^b f(x)\,dx.
  • The right-hand side is literally the average value of ff over [a,b][a,b].
  • Proof strategy: bound the average between min⁡f\min f and max⁡f\max f, then invoke the Intermediate Value Theorem.
  • The weighted version replaces dxdx with g(x) dxg(x)\,dx for any continuous, sign-definite (e.g. nonnegative) weight gg.
  • Continuity is essential — a discontinuous function can have an average value it never actually attains.
  • Key idea: continuity forces the average of ff to be trapped between ff's max and min, and the Intermediate Value Theorem forces ff to hit every value in that range, including its own average.

Where this lives today

The unweighted theorem is the direct stepping stone to the The First Fundamental Theorem of Calculus: to show that F(x)=∫axf(t) dtF(x) = \int_a^x f(t)\,dt satisfies F′(x)=f(x)F'(x) = f(x), one writes the difference quotient F(x+h)−F(x)h=1h∫xx+hf\frac{F(x+h)-F(x)}{h} = \frac{1}{h}\int_x^{x+h} f, recognizes the right side as an average value of ff over a shrinking interval, and uses exactly this theorem to replace that average by f(ch)f(c_h) for some chc_h between xx and x+hx+h; continuity of ff then forces f(ch)→f(x)f(c_h) \to f(x). The weighted version underlies error estimates in numerical integration: the remainder term in the trapezoidal rule and Simpson's rule is expressed using a weighted Mean Value Theorem for Integrals, where the weight gg is a fixed-sign kernel arising from Taylor's theorem with integral remainder. In probability and statistics, the theorem justifies that the expected value of a continuous random variable's transformation, when computed as a weighted integral against a density, equals the transformation evaluated at some representative point — a heuristic made rigorous by exactly this tool. In physics and engineering, it certifies that quantities like average temperature, average force, or average electric field over a region are values genuinely attained somewhere in that region, not artifacts of the averaging process, provided the underlying field is continuous.

:::quiz[If f(x)=x2f(x)=x^2 on [1,4][1,4], what is the average value fˉ\bar f?]

  • 5
  • 7
  • 21/3 ✓
  • 9

:::quiz[In the weighted Mean Value Theorem for Integrals, what happens if gg changes sign on [a,b][a,b]?]

  • Nothing changes; the theorem still holds as stated
  • The hypothesis is violated and the conclusion is not guaranteed by this proof ✓
  • ff must then be constant
  • The integral ∫abg\int_a^b g automatically becomes zero

:::quiz[For the step function k(x)=0k(x)=0 on [0,1/2][0,1/2] and k(x)=2k(x)=2 on (1/2,1](1/2,1], what is kˉ\bar k, and is it attained?]

  • kˉ=2\bar k = 2, attained at x=1x=1
  • kˉ=1\bar k = 1, not attained anywhere on [0,1][0,1] ✓
  • kˉ=1\bar k = 1, attained at x=1/2x=1/2
  • kˉ=0\bar k = 0, attained everywhere on [0,1/2][0,1/2]

Ask the tutor: How exactly does this Mean Value Theorem get used inside the proof that ddx∫axf(t) dt=f(x)\frac{d}{dx}\int_a^x f(t)\,dt = f(x)?

DefinitionAverage value and the Mean Value Theorem statement

Let f:[a,b]→Rf:[a,b]\to\mathbb{R} be Riemann integrable, with a<ba<b. The average value of ff over [a,b][a,b] is the number

fˉ  =  1b−a∫abf(x) dx.\bar f \;=\; \frac{1}{b-a}\int_a^b f(x)\,dx .

The Mean Value Theorem for Integrals asserts that if, in addition, ff is continuous on [a,b][a,b], then there exists c∈[a,b]c\in[a,b] with

f(c)=fˉ=1b−a∫abf(x) dx.f(c) = \bar f = \frac{1}{b-a}\int_a^b f(x)\,dx.

More generally, given a second function g:[a,b]→Rg:[a,b]\to\mathbb{R} that is integrable and does not change sign on [a,b][a,b] (say g≥0g\ge 0 throughout, or g≤0g\le 0 throughout), the weighted Mean Value Theorem for Integrals asserts the existence of c∈[a,b]c\in[a,b] with

∫abf(x)g(x) dx=f(c)∫abg(x) dx.\int_a^b f(x)g(x)\,dx = f(c)\int_a^b g(x)\,dx.

Taking g≡1g\equiv 1 recovers the unweighted statement.

Intuition

Picture the graph of a continuous function ff over [a,b][a,b], sitting above and below the horizontal axis in some irregular way. The quantity ∫abf\int_a^b f is the signed area trapped between the graph and the axis. Dividing by the width b−ab-a converts that area into a height: the height of the rectangle with base [a,b][a,b] whose area matches the signed area under ff. The theorem says this rectangle's height is not some abstract number invented by the arithmetic of integration — it is a height the function itself actually reaches at some point cc. Geometrically, the horizontal line y=fˉy=\bar f must cross the graph of ff somewhere in [a,b][a,b], because the graph oscillates above and below that line in a way that exactly balances out (that is what "average" means), and a continuous curve cannot jump over a height without passing through it. The weighted version generalizes this by allowing the horizontal strip to be measured with a nonuniform ruler g(x)g(x): instead of asking ff to match the plain average, it asks ff to match the gg-weighted average, which emphasizes regions where gg is large. The proof idea is identical — sandwich, then apply the Intermediate Value Theorem — but now to the quantity ∫abfg /∫abg\int_a^b fg \,/\int_a^b g.

:::svg[The average value fˉ\bar f is a height the continuous curve must actually reach at some c∈[a,b]c\in[a,b]] x y y = f̄ (average) c a b f(c) = f̄ = (1/(b−a)) ∫ f

TheoremMean Value Theorem for Integrals

Let f:[a,b]→Rf:[a,b]\to\mathbb{R} be continuous on the closed bounded interval [a,b][a,b], with a<ba<b. Then there exists a point c∈[a,b]c\in[a,b] such that

∫abf(x) dx=f(c) (b−a).\int_a^b f(x)\,dx = f(c)\,(b-a).

Equivalently,

f(c)=1b−a∫abf(x) dx.f(c) = \frac{1}{b-a}\int_a^b f(x)\,dx.
LemmaExtreme Value Theorem, quoted

If ff is continuous on a closed bounded interval [a,b][a,b], then ff attains a maximum value M=f(xM)M=f(x_M) and a minimum value m=f(xm)m=f(x_m) for some xM,xm∈[a,b]x_M,x_m\in[a,b]; consequently m≤f(x)≤Mm\le f(x)\le M for all x∈[a,b]x\in[a,b].

Proof

We use two prerequisite facts, each already established: continuous functions on [a,b][a,b] are Riemann integrable (Integrability of Continuous Functions), and integration is monotone: if u≤vu\le v pointwise on [a,b][a,b] and both are integrable, then ∫abu≤∫abv\int_a^b u \le \int_a^b v (Monotonicity and Triangle Inequality for Integrals).

Step 1: ff is integrable and attains extreme values. Since ff is continuous on [a,b][a,b], it is Riemann integrable on [a,b][a,b] by Integrability of Continuous Functions. By the Extreme Value Theorem (quoted above as a lemma, itself a standard consequence of continuity on a compact interval), ff attains a minimum value mm at some point xm∈[a,b]x_m\in[a,b] and a maximum value MM at some point xM∈[a,b]x_M\in[a,b], and

m≤f(x)≤Mfor all x∈[a,b].m \le f(x) \le M \qquad \text{for all } x\in[a,b].

Step 2: integrate the inequality. The constant functions x↦mx\mapsto m and x↦Mx\mapsto M are integrable on [a,b][a,b] (constants are continuous, hence integrable, or directly by the definition of the Riemann integral of a constant). Since m≤f(x)≤Mm \le f(x) \le M holds for every x∈[a,b]x \in [a,b], monotonicity of the integral (Monotonicity and Triangle Inequality for Integrals) gives

∫abm dx  ≤  ∫abf(x) dx  ≤  ∫abM dx.\int_a^b m\,dx \;\le\; \int_a^b f(x)\,dx \;\le\; \int_a^b M\,dx.

Because ∫abm dx=m(b−a)\int_a^b m\,dx = m(b-a) and ∫abM dx=M(b−a)\int_a^b M\,dx = M(b-a) (the integral of a constant kk over [a,b][a,b] equals k(b−a)k(b-a), directly from the definition via Riemann sums, or by the same monotonicity lemma applied to Riemann sums), we obtain

m(b−a)  ≤  ∫abf(x) dx  ≤  M(b−a).m(b-a) \;\le\; \int_a^b f(x)\,dx \;\le\; M(b-a).

Step 3: divide by b−a>0b-a>0. Since a<ba<b, we have b−a>0b-a>0, so dividing all three parts of the inequality by b−ab-a preserves the inequality directions:

m  ≤  1b−a∫abf(x) dx  ≤  M.m \;\le\; \frac{1}{b-a}\int_a^b f(x)\,dx \;\le\; M.

Set

μ:=1b−a∫abf(x) dx.\mu := \frac{1}{b-a}\int_a^b f(x)\,dx.

We have shown m≤μ≤Mm \le \mu \le M.

Step 4: apply the Intermediate Value Theorem. The function ff is continuous on [a,b][a,b], and f(xm)=mf(x_m)=m, f(xM)=Mf(x_M)=M with xm,xM∈[a,b]x_m, x_M \in [a,b]. Let II be the closed interval with endpoints xmx_m and xMx_M (in whichever order they occur); I⊆[a,b]I \subseteq [a,b] since [a,b][a,b] is an interval containing both points. Restricting ff to II, it is continuous on II, and μ\mu lies between f(xm)=mf(x_m)=m and f(xM)=Mf(x_M)=M by Step 3. By the Intermediate Value Theorem, there exists a point cc between xmx_m and xMx_M (hence c∈I⊆[a,b]c \in I \subseteq [a,b]) such that

f(c)=μ=1b−a∫abf(x) dx.f(c) = \mu = \frac{1}{b-a}\int_a^b f(x)\,dx.

Conclusion. Multiplying by b−ab-a gives ∫abf(x) dx=f(c)(b−a)\int_a^b f(x)\,dx = f(c)(b-a), and c∈[a,b]c \in [a,b] as required. ■\blacksquare Proof technique used: sandwich the average between extreme values via monotonicity of the integral, then apply the Intermediate Value Theorem to recover a point where equality holds. No step invokes the Mean Value Theorem for Integrals itself or anything built on top of it, so the argument is non-circular.

∎
TheoremWeighted (Generalized) Mean Value Theorem for Integrals

Let f,g:[a,b]→Rf,g:[a,b]\to\mathbb{R} with a<ba<b. Assume: 1. ff is continuous on [a,b][a,b]; 2. gg is Riemann integrable on [a,b][a,b]; 3. gg does not change sign on [a,b][a,b]: either g(x)≥0g(x)\ge 0 for all x∈[a,b]x\in[a,b], or g(x)≤0g(x)\le 0 for all x∈[a,b]x\in[a,b]. Then there exists c∈[a,b]c\in[a,b] such that

∫abf(x)g(x) dx  =  f(c)∫abg(x) dx.\int_a^b f(x)g(x)\,dx \;=\; f(c)\int_a^b g(x)\,dx.
Proof

We treat the case g≥0g \ge 0 on [a,b][a,b]; the case g≤0g\le 0 follows by applying the result to −g≥0-g \ge 0 and noting both sides of the desired identity flip sign together.

Step 1: integrability of fgfg. ff is continuous, hence bounded, on [a,b][a,b] (by the Extreme Value Theorem, continuous functions on closed bounded intervals are bounded). The product of a continuous function and an integrable function is integrable — this is a standard closure property of the Riemann integral (products of integrable functions are integrable, and continuous functions are integrable by Integrability of Continuous Functions). So fgfg is integrable on [a,b][a,b], and ∫abfg dx\int_a^b fg\,dx is a well-defined real number.

Step 2: bound ff by its extremes and multiply by g≥0g\ge0. By the Extreme Value Theorem, ff attains a minimum mm and maximum MM on [a,b][a,b], so m≤f(x)≤Mm \le f(x) \le M for all x∈[a,b]x \in [a,b]. Since g(x)≥0g(x)\ge 0 for all xx, multiplying the inequality m≤f(x)≤Mm \le f(x) \le M by g(x)g(x) does not reverse any inequality, giving

m g(x)  ≤  f(x)g(x)  ≤  M g(x)for all x∈[a,b].m\,g(x) \;\le\; f(x)g(x) \;\le\; M\,g(x) \qquad \text{for all } x \in [a,b].

Step 3: integrate. All three functions x↦m g(x)x\mapsto m\,g(x), x↦f(x)g(x)x \mapsto f(x)g(x), x↦M g(x)x\mapsto M\,g(x) are integrable on [a,b][a,b] (constant multiples of an integrable function are integrable, and fgfg is integrable by Step 1). By monotonicity of the integral (Monotonicity and Triangle Inequality for Integrals),

m∫abg(x) dx  ≤  ∫abf(x)g(x) dx  ≤  M∫abg(x) dx.m \int_a^b g(x)\,dx \;\le\; \int_a^b f(x)g(x)\,dx \;\le\; M \int_a^b g(x)\,dx.

Step 4: dispose of the degenerate case ∫abg=0\int_a^b g = 0. If ∫abg(x) dx=0\int_a^b g(x)\,dx = 0, then Step 3 forces ∫abf(x)g(x) dx=0\int_a^b f(x)g(x)\,dx = 0 as well (the inequality sandwiches it between 00 and 00). In this case the desired identity ∫abfg=f(c)∫abg\int_a^b fg = f(c)\int_a^b g reads 0=f(c)⋅00 = f(c)\cdot 0, true for any c∈[a,b]c \in [a,b]; pick c=ac=a. This finishes the degenerate case.

Step 5: the main case ∫abg>0\int_a^b g > 0. Since g≥0g \ge 0 and gg is not the case handled in Step 4, we have ∫abg(x) dx>0\int_a^b g(x)\,dx > 0 (the integral of a nonnegative function is nonnegative by monotonicity against the zero function, and we are in the complementary case to Step 4). Divide the inequality in Step 3 by the positive number ∫abg(x) dx\int_a^b g(x)\,dx:

m  ≤  ∫abf(x)g(x) dx∫abg(x) dx  ≤  M.m \;\le\; \frac{\int_a^b f(x)g(x)\,dx}{\int_a^b g(x)\,dx} \;\le\; M.

Let ν\nu denote the middle quantity. As in the unweighted proof, let xm,xM∈[a,b]x_m, x_M \in [a,b] be points where ff attains mm and MM respectively, and let I⊆[a,b]I \subseteq [a,b] be the closed interval with endpoints xm,xMx_m, x_M. Since ff is continuous on II and ν\nu lies between f(xm)=mf(x_m)=m and f(xM)=Mf(x_M)=M, the Intermediate Value Theorem furnishes a point c∈I⊆[a,b]c \in I \subseteq [a,b] with f(c)=νf(c) = \nu. Multiplying by ∫abg(x) dx≠0\int_a^b g(x)\,dx \ne 0 gives

∫abf(x)g(x) dx=f(c)∫abg(x) dx,\int_a^b f(x)g(x)\,dx = f(c)\int_a^b g(x)\,dx,

as required.

The case g≤0g \le 0. Apply the case just proved to −g≥0-g \ge 0: there is c∈[a,b]c \in [a,b] with ∫abf(−g)=f(c)∫ab(−g)\int_a^b f(-g) = f(c)\int_a^b (-g), i.e. −∫abfg=−f(c)∫abg-\int_a^b fg = -f(c)\int_a^b g, i.e. ∫abfg=f(c)∫abg\int_a^b fg = f(c)\int_a^b g. Same conclusion. ■\blacksquare Proof technique used: the same sandwich-then-Intermediate-Value-Theorem strategy as the unweighted theorem, with the sign condition on gg used exactly once, to preserve inequality direction when multiplying by gg.

∎
CorollaryUnweighted theorem as a special case

Taking g≡1g\equiv 1 (which is continuous, hence integrable, and satisfies g≥0g\ge 0 everywhere) in the weighted theorem recovers exactly the unweighted Mean Value Theorem for Integrals, since ∫abg dx=b−a≠0\int_a^b g\,dx = b-a \ne 0.

Worked examples

Example 1 (unweighted, asymmetric interval and function). Let f(x)=x3−2x+1f(x) = x^3 - 2x + 1 on [0,3][0,3]. This ff is a polynomial, hence continuous on [0,3][0,3], so the Mean Value Theorem for Integrals applies. First compute the average value:

∫03(x3−2x+1) dx=[x44−x2+x]03=814−9+3=814−6=81−244=574.\int_0^3 (x^3-2x+1)\,dx = \left[\frac{x^4}{4} - x^2 + x\right]_0^3 = \frac{81}{4} - 9 + 3 = \frac{81}{4} - 6 = \frac{81-24}{4} = \frac{57}{4}.

So

fˉ=13−0⋅574=5712=194=4.75.\bar f = \frac{1}{3-0}\cdot \frac{57}{4} = \frac{57}{12} = \frac{19}{4} = 4.75.

We must solve f(c)=4.75f(c) = 4.75 for some c∈[0,3]c \in [0,3], i.e.

c3−2c+1=194⟺c3−2c−154=0.c^3 - 2c + 1 = \frac{19}{4} \quad\Longleftrightarrow\quad c^3 - 2c - \frac{15}{4} = 0.

Check endpoints of a bracketing interval: f(2)=8−4+1=5f(2) = 8-4+1=5 and f(1.9)=6.859−3.8+1=4.059f(1.9) = 6.859 - 3.8 + 1 = 4.059. Since ff is continuous and f(1.9)=4.059<4.75<5=f(2)f(1.9) = 4.059 < 4.75 < 5 = f(2), the Intermediate Value Theorem (applied directly to ff on [1.9,2][1.9,2], consistent with the proof) guarantees a root c∈(1.9,2)c\in(1.9,2). A quick refinement: f(1.97)=1.973−2(1.97)+1=7.645...−3.94+1=4.705f(1.97) = 1.97^3 - 2(1.97)+1 = 7.645... - 3.94 + 1 = 4.705, and f(1.99)=7.881−3.98+1=4.901f(1.99)=7.881-3.98+1=4.901, so cc lies between 1.971.97 and 1.991.99, consistent with existence but — as guaranteed by the theorem — no closed form is needed; existence, not explicit computation, is the content of the theorem. This illustrates that the theorem guarantees cc exists in [0,3][0,3] without requiring us to solve the cubic exactly.

Example 2 (weighted version, genuinely non-constant weight). Let f(x)=cos⁡xf(x) = \cos x and g(x)=x2g(x) = x^2 on [0,π][0,\pi]. Here ff is continuous everywhere, and gg is continuous (hence integrable) and satisfies g(x)=x2≥0g(x)=x^2\ge 0 on [0,π][0,\pi], so both hypotheses of the weighted theorem hold. Compute ∫0πg(x) dx=∫0πx2 dx=π33\int_0^\pi g(x)\,dx = \int_0^\pi x^2\,dx = \frac{\pi^3}{3}, which is positive, so we are in the main (non-degenerate) case. Compute ∫0πf(x)g(x) dx=∫0πx2cos⁡x dx\int_0^\pi f(x)g(x)\,dx = \int_0^\pi x^2\cos x\,dx using integration by parts twice. With u=x2,dv=cos⁡x dxu=x^2, dv=\cos x\,dx:

∫x2cos⁡x dx=x2sin⁡x−∫2xsin⁡x dx=x2sin⁡x−(−2xcos⁡x+∫2cos⁡x dx)=x2sin⁡x+2xcos⁡x−2sin⁡x+C.\int x^2\cos x\,dx = x^2\sin x - \int 2x\sin x\,dx = x^2 \sin x - \left(-2x\cos x + \int 2\cos x\,dx\right) = x^2\sin x + 2x\cos x - 2\sin x + C.

Evaluate from 00 to π\pi: at x=πx=\pi, sin⁡π=0,cos⁡π=−1\sin\pi = 0, \cos\pi=-1, giving π2⋅0+2π(−1)−2⋅0=−2π\pi^2\cdot 0 + 2\pi(-1) - 2\cdot 0 = -2\pi. At x=0x=0, everything is 00. So

∫0πx2cos⁡x dx=−2π−0=−2π.\int_0^\pi x^2\cos x\,dx = -2\pi - 0 = -2\pi.

The theorem predicts a c∈[0,π]c \in [0,\pi] with

f(c)=∫0πfg dx∫0πg dx=−2ππ3/3=−6π2≈−0.6079.f(c) = \frac{\int_0^\pi f g\,dx}{\int_0^\pi g\,dx} = \frac{-2\pi}{\pi^3/3} = \frac{-6}{\pi^2} \approx -0.6079.

Since cos⁡\cos is continuous on [0,π][0,\pi] and ranges continuously from cos⁡0=1\cos 0 = 1 down to cos⁡π=−1\cos\pi=-1, and −0.6079-0.6079 lies in [−1,1][-1,1], the Intermediate Value Theorem guarantees a (unique, since cos⁡\cos is strictly decreasing on [0,π][0,\pi]) solution c=arccos⁡(−6/π2)≈2.226c = \arccos(-6/\pi^2) \approx 2.226 radians, which indeed lies in [0,π]≈[0,3.1416][0,\pi] \approx [0, 3.1416]. This confirms the theorem's prediction with an explicit, checkable value of cc.

CounterexampleWhy continuity of ff cannot be dropped

Consider

f(x)={00≤x<11x=1f(x) = \begin{cases} 0 & 0 \le x < 1 \\ 1 & x = 1 \end{cases}

on [0,1][0,1]. This ff is Riemann integrable on [0,1][0,1] (it differs from the zero function at only one point, and a function that agrees with an integrable function except at finitely many points is integrable with the same integral). Indeed

∫01f(x) dx=∫010 dx=0,\int_0^1 f(x)\,dx = \int_0^1 0\,dx = 0,

since Riemann integration is insensitive to the value at a single point (upper and lower Riemann sums are unaffected in the limit by one point's value). Hence the average value is

fˉ=11−0∫01f(x) dx=0.\bar f = \frac{1}{1-0}\int_0^1 f(x)\,dx = 0.

The Mean Value Theorem's conclusion would demand a point c∈[0,1]c \in [0,1] with f(c)=0f(c) = 0. Indeed here f(c)=0f(c)=0 for every c∈[0,1)c \in [0,1), so in this particular example the conclusion happens to hold anyway — but only because we chose a mild discontinuity. Sharpen the example: let

h(x)={00≤x<12x=1.h(x) = \begin{cases} 0 & 0 \le x < 1 \\ 2 & x = 1. \end{cases}

Again ∫01h=0\int_0^1 h = 0 (same reasoning: a single point does not affect the Riemann integral), so hˉ=0\bar h = 0, and again h(c)=0h(c)=0 is attained on [0,1)[0,1) — the conclusion still holds by coincidence. To truly break the conclusion, remove more than a single point's worth of continuity. Take

k(x)={00≤x≤12212<x≤1.k(x) = \begin{cases} 0 & 0 \le x \le \tfrac12 \\ 2 & \tfrac12 < x \le 1. \end{cases}

This is a genuine step function, integrable, with

∫01k(x) dx=∫01/20 dx+∫1/212 dx=0+2⋅12=1,\int_0^1 k(x)\,dx = \int_0^{1/2} 0\,dx + \int_{1/2}^1 2\,dx = 0 + 2\cdot\tfrac12 = 1,

so kˉ=1\bar k = 1. But kk only ever takes the values 00 and 22 — it never equals 11 anywhere on [0,1][0,1]. The average value 11 is a number the function is mathematically obligated to average out to, yet no point of the domain realizes it: the conclusion of the Mean Value Theorem for Integrals fails outright. The culprit is exactly the hypothesis we dropped: kk is discontinuous (it jumps at x=1/2x=1/2), so the Intermediate Value Theorem — the engine of the proof — no longer applies to kk, and there is no mechanism forcing kk to hit its own average.

Scope, edge cases & common traps

SituationWhat happens
ff continuous, a<ba<bTheorem applies exactly as stated; cc exists in [a,b][a,b] (possibly at an endpoint).
ff merely (Riemann) integrable, not continuousConclusion can fail — see counterexample above.
a=ba=bDegenerate; both sides of the identity are 0=f(c)⋅00=f(c)\cdot 0, trivially true for any cc, but "average value" is undefined (division by b−a=0b-a=0).
Weighted version, gg changes sign on [a,b][a,b]Hypothesis violated; the sandwich step (multiplying m≤f≤Mm\le f\le M by gg) can reverse direction on part of the interval, and the conclusion may fail.
Weighted version, ∫abg=0\int_a^b g = 0 with g≥0g\ge0 (so g≡0g\equiv 0 a.e. in a suitable sense)Handled in the proof; conclusion holds trivially since both sides vanish for any cc.
cc at an endpointFully allowed — the theorem gives c∈[a,b]c\in[a,b] closed, not (a,b)(a,b) open.

The mathematician behind it

Origins · 1 minAugustin-Louis Cauchy and how this was discovered
AC
Augustin-Louis Cauchy
1789–1857 · Early 19th-century French analysis, rigorization of calculus

Cauchy was among the first to insist that theorems of calculus be proved from precise definitions of limit, continuity, and the definite integral, rather than from geometric intuition alone. His textbooks establish the mean value results for both derivatives and integrals as consequences of continuity and the intermediate value property, in the same rigorous spirit used in the proofs above.

History
- 1821 — Cauchy's Cours d'Analyse gives a rigorous treatment of continuity and limits, laying groundwork for mean value arguments.
- 1823 — Cauchy's lectures on the infinitesimal calculus define the definite integral via limits of sums, precursor to the Riemann integral.
- 1854 — Riemann's habilitation formalizes the integral that bears his name, sharpening the class of functions to which the theorem applies.
- 1868 — Riemann's work is published posthumously, cementing the modern definition of integrability used throughout this article.
- 1900s — The weighted (generalized) Mean Value Theorem for Integrals becomes standard in analysis textbooks as a tool for estimating integrals and error terms.
Does the Mean Value Theorem for Integrals require ff to be differentiable?

No. It only requires ff to be continuous on the closed interval [a,b][a,b]. This is weaker than differentiability — continuity alone suffices because the proof relies on the Extreme Value Theorem (to bound ff) and the Intermediate Value Theorem (to hit the average), neither of which needs derivatives. This is a key difference from the Mean Value Theorem for derivatives, which does require differentiability on the open interval and gives information about the slope of ff, whereas the integral version gives information about the value of ff matching an average.

Is the point cc in the theorem unique?

Not in general. If ff is constant, every point of [a,b][a,b] works. If ff is not monotonic, it may cross its average value multiple times. Uniqueness can be guaranteed under extra hypotheses, such as ff being strictly monotonic on [a,b][a,b], in which case ff is injective and crosses any given horizontal level at most once, forcing cc to be unique when it exists.

Can cc equal an endpoint aa or bb?

Yes. The theorem only guarantees c∈[a,b]c \in [a,b], a closed interval including its endpoints. For instance, if ff is increasing and its average happens to equal f(a)f(a) or f(b)f(b) exactly, the witnessing point can sit right at the boundary. Some textbooks strengthen the conclusion to an open interval (a,b)(a,b) under extra assumptions (e.g., ff non-constant), but the basic theorem as proved here does not need or claim that refinement.

How does this theorem relate to the Fundamental Theorem of Calculus?

It is the engine inside the standard proof that ddx∫axf(t) dt=f(x)\frac{d}{dx}\int_a^x f(t)\,dt = f(x) for continuous ff. The difference quotient of the integral function is itself an average value of ff over a shrinking interval, and the Mean Value Theorem for Integrals replaces that average with ff evaluated at some nearby point; continuity of ff then forces convergence to f(x)f(x) as the interval shrinks to a point.

Why does the weighted version require gg to keep one sign?

The proof multiplies the inequality m≤f(x)≤Mm \le f(x) \le M by g(x)g(x) to obtain mg(x)≤f(x)g(x)≤Mg(x)mg(x) \le f(x)g(x) \le Mg(x). This step only preserves the inequality directions if g(x)g(x) has a fixed sign throughout [a,b][a,b]; if gg changes sign, multiplying by g(x)g(x) can reverse the inequality on part of the interval and destroy the sandwich, so the subsequent integration step no longer yields a valid bound on ∫abfg /∫abg\int_a^b fg\,/\int_a^b g.

What if ∫abg(x) dx=0\int_a^b g(x)\,dx = 0 in the weighted theorem?

The proof handles this explicitly as a degenerate case. If g≥0g\ge0 and ∫abg=0\int_a^b g = 0, the sandwich inequality forces ∫abfg=0\int_a^b fg = 0 too, so the desired identity ∫abfg=f(c)∫abg\int_a^b fg = f(c)\int_a^b g reads 0=00=0, which holds automatically for every choice of c∈[a,b]c\in[a,b]; no division by zero or contradiction arises, and existence of cc is trivial in this case.

Does the theorem tell you how to compute cc explicitly?

No — it is a pure existence statement, proved via the Intermediate Value Theorem, which itself is non-constructive in general. In practice, once you know fˉ\bar f (or the weighted analogue), you solve f(c)=fˉf(c)=\bar f using whatever algebraic or numerical means are available, exactly as done in the worked examples, where a cubic equation and an arccosine had to be handled separately from the existence argument.

Before this

Where this leads