Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the relation between a summation and an integral ? This question is actually based on a previous question of mine here where I got two answers (one is based on summation notation) and the other is based on integral notation and I do not know yet which one to accept . So I would like to understand the connect between the two ?

share|cite|improve this question
Wikipedia has a nice paragraph or two as an introduction. – Frenzy Li Aug 21 '12 at 10:36
There is a certain relation between integral and summation given by $$ \sum\limits_{i\in I}f(i) = \int\limits_{I}f(x)\#(\mathrm dx) $$ where $\#$ is the counting measure, and the function $f$ is e.g. non-negative. Such connection is also described in article mentioned by FrenzY DT. However, in the previous version of yours the integral and summation are used for, say, orthogonal purposes hence this connection plays almost no role there. – Ilya Aug 21 '12 at 10:37
@Ilya by orthogonal you mean "mutually independent " ? – Geek Aug 21 '12 at 10:44
Well, not in the sense of the probability. I meant, that there I used an integral as a definition of the expectation, and Seyhmus used the sum there inside the expectation. Well, the linearity just follows from the fact that you can swap integral and the sum (i.e. these two operators commute) - but an extremely important fact that the sum is a special case of an integral, and the integral is a limit of sums is not used there. In fact, you might have there another operator instead of the sum, which also commutes with the integral - e.g. the limit operator $\lim$. – Ilya Aug 21 '12 at 10:48

Let me first elaborate on Ilya's comment. If you are familiar with measure theory, then integration and summation are both integration, but with respect to different measures. What is thought of as usual integration is integration with respect to the Lebesgue measure $dx$, while summation is integration with respect to the counting measure $\#(dx)$.

To make the connection explicit, we can write the counting measure as $$ \#(dx) = \sum_n \delta(x-n) dx$$ where $\delta(x)$ is the Dirac $\delta$ distribution. Then $$ \int f(x) \#(dx) = \sum_n \int f(x) \delta(x-n) dx = \sum_n f(n), $$ where I have used the fact that $\int f(x) \delta(x-x_0) dx = f(x_0)$.

To see that there is something interesting going on here (and this is not just a reworking of definitions), let's compute this in a different way. The Dirac $\delta$ distribution is the (distributional) derivative of the Heavyside step function $H(x)$ (it takes the value $1$ for $x > 1$ and $0$ otherwise). Then \begin{align} \sum_n \int f(x) \delta(x-n) dx &= \sum_n \int f(x) \frac{d}{dx} H(x-n) dx \\\ \end{align} Since $H(x-n)$ is constant outside a neighborhood of $n$, we can replace $$ \int f(x) \frac{d}{dx} H(x-n) dx $$ by $$ \int_{n-\epsilon}^{n+\epsilon} f(x) \frac{d}{dx} H(x-n) dx. $$ Now apply naive integration by parts: \begin{align} \int_{n-\epsilon}^{n+\epsilon} f(x) \frac{d}{dx} H(x-n) dx &= f(n+\epsilon) - \int_{n-\epsilon}^{n+\epsilon} f'(x) H(x-n) dx \\\ &= f(n+\epsilon) - \int_n^{n+\epsilon} f'(x) dx \\\ &= f(n+\epsilon) - (f(n+\epsilon) - f(n)) \\\ &= f(n) \end{align} Hence $$ \sum_n \int f(x) \delta(x-n) dx = \sum_n f(n) $$ as expected.

Now there is another connection between summation and (usual) integration, given by the Euler-Maclaurin formula. The idea is that since $\int_0^n f(x) dx$ can be approximated by the Riemann sum $$ \frac{1}{2} f(0) + f(1) + \cdots + f(n-1) + \frac{1}{2} f(n), $$ then there is formula $$ \sum_{i=0}^n f(i) = \int_0^n f(x)dx + \textrm{higher order corrections} $$ I won't derive the full formula, but let's see a simple example. Consider $ \int_0^1 f(x) dx$. We can integrate by parts taking $u = f(x), v = x$. Then we have \begin{align} \int_0^1 f(x) dx &= \left. x f(x) \right|_0^1 - \int_0^1 x f'(x) dx \\\ &= f(1) - \int_0^1 x f'(x) dx \end{align} Hence $$ f(1) = \int_0^1 f(x) dx + \int_0^1 x f'(x) dx $$ Hence $$ \sum_{i=1}^n f(i) = \int_0^n f(x) dx + \sum_{i=1}^n \int_{i-1}^{i} (x-i+1) f'(x) dx $$ Note that the error term involves the derivative of $f$. To obtain the full formula, we repeat this trick on the remainder term. This will give a certain weighted sum of $f'(i)$, with an error term involving $f''(x)$. Continuing inductively, we get a formula that is schematically of the form $$ \sum_n f(n) = \int f(x) dx + \sum_{k=1}^N \sum_n C_{k,n} f^{(k)}(n) + R_N $$ where $C_{k,n}$ are certain constants and $R_N$ is a remainder term that is a certain integral involving the $(N+1)$st derivative of $f$.

Since it is often possible to obtain asymptotics of integrals, this gives an extremely powerful method to find asymptotics of sums.

share|cite|improve this answer
+1 for the effort, but yet again - it seems that the OP's confusion from the previous post is caused by the formula $\sum\int = \int\sum$ – Ilya Aug 21 '12 at 13:17

In both cases we have a fixed "ground set" $X$ and various functions $f:\ X\to{\mathbb R}$. We want to capture the notion of "overall effect of $f$ on $X$" (or on subsets of $X$) in a single number. Denote the result of this "condensation" process by $I(f,X)$. This process (or function) $I(\cdot,\cdot)$ should have the following properties: $$I(f+g,X)=I(f,X)+I(g,X)\ ,\qquad I(\lambda \,f, X)=\lambda\, I(f,X)\ ,$$ and when $A$, $B\subset X$ are "essentially disjoint" one should have $$I(f,A\cup B)=I(f, A)+I(f,B)\ .$$ When the ground set $X$ is countable the simplest function $I(\cdot,\cdot)$ with these properties is just summation: for any subset $A\subset X$ put $$I(f,A):=\sum_{x\in A} f(x)\ .$$ In this case "essentially disjoint" just means disjoint. A slightly more general "Ansatz" would use a weight function $w:X\to{\mathbb R}_{>0}$ and put $$I(f,A):=\sum_{x\in A} f(x) w(x)\ .$$ When $X$ is an uncountable set, e.g., $X={\mathbb R}$, or $X$ the set of all binary sequences, then the construction of such an $I(\cdot,\cdot)$ is far from trivial, and the result of such a construction is then called an integral.

The first step is to define a measure on $X$ (for countable $X$ we could just use the counting measure). This is a function $\mu(\cdot)$ that assigns each "reasonable" subset $A\subset X$ its measure (or volume) $\mu(A)\geq0$. For "essentially disjoint" sets $A$, $B$ one should have $\mu(A\cup B)=\mu(A)+\mu(B)$. After such a measure $\mu$ has been set up one can go on and define the corresponding integral $$I(f,X):=\int_X f(x)\ {\rm d}\mu(x)$$ in a standard way that does not depend on the particular $X$ under consideration, and this integral will have the properties required above.

share|cite|improve this answer

The Riemann or Lebesgue integral is in a sense an continuous sum. The symbol $\int$ is adapted from a letter looking like a somewhat elongated 's' from the word summa. In the definitions of the Riemann and the Lebesgue integrals the ordinary finite summation $\sum _{k=1}^n$ is used but the relation between the two is deeper than a mere 'one is used in the definition of the other' kind of relation.

The modern approach to viewing integrals is measure theory. Without getting into too many technical details one defines a measure space as an abstraction to the notion of measuring length or volume. Then real valued functions on a measurable space may be integrated to give a single real number.

For a particular measure space one gets the Lebesgue integral which itself, in a suitable way, subsumes the Riemann integral. On the other hand, given any set $X$ with $n$ elements there is a measure space structure on it such that for any function $f:X\to \mathbb {R}$ the integral of $f$ with respect to that measure is precisely the sum of the values that $f$ attains. In that sense general measure theory subsumes finite sums (of real numbers). More interestingly, given any countable set $X$ there is a measure on it such that the integral of real values functions on $X$ correspond to the infinite sum of its values. (Both of these remarks are trivial.) Thus measure theory subsumes infinite sums. From that point of view, a summation corresponds to integrals on a discrete measure space and the Lebesgue or Riemann integral corresponds to integrals on a continuous measure space.

share|cite|improve this answer
Actually, to be accurate the $\int$ symbol is not derived from a letter looking like a somewhat elongated 's', but rather a letter called Long S, which in its italicized form was simply $\int$. – Asaf Karagila Aug 21 '12 at 11:48
@Asaf: interesting, I thought the usual s was used as a starting point for $\int$ – Ilya Aug 21 '12 at 11:54
@Asaf: It would be a more convincing demonstration if you just italicized the ſ character, like so: ſ :) – Rahul Aug 21 '12 at 12:28

The summation appears in the definition of the Lebesgue integral. For a nonnegative measurable function $f$ (or let's say continuous or piecewise continuous) defined on an interval I, you first consider every step functions $g$ such that $g\leq f$, and you consider the quantity : $$\sum_{i} g(x_i)\Delta_i$$ where the $i$ index the steps of the function $g$, $g(x_i)$ the value of the function on the corresponding step, and $\Delta_i$ the length of the step. Then, you take the supremum of this quantity over all such functions $g$. And this is the definition of the integral. $$\int_If(x)\mathrm dx=\sup_g \sum_{i} g(x_i)\Delta_i$$

The Riemman integral is a particular case of the Lebesgue integral in a simpler framework, and in its definition, the summation appears in a similar way.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.