Ma · Mathematics

How to Turn a Summation into an Integral

Published By the 9to5Science editorial team

At a glance

  1. 1. Find the mesh

    Identify the interval and the spacing between sample points, usually the interval length divided by the number of terms.

  2. 2. Match each term

    Rewrite each summand as a function evaluated at a sample point, multiplied by the spacing.

  3. 3. Take the limit

    Recognize the resulting expression as a Riemann sum and use the definite integral when the function is integrable.

  4. 4. Check the setup

    Verify the interval, sample points, and scaling; an infinite series is not automatically an integral.

A sum can approach a definite integral when its terms represent function values across an interval, each weighted by the width of a small subinterval. This is the Riemann-sum definition of an integral.

The key is to identify the interval, sample points, and spacing. Merely having infinitely many terms does not make a sum an integral; a fixed infinite series and a limit of increasingly fine finite sums are different objects.

The Riemann-sum pattern

Divide an interval [a,b][a,b] into nn equal parts. Each part has width

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

If xkx_k is a sample point in the kkth part, the corresponding Riemann sum is

∑k=1nf(xk) Δx.\sum_{k=1}^{n} f(x_k)\,\Delta x.

When ff is integrable, these sums approach the definite integral as the subintervals get narrower:

lim⁡n→∞∑k=1nf(xk) Δx=∫abf(x) dx.\lim_{n\to\infty}\sum_{k=1}^{n} f(x_k)\,\Delta x =\int_a^b f(x)\,dx.

For right endpoints, xk=a+kΔxx_k=a+k\Delta x. For left endpoints, xk=a+(k−1)Δxx_k=a+(k-1)\Delta x. Other choices, such as midpoints, work too. For a continuous function, these choices have the same limit.

A practical conversion method

Given a sum that depends on nn, use this checklist:

  1. Find a factor that can serve as Δx\Delta x, often 1/n1/n or (b−a)/n(b-a)/n.
  2. Rewrite the remaining part of each term as f(xk)f(x_k).
  3. Determine the interval from the sample points. For example, k/nk/n with k=1,…,nk=1,\ldots,n samples the interval [0,1][0,1] at right endpoints.
  4. Write the matching integral and evaluate it if needed.

If the summand has the form f(k/n)/nf(k/n)/n, then the usual interpretation is

lim⁡n→∞1n∑k=1nf(kn)=∫01f(x) dx,\lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n}f\left(\frac{k}{n}\right) =\int_0^1 f(x)\,dx,

provided ff is integrable on [0,1][0,1].

More generally, if the sample points are a+k(b−a)/na+k(b-a)/n, the spacing is (b−a)/n(b-a)/n, so the factor multiplying each function value must match that spacing.

Worked example

Evaluate the limit

lim⁡n→∞1n∑k=1n(1+(kn)2).\lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n}\left(1+\left(\frac{k}{n}\right)^2\right).

The sample points are xk=k/nx_k=k/n, the right endpoints of nn equal subintervals of [0,1][0,1]. Their spacing is Δx=1/n\Delta x=1/n. The summand is therefore f(xk)Δxf(x_k)\Delta x for f(x)=1+x2f(x)=1+x^2. It follows that

lim⁡n→∞1n∑k=1n(1+(kn)2)=∫01(1+x2) dx=[x+x33]01=43.\begin{aligned} \lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n}\left(1+\left(\frac{k}{n}\right)^2\right) &=\int_0^1(1+x^2)\,dx\\ &=\left[x+\frac{x^3}{3}\right]_0^1\\ &=\frac{4}{3}. \end{aligned}

You can check this directly from the formula for the sum of squares:

1n∑k=1n(1+(kn)2)=1+n(n+1)(2n+1)6n3⟶1+13.\frac{1}{n}\sum_{k=1}^{n}\left(1+\left(\frac{k}{n}\right)^2\right) =1+\frac{n(n+1)(2n+1)}{6n^3} \longrightarrow 1+\frac{1}{3}.

Both methods give 4/34/3.

Common mistakes

  • Dropping the spacing factor. A sum of function values alone usually is not a Riemann sum. The factor Δx\Delta x makes each term represent a small contribution to area.
  • Using the wrong interval. The values k/nk/n for k=1,…,nk=1,\ldots,n range across [0,1][0,1]. Values such as 2k/n2k/n instead sample [0,2][0,2] and have spacing 2/n2/n.
  • Treating a fixed series as a Riemann sum. The series ∑k=1∞ak\sum_{k=1}^{\infty}a_k adds a particular sequence of terms. A Riemann-sum limit generally has both a changing number of terms and terms that depend on nn.
  • Assuming an integral equals a series. The integral test can compare a positive series with an improper integral, but it usually gives bounds or information about convergence—not equality.
  • Ignoring integrability. The Riemann-sum limit is justified when the function is integrable on the interval. Continuity is a common sufficient condition, though not necessary.

What if the expression is an infinite series?

If you have a fixed series such as ∑k=1∞ak\sum_{k=1}^{\infty}a_k, you cannot generally convert it directly into a definite integral. Depending on the goal, you may use the integral test to study convergence, or use an integral to estimate partial sums. Those methods relate a sum and an integral but are not the same as recognizing a Riemann sum.

For instance, ∑k=1nf(k/n)/n\sum_{k=1}^{n}f(k/n)/n changes as nn changes and samples a fixed interval more finely. By contrast, ∑k=1∞1/k2\sum_{k=1}^{\infty}1/k^2 is a fixed series. Its value can be found by other methods, but it is not obtained simply by reading it as a Riemann sum.

References

  1. Calculus, Volume 1
  2. Principles of Mathematical Analysis

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.