Definite integrals as infinite series

By dkl9, written 2023-363, revised 2023-363 (0 revisions)


Consider a definite integral, such as ∫12dx sin(x). It's approximately equal to the closely related integral ∫12dx sin(a), for 1 < a < 2. Let's be lazy and pick a = 1; then we approximate ∫12dx sin(x) ≈ ∫12dx sin(1). The approximation simplifies very nicely as (2 - 1) sin(1) = sin(1) ≈ 0.841.

Given that the original integral is closer to 0.956, you may be dissatisfied with this approximation. It turns out that ∫12dx sin(x) = ∫13/2dx sin(x) + ∫3/22dx sin(x). We can do the same kind of approximation on each term, which leads to the even nicer result of (2 - 3/2) sin(3/2) + (3/2 - 1) sin(1) ≈ 0.919.

Still dissatisfied? We can go further and split the integral into four terms, and the approximate result will get even closer. Likewise with any power of two — or any natural number of terms, but I don't care about that here. This is the left-endpoint sum.

This method annoyingly requires that you know at the start how finely you're subdividing the integral. But if you don't know how precise you want it, not all hope is lost. Start with the trivial case, then calculate the two-term case, then with four terms, and so on, getting closer approximations, until you realise you should stop for your very practical purposes.

There are two problems with this approach:

(There are actually more problems with this approach, if you think about it, which I suggest you just don't.)

We can kill both birds with the one stone of expressing these sums in terms of modifications to earlier sums.

The one-term sum is S0 = 1 sin(1).

The two-term sum is S1 = 1/2 sin(1) + 1/2 sin(3/2) = (1 - 1/2) sin(1) + 1/2 sin(1.5) = 1 sin(1) - 1/2 sin(1) + 1/2 sin(3/2) = S0 - 1/2 sin(1) + 1/2 sin(3/2).

The four-term series is S2 = 1/4 sin(1) + 1/4 sin(5/4) + 1/4 sin(3/2) + 1/4 sin(7/4) = 1 sin(1) - 1/2 sin(1) - 1/4 sin(1) + 1/4 sin(5/4) + 1/2 sin(3/2) - 1/4 sin(3/2) + 1/4 sin(7/4) = S0 + S1 - 1/4 sin(1) + 1/4 sin(5/4) - 1/4 sin(3/2) + 1/4 sin(7/4).

Those cases should suffice to show the pattern: each left-endpoint sum with a power-of-two number of equal intervals equals the sum of all the coarser sums, plus alternate negative and positive left-endpoint samples, scaled by the appropriate coefficient. Now this method of approximating definite integrals is more readily described as one long sum, stopped when you like, rather than a sequence of increasingly long sums. The real advantages are that

Which means that you really can cut off this sum whenever you like, and get closer to the true integral the further out you stop.

Want this kind of sum as a single expression? That's doable. You should have enough of the insight now. The final expression is left as an exercise to the reader.

Or you can look at the one I wrote.