Skip to content

Integration as the limit of a sum

A definite integral is the exact limit of a sum of thin rectangular strips. For a continuous function ff on [a,b][a,b],

abf(x)dx=limnr=1nf(a+r(ba)n)ban.\boxed{\int_a^b f(x)\,\mathrm dx =\lim_{n\to\infty}\sum_{r=1}^{n} f\left(a+\frac{r(b-a)}{n}\right)\frac{b-a}{n}.}

This formula connects finite sums, limits, areas and integration. It also explains the notation dx\mathrm dx: each term has the form

height×small width.\text{height}\times\text{small width}.

You should be able to:

Divide [a,b][a,b] into nn strips of equal width

Δx=ban.\Delta x=\frac{b-a}{n}.

The right endpoint of strip rr is

xr=a+rΔx=a+r(ba)n.x_r=a+r\Delta x =a+\frac{r(b-a)}{n}.

Using f(xr)f(x_r) as the height, the area of this rectangle is

f(xr)Δx.f(x_r)\Delta x.

Adding all nn rectangles gives the right endpoint sum

Sn=r=1nf(xr)Δx=r=1nf(a+r(ba)n)ban.S_n=\sum_{r=1}^{n}f(x_r)\Delta x =\sum_{r=1}^{n} f\left(a+\frac{r(b-a)}{n}\right)\frac{b-a}{n}.

For finite nn, curved pieces remain between the rectangles and the graph. As nn increases, Δx0\Delta x\to0 and the approximation approaches a fixed value. The integral is defined to be that limit:

abf(x)dx=limnSn.\int_a^b f(x)\,\mathrm dx=\lim_{n\to\infty}S_n.

The number of rectangles tends to infinity, but their widths tend to zero. It is the balance between these two changes that produces a finite limit.

Write the right endpoint sum with nn equal strips for

25(x2+1)dx.\int_2^5 (x^2+1)\,\mathrm dx.

First find the width:

Δx=52n=3n.\Delta x=\frac{5-2}{n}=\frac3n.

The right endpoint of strip rr is

xr=2+3rn.x_r=2+\frac{3r}{n}.

Substitute this into the function and multiply by the width:

Sn=r=1n[(2+3rn)2+1]3n.\boxed{S_n=\sum_{r=1}^{n} \left[\left(2+\frac{3r}{n}\right)^2+1\right]\frac3n.}

Therefore

25(x2+1)dx=limnSn.\int_2^5(x^2+1)\,\mathrm dx=\lim_{n\to\infty}S_n.

Do not omit the factor 3/n3/n. The function value is a height, not an area.

The sample point can be chosen differently within each strip.

MethodSample point in strip rr
left endpointa+(r1)Δxa+(r-1)\Delta x
right endpointa+rΔxa+r\Delta x
midpointa+(r12)Δxa+\left(r-\frac12\right)\Delta x

For a continuous function, all three sums approach the same integral as nn\to\infty. Their finite approximations need not be equal.

If ff is increasing and positive, left endpoint rectangles lie below the curve and right endpoint rectangles extend above it. Hence

Ln<abf(x)dx<Rn.L_n<\int_a^b f(x)\,\mathrm dx<R_n.

The inequalities reverse in the appropriate way for a decreasing function. Always reason from the graph rather than memorising one rule for every situation.

Estimate 02x2dx\int_0^2 x^2\,\mathrm dx using four equal strips and left and right endpoints.

Here

Δx=204=12.\Delta x=\frac{2-0}{4}=\frac12.

The left endpoints are 0,12,1,320,\frac12,1,\frac32, so

L4=12[02+(12)2+12+(32)2]=12(0+14+1+94)=74.\begin{aligned} L_4 &=\frac12\left[0^2+\left(\frac12\right)^2+1^2+\left(\frac32\right)^2\right]\\ &=\frac12\left(0+\frac14+1+\frac94\right)\\ &=\frac74. \end{aligned}

The right endpoints are 12,1,32,2\frac12,1,\frac32,2, giving

R4=12[(12)2+12+(32)2+22]=12(14+1+94+4)=154.\begin{aligned} R_4 &=\frac12\left[\left(\frac12\right)^2+1^2+\left(\frac32\right)^2+2^2\right]\\ &=\frac12\left(\frac14+1+\frac94+4\right)\\ &=\frac{15}{4}. \end{aligned}

Since x2x^2 is increasing on [0,2][0,2],

74<02x2dx<154.\frac74<\int_0^2x^2\,\mathrm dx<\frac{15}{4}.

The exact value is 8/38/3, which lies between these bounds.

The standard formulae

r=1n1=n,r=1nr=n(n+1)2,r=1nr2=n(n+1)(2n+1)6\sum_{r=1}^{n}1=n, \qquad \sum_{r=1}^{n}r=\frac{n(n+1)}2, \qquad \sum_{r=1}^{n}r^2=\frac{n(n+1)(2n+1)}6

turn many Riemann sums into algebraic expressions in nn. Simplify before taking the limit.

Worked example 3: derive 03xdx\boldsymbol{\int_0^3 x\,\mathrm dx}

Section titled “Worked example 3: derive ∫03x dx\boldsymbol{\int_0^3 x\,\mathrm dx}∫03​xdx”

Use nn right endpoint rectangles. Their width is

Δx=3n,\Delta x=\frac3n,

and the rrth right endpoint is xr=3r/nx_r=3r/n. Therefore

Sn=r=1n3rn3n=9n2r=1nr=9n2n(n+1)2=92(1+1n).\begin{aligned} S_n &=\sum_{r=1}^{n}\frac{3r}{n}\frac3n\\ &=\frac9{n^2}\sum_{r=1}^{n}r\\ &=\frac9{n^2}\cdot\frac{n(n+1)}2\\ &=\frac92\left(1+\frac1n\right). \end{aligned}

Now let nn\to\infty. Since 1/n01/n\to0,

03xdx=limnSn=92.\boxed{\int_0^3x\,\mathrm dx =\lim_{n\to\infty}S_n =\frac92.}

This agrees with the triangular area 12×3×3=9/2\frac12\times3\times3=9/2.

Worked example 4: a quadratic on a shifted interval

Section titled “Worked example 4: a quadratic on a shifted interval”

Use a limit of sums to evaluate

12x2dx.\int_1^2 x^2\,\mathrm dx.

The strip width and right endpoints are

Δx=1n,xr=1+rn.\Delta x=\frac1n, \qquad x_r=1+\frac rn.

Thus

Sn=r=1n(1+rn)21n=1nr=1n(1+2rn+r2n2)=1nr=1n1+2n2r=1nr+1n3r=1nr2.\begin{aligned} S_n &=\sum_{r=1}^{n}\left(1+\frac rn\right)^2\frac1n\\ &=\frac1n\sum_{r=1}^{n} \left(1+\frac{2r}{n}+\frac{r^2}{n^2}\right)\\ &=\frac1n\sum_{r=1}^{n}1 +\frac2{n^2}\sum_{r=1}^{n}r +\frac1{n^3}\sum_{r=1}^{n}r^2. \end{aligned}

Insert the standard sums:

Sn=1+n+1n+n(n+1)(2n+1)6n3.S_n =1+\frac{n+1}{n} +\frac{n(n+1)(2n+1)}{6n^3}.

Taking the limit term by term gives

12x2dx=1+1+1126=73.\begin{aligned} \int_1^2x^2\,\mathrm dx &=1+1+\frac{1\cdot1\cdot2}{6}\\ &=\boxed{\frac73}. \end{aligned}

In the last fraction, divide numerator and denominator by n3n^3 before taking the limit. Substituting n=n=\infty is not valid algebra.

A sum may be presented without an integral. Compare it with

r=1nf(a+r(ba)n)ban.\sum_{r=1}^{n}f\left(a+\frac{r(b-a)}n\right)\frac{b-a}{n}.

Look for three ingredients:

  1. a width of the form (ba)/n(b-a)/n;
  2. a sample point of the form a+r(ba)/na+r(b-a)/n;
  3. a function evaluated at that sample point.

Worked example 5: convert a sum into an integral

Section titled “Worked example 5: convert a sum into an integral”

Evaluate

limn2nr=1n1+2rn.\lim_{n\to\infty}\frac2n \sum_{r=1}^{n}\sqrt{1+\frac{2r}{n}}.

The width is 2/n2/n, so choose an interval of length 22. The sample points are

1+2rn,1+\frac{2r}{n},

which are right endpoints on [1,3][1,3]. The function is f(x)=xf(x)=\sqrt{x}. Hence

limn2nr=1n1+2rn=13xdx.\lim_{n\to\infty}\frac2n \sum_{r=1}^{n}\sqrt{1+\frac{2r}{n}} =\int_1^3\sqrt{x}\,\mathrm dx.

Now integrate:

13x1/2dx=[23x3/2]13=2323.\begin{aligned} \int_1^3x^{1/2}\,\mathrm dx &=\left[\frac23x^{3/2}\right]_1^3\\ &=\boxed{2\sqrt3-\frac23}. \end{aligned}

If f(x)<0f(x)<0, then f(xr)Δxf(x_r)\Delta x is negative. The limit therefore measures signed area:

abf(x)dx=area above the axisarea below the axis.\int_a^b f(x)\,\mathrm dx =\text{area above the axis}-\text{area below the axis}.

For example,

11xdx=0\int_{-1}^{1}x\,\mathrm dx=0

because the negative and positive contributions cancel. The total geometric area is not zero. To find that, split the interval where the graph crosses the axis and make each area positive.

  • Forgetting the width: f(xr)\sum f(x_r) adds heights. A Riemann sum adds f(xr)Δxf(x_r)\Delta x.
  • Using the wrong endpoint: with r=1,,nr=1,\ldots,n, a+rΔxa+r\Delta x gives right endpoints. Left endpoints use a+(r1)Δxa+(r-1)\Delta x.
  • Treating a finite sum as exact: rectangles generally approximate the integral until the limit is taken.
  • Assuming every integral is positive: values below the xx axis contribute negatively.
  • Replacing nn by infinity: infinity is not a number. Simplify the expression, then use limit laws such as 1/n01/n\to0.
  1. Write a right endpoint sum for 14(2x3)dx\int_1^4(2x-3)\,\mathrm dx using nn equal strips.
  2. For an increasing function on [a,b][a,b], which is larger: its left endpoint sum or its right endpoint sum?
  3. Evaluate limn1n2r=1nr\displaystyle \lim_{n\to\infty}\frac1{n^2}\sum_{r=1}^{n}r.
  4. Express limn4nr=1n(2+4rn)2\displaystyle \lim_{n\to\infty}\frac4n\sum_{r=1}^{n}\left(2+\frac{4r}{n}\right)^2 as a definite integral.
  5. Why can 22x3dx\int_{-2}^{2}x^3\,\mathrm dx equal zero even though the graph encloses regions with the axis?
Answers
  1. Here Δx=3/n\Delta x=3/n and xr=1+3r/nx_r=1+3r/n, so

    r=1n[2(1+3rn)3]3n.\sum_{r=1}^{n}\left[2\left(1+\frac{3r}{n}\right)-3\right]\frac3n.
  2. The right endpoint sum is larger. On every strip, its rectangle uses the greater function value.

  3. Using r=n(n+1)/2\sum r=n(n+1)/2,

    limnn(n+1)2n2=12.\lim_{n\to\infty}\frac{n(n+1)}{2n^2} =\frac12.
  4. The width is 4/n4/n, the interval is [2,6][2,6], and f(x)=x2f(x)=x^2. Therefore the limit is

    26x2dx.\int_2^6x^2\,\mathrm dx.
  5. The function x3x^3 is odd. The negative signed area on [2,0][-2,0] cancels the equal positive signed area on [0,2][0,2].

The limit definition explains what a definite integral means. In routine calculations, the fundamental theorem of calculus lets you evaluate that limit efficiently by finding an antiderivative.