Applications: Area, Volume, and Average Value

Published on 2026-11-04·v1.0

Learning Objectives

  • Set up the area between two curves as ∫∣f−g∣\int\lvert f-g\rvert, splitting at crossings and choosing dxdx or dydy to avoid splitting.
  • Compute volumes from cross-sectional areas, using disks, washers, and cylindrical shells, with the radius measured from the actual axis of rotation.
  • Explain the slice-approximate-sum-limit recipe and watch it converge numerically.
  • Compute the average value of a function, state the Mean Value Theorem for Integrals with its hypothesis, and show a case where it fails.
  • Connect the average value to sampling, Monte Carlo estimation, and mean squared error.

Context & Motivation

the-definite-integral-and-riemann-sums defined the integral as a limit of sums, and integration-by-substitution-and-by-parts supplied tools for evaluating it. This lesson is about setting integrals up. The same recipe produces area, volume, mass, work, and expected values: cut the quantity into thin pieces, approximate each piece by something simple, add, and take the limit. Once a quantity is written as ∫(something) dx\int(\text{something})\,dx, the previous two lessons evaluate it.

Average value is the piece with the most reach in computing. The mean of a function over an interval is the continuous version of a mean over data: it is what a Monte Carlo estimator targets, the constant that minimizes squared error, and, applied to f2f^2 and followed by a square root, the root mean square used for signals and losses.

Core Theory

The recipe

Split [a,b][a,b] into nn pieces of width Δx\Delta x. On the ii-th piece, approximate the quantity by a simple shape using the function value at a tag point, such as a rectangle, a disk, or a thin shell. Add these up to get a Riemann sum. If the quantity is additive over pieces and the approximation is accurate to first order in Δx\Delta x, the limit is a definite integral. The setup is the hard part: a sketch, a representative slice, and its size.

Area between curves

If ff and gg are continuous on [a,b][a,b],

Area=∫ab∣f(x)−g(x)∣ dx\text{Area} = \int_a^b \lvert f(x)-g(x)\rvert\,dx

When f≥gf\ge g on the whole interval this is ∫(f−g)\int(f-g). When the curves cross, find the crossings (solve f=gf=g), split there, and integrate (top minus bottom) on each piece. Sometimes a region is simpler as a function of yy: area =∫(xright−xleft) dy=\int(x_{\text{right}}-x_{\text{left}})\,dy.

Volumes by cross-sections

If a solid lies between x=ax=a and x=bx=b and A(x)A(x) is the (continuous) area of its cross-section perpendicular to the xx-axis,

V=∫abA(x) dxV=\int_a^b A(x)\,dx

Three common cases when a region is rotated about a line:

  • Disks. Region 0≤y≤f(x)0\le y\le f(x) about the xx-axis: A=πf(x)2A=\pi f(x)^2.
  • Washers. Region between an outer curve and an inner curve: A=π(R2−r2)A=\pi(R^2-r^2), where RR and rr are the outer and inner distances from the axis. Note R2−r2R^2-r^2, not (R−r)2(R-r)^2.
  • Shells. Rotating a strip of width dxdx at distance ρ(x)\rho(x) from a vertical axis sweeps a thin cylindrical shell of volume about 2πρ(x) h(x) dx2\pi\rho(x)\,h(x)\,dx, so V=2π∫ρ(x) h(x) dxV=2\pi\int\rho(x)\,h(x)\,dx, with hh the height of the strip.

These formulas assume the region lies on one side of the axis. A region that straddles the axis can fold over itself when rotated: where its two sides sweep out overlapping solid, adding both counts the overlap twice. (When the two sides sit at different positions along the axis, as for sin⁡x\sin x on [0,2π][0,2\pi] about the xx-axis, nothing overlaps.)

Average value

For ff integrable on [a,b][a,b]:

favg=1b−a∫abf(x) dxf_{\text{avg}}=\frac1{b-a}\int_a^b f(x)\,dx

This is the limit of the ordinary mean of nn equally spaced samples, because 1n∑f(xi∗)=1b−a∑f(xi∗)Δx\frac1n\sum f(x_i^*)=\frac1{b-a}\sum f(x_i^*)\Delta x.

Mean Value Theorem for Integrals. If ff is continuous on [a,b][a,b], there is a c∈[a,b]c\in[a,b] with f(c)=favgf(c)=f_{\text{avg}}. The reason: the average lies between the minimum and maximum of ff (which exist, by continuity on a closed interval), and a continuous function takes every value in between (see continuity-and-the-intermediate-value-theorem). Without continuity it can fail: f=0f=0 on [0,12)[0,\tfrac12) and f=1f=1 on [12,1][\tfrac12,1] has average 12\tfrac12, a value ff never takes. The theorem says some cc exists, not that it is unique.

Worked Examples

Example 1: area between curves

The curves y=xy=x and y=x2y=x^2 meet where x=x2x=x^2, at x=0x=0 and x=1x=1, with x≥x2x\ge x^2 between them:

∫01(x−x2) dx=12−13=16\int_0^1(x-x^2)\,dx=\frac12-\frac13=\frac16

Example 2: curves that cross

Find the area between y=sin⁡xy=\sin x and y=cos⁡xy=\cos x on [0,π][0,\pi]. They cross where tan⁡x=1\tan x=1, at x=π/4x=\pi/4 (the next crossing, 5π/45\pi/4, is outside). So cos⁡≥sin⁡\cos\ge\sin on [0,π/4][0,\pi/4] and sin⁡≥cos⁡\sin\ge\cos on [π/4,π][\pi/4,\pi]:

∫0π/4(cos⁡x−sin⁡x) dx+∫π/4π(sin⁡x−cos⁡x) dx=(2−1)+(2+1)=22≈2.8284\int_0^{\pi/4}(\cos x-\sin x)\,dx+\int_{\pi/4}^{\pi}(\sin x-\cos x)\,dx=(\sqrt2-1)+(\sqrt2+1)=2\sqrt2\approx2.8284

Quadrature on ∣sin⁡x−cos⁡x∣\lvert\sin x-\cos x\rvert gives the same 2.82842.8284. The shortcut ∫0π(sin⁡x−cos⁡x) dx=2\int_0^\pi(\sin x-\cos x)\,dx=2 is a signed area and misses by about 29%.

Example 3: choosing the variable

The region between x=y2x=y^2 and y=x−2y=x-2 has crossings at (1,−1)(1,-1) and (4,2)(4,2). In yy it is one integral:

∫−12((y+2)−y2) dy=92\int_{-1}^{2}\big((y+2)-y^2\big)\,dy=\frac92

In xx the bottom boundary changes at x=1x=1 (from the lower parabola branch −x-\sqrt x to the line), so it needs two pieces: ∫012x dx+∫14(x−x+2) dx=43+196=92\int_0^1 2\sqrt x\,dx+\int_1^4(\sqrt x-x+2)\,dx=\frac43+\frac{19}6=\frac92.

Example 4: a volume as a visible limit

Rotate y=xy=\sqrt x, 0≤x≤40\le x\le4, about the xx-axis. Each slice is a disk of area πx\pi x, so V=π∫04x dx=8π≈25.1327V=\pi\int_0^4x\,dx=8\pi\approx25.1327. Riemann sums of the disk volumes converge to it:

text
n left sum right sum (exact 8*pi = 25.1327) 4 18.8496 31.4159 16 23.5619 26.7035 64 24.7400 25.5254 256 25.0346 25.2309 1024 25.1082 25.1573

The error shrinks like 1/n1/n, the usual rate for left and right sums when the integrand takes different values at the two ends (here 00 and 4π4\pi). The midpoint sum is exact for every nn here, because the slice area πx\pi x is linear in xx and the midpoint rule integrates linear functions exactly.

Example 5: washers and shells agree

The region between y=xy=x and y=x2y=x^2, 0≤x≤10\le x\le1. About the xx-axis, washers with R=xR=x, r=x2r=x^2: π∫01(x2−x4) dx=2π15≈0.41888\pi\int_0^1(x^2-x^4)\,dx=\frac{2\pi}{15}\approx0.41888. About the yy-axis, shells of radius xx and height x−x2x-x^2: 2π∫01x(x−x2) dx=π6≈0.523602\pi\int_0^1x(x-x^2)\,dx=\frac\pi6\approx0.52360. Washers in yy (outer radius y\sqrt y, inner radius yy) give π∫01(y−y2) dy=π6\pi\int_0^1(y-y^2)\,dy=\frac\pi6 too. Two methods, one answer.

Example 6: an axis that is not a coordinate axis

Rotate the same region about the line x=2x=2. The shell radius is the distance to the axis, 2−x2-x:

V=2π∫01(2−x)(x−x2) dx=π2≈1.5708V=2\pi\int_0^1(2-x)(x-x^2)\,dx=\frac\pi2\approx1.5708

Washers in yy give the same: π∫01[(2−y)2−(2−y)2]dy=π2\pi\int_0^1\big[(2-y)^2-(2-\sqrt y)^2\big]dy=\frac\pi2. A Monte Carlo estimate (NumPy default_rng(1), N=4 000 000N=4\,000\,000 uniform points in the box [0,4]×[0,1]×[−2,2][0,4]\times[0,1]\times[-2,2] of volume 1616, counting points inside the solid) gave 1.57071.5707 with standard error about 0.00240.0024, consistent. Using radius xx by habit would give π6\frac\pi6, the volume about the yy-axis, not this solid.

Example 7: non-circular cross-sections

A pyramid with a square base of side ss and height hh has, at distance xx above the base, a square cross-section of side s(1−x/h)s(1-x/h), so V=∫0hs2(1−x/h)2dx=s2h3V=\int_0^hs^2(1-x/h)^2dx=\frac{s^2h}3. For s=3s=3, h=5h=5 this is 1515, matching quadrature.

Example 8: average value and squared error

On [0,π][0,\pi], sin⁡\sin has average 2π≈0.63662\frac2\pi\approx0.63662. The equation sin⁡c=2π\sin c=\frac2\pi has two solutions, c≈0.6901c\approx0.6901 and 2.45152.4515. Averaging sin⁡\sin at nn midpoints gives 0.653280.65328 (n=4n=4), 0.637640.63764 (1616), 0.636680.63668 (6464), 0.6366200.636620 (10241024). Averaging at random points is Monte Carlo integration: 0.64430.6443 (n=100n=100), 0.63050.6305 (10410^4), 0.636760.63676 (10610^6), converging more slowly and erratically, at rate about 1/n1/\sqrt n.

Which single constant cc best approximates f(x)=x2f(x)=x^2 on [0,1][0,1] in mean squared error? Expanding,

MSE(c)=∫01(x2−c)2 dx=c2−23c+15\text{MSE}(c)=\int_0^1(x^2-c)^2\,dx=c^2-\tfrac23c+\tfrac15

which is minimized at c=13=favgc=\tfrac13=f_{\text{avg}}, with minimum 445≈0.0889\tfrac4{45}\approx0.0889. Numerically c=0.2c=0.2 gives 0.10670.1067 and c=0.5c=0.5 gives 0.11670.1167. In general, the average value is the least-squares constant. The root mean square of sin⁡\sin over a period is 1/2=0.7071\sqrt{1/2}=0.7071, since the mean of sin⁡2\sin^2 is 12\tfrac12.

Common Misconceptions & Pitfalls

  • Integrating f−gf-g across a crossing. That gives signed area. Split at the crossings or integrate ∣f−g∣\lvert f-g\rvert (Example 2).
  • Radius equals xx. The radius is the distance to the axis of rotation. About x=2x=2 it is 2−x2-x (Example 6).
  • Washer area as π(R−r)2\pi(R-r)^2. It is π(R2−r2)\pi(R^2-r^2).
  • Mixing methods. Shells go with dxdx for a vertical axis and washers with dydy. Writing a shell radius together with a washer area in one integral gives nonsense.
  • Average of the endpoints. For sin⁡\sin on [0,π][0,\pi] the mean of f(0)f(0) and f(π)f(\pi) is 00, while favg=0.6366f_{\text{avg}}=0.6366. For linear ff the two agree; in general they do not.
  • Believing the average is always attained. Continuity guarantees a point where ff equals the average, but without it the value can be missed (Core Theory). Continuity is sufficient, not necessary: ff equal to 00, 11, 22 on the three thirds of [0,1][0,1] has average 11 and attains it. The point is generally not the midpoint of the interval.
  • Rotating a region that crosses the axis and adding both halves. The halves can overlap, and then the overlap is counted twice.

Summary

Setting up an integral means slicing, approximating each slice by a simple shape, adding, and taking the limit. For area, integrate top minus bottom, splitting at crossings (or integrate ∣f−g∣\lvert f-g\rvert), and switch to yy if that avoids a split. For volume, integrate cross-sectional area: πf2\pi f^2 for disks, π(R2−r2)\pi(R^2-r^2) for washers, and 2πρh2\pi\rho h for shells, with all radii measured from the axis, and the region on one side of it. A left or right Riemann sum of the slice volumes converges to the exact volume, as the 8π8\pi table shows. The average value 1b−a∫abf\frac1{b-a}\int_a^bf is the limit of sample means, equals f(c)f(c) for some cc when ff is continuous (and may fail otherwise), and is the constant that minimizes mean squared error. The next lesson, improper-integrals, extends the integral to unbounded intervals and integrands.

Documentation Links