How do you decide to use either a Riemann Sum or take the anti-derivative to calculate an area?

1.2k Views Asked by At

I understand both methods of calculating the area under a curve. But when would you take the anti-derivative, and when would you used the Riemann Sum? Both methods should provide the same result, but I found no explanation of when we'd prefer one method over the other.

2

There are 2 best solutions below

0
On

Rather than go too far afield, I will restrict this answer to the situation where $f:[a,b] \to \mathbb{R}$ is not only Riemann integrable, but is a continuous function, and the definite integral is readily interpreted as "area under the curve." Furthermore, I assume you are interested in the exact, rather than approximate numerical, valuation of the integral. I also will not bring up approaches using complex contour integration.

From the basic definition we can assert that the value of the integral is obtainable as a limit of a Riemann sum -- lower, upper or with an arbitrary choice of intermediate points with respect to a partition.

Since $f$ is continuous and integrable, the fundamental theorem of calculus states that if $F$ is a primitive (anti-derivative) whereby $F'(x) = f(x)$ on $[a,b]$, then

$$F(b) - F(a) = \int_a^b f(x) \, dx.$$

Which approach you take is generally a matter of expedience. If the anti-derivative is not recognizable, in terms of elementary functions then you may have no choice but to consider the sum. If that leads to a dead-end for exact valuation, then your only recourse is numerical integration.

(1) An example, where either approach is easy, would be a simple case like $f(x) = x$. Using the anti-derivative $F(x) = x^2/2,$ we have

$$\int_0^1 x \, dx = \left.\frac{x^2}{2}\right|_0^1 = \frac{1}{2}.$$

Alternatively,

$$\int_0^1 x \, dx = \lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^n \frac{k}{n} = \lim_{n \to \infty} \frac{1}{n^2} \sum_{k=1}^m k = \lim_{n \to \infty} \frac{1}{n^2}\frac{n(n+1)}{2} = \frac{1}{2}.$$

(2) Next consider $f(x) = x e^x$. This is easily evaluated with the anti-derivative $F(x) = x e^x - e^x$, yielding

$$\int_0^1 x e^x \, dx = \left. (xe^x - e^x)\right|_0^1 = 1$$.

Evaluating this with Riemann sums is more challenging. See How to integrate $xe^x$ without using antiderivatives or integration by parts.

(3) Finally, consider

$$\int_0^\pi \log(a^2 + b^2 - 2ab \cos x) \, dx .$$

This is a rare case where using a limit of Riemann sums is effective and in my opinion more convenient than other alternatives, as I demonstrate in Bronstein Integral 21.42.

0
On

I think the crucial point is the following.

  • The Riemann sum is usually the thing we intrinsically care about - it is, by definition, the area under the curve. (I'm ignoring some nuance here, but that's fine for now.)

  • The antiderivative is something we can usually calculate relatively easily, at least compared to the Riemann sum; but, just from the definition, it's not obvious why one would care too much about this object.

  • The point is that there's a theorem connecting these two things: the fundamental theorem of calculus says exactly that if we want to compute the Riemann sum, we can do so via the antiderivative. (Again, ignoring nuance.)

So once you have this theorem, there's no reason to use either Riemann sums or antiderivatives, other than convenience: they'll both do the same thing. In the vast majority of cases, antiderivatives make your life easier.

Like I said, I'm ignoring a whole ton of nuance around how we define the area under a curve (see e.g. the Lebesgue integral), but this general picture is accurate.