# Is there a fundamental reason that $\int_b^a = -\int_a^b$

Is there a fundamental reason that switching the order of the limits in an integral results in the negative, i.e., $$\int_b^af(x)\,dx = -\int_a^bf(x)\,dx?$$ As far as I can tell, this is just chosen as a convention so that the rule $$\int_a^bf(x)\,dx + \int_b^cf(x)\,dx = \int_a^cf(x)\,dx$$ works out. But I was wondering if there was some more fundamental reason for this, perhaps somehow relating to signed measures or something.

Background

The reason I'm asking is that we're trying to figure out how to define things like $$\sum_{n=4}^1n$$ in the computer algebra system SymPy (see this discussion). The natural thing, for me at least, is to define this as 0, since it represens a summation over an empty set ($\{x\,|\,4\leq x\leq 1\}$). But it seems that some authors define this as $-\sum_{n=2}^3n$, so that the convention $\sum_{n=a}^bf(n) + \sum_{n=b + 1}^c f(n)= \sum_{n=a}^cf(n)$ works out (namely, Karr in "Summation in Finite Terms"). That got me thinking about integrals, and whether in that case the rule is also defined simply for convenience, or whether there is actually a fundamental motivation behind it in the definition of the integral.

I know that summations are just special cases of integrals (at least in the Lebesgue sense), so learning why things work for integrals would help me understand how things should work for summations.

-
@CameronBuie that question doesn't really give the answer I'm looking for. At least to me, integrals are Lebesgue integrals (especially if I want to consider sums as special cases of integrals), and things like the fundamental theorem of calculus don't always hold, at least not without some generalized definitions of derivatives. – asmeurer Dec 18 '12 at 5:47
Would it not make sense in a computer algebra system to distinguish between sums of the form $\sum_{n\in S}$ and sums of the form $\sum_{n=a}^b$? If $S=\{a,a+1,\dots,b\}$ and $a\le b$ then these should coincide, but otherwise they are rather different. For example, if $a>b$ then $\sum_{n=a}^b$ should probably be $-\sum_{n=b}^a$, but $\sum_{n\in \{m:a\le m\le b\}}=\sum_{n\in\emptyset}=0$. This would at least be consistent with the conventions for integrals. – user108903 Dec 18 '12 at 9:43
In case anyone is wondering, we are going to go with the Karr convention. The reason is that it's the only one that's consistant with computing a summation with symbolic limits and then substituting a numerical value vs. computing the summation with the numerical value to begin with, where the numerical value gives reversed limits. This also provides a good argument for integrals (in terms of the Fundamental Theorem of Calculus). – asmeurer Dec 18 '12 at 21:39

In order to deal with this question one has to distinguish (i) integrals with respect to a measure and (ii) integrals over a chain. For integrals over real intervals$[a,b]$ they are pretty much the same, therefore the difference does not become visible in everyday notation.

(i) After constructing Lebesgue measure $\mu$ on ${\mathbb R}$ and the integral with respect to this measure it makes sense to consider expressions like $$\int_{[a,b]} f\ {\rm d}\mu\ .$$ Here $-\infty<a\leq b<\infty$, and the interval $[a,b]$ is just a measurable set, but has no forward or backwards orientation. (I use the roman ${\rm d}$ to indicate that the "unsigned measure" is meant.)

(ii) Contrasting this, the Riemann integral $$\int_a^b f(x)\ dx\ :=\ \lim_\ldots\ \sum_{k=1}^N f(\xi_k)\ (x_k-x_{k-1})$$ is conceptually an integral over a chain $\gamma$. The factors $(x_k-x_{k-1})$ are meant to be small differences, not measures of small intervals. The chain $\gamma$ connects the points $a$ and $b$, starting at $a$ and ending at $b$, and $b<a$ is allowed. In any case the boundary of this chain is the formal sum $\{b\}-\{a\}$. In this setup it is obvious that for arbitrary $a$, $b$, $c$ one has $$\int_b^a f(x)\ dx=-\int_a^b f(x)\ dx\ ,\quad \int_a^c f(x)\ dx=\int_a^b f(x)\ dx+\int_b^c f(x)\ dx\ .$$ The fundamental theorem of calculus, together with the accompagning set of rules for handling integrals, is based on this interpretation of the integral.

It is a fact that for reasonable $f$ and $a\leq b$ one has $$\int_{[a,b]} f\ {\rm d}\mu =\int_a^b f(x)\ dx\ .$$ Therefore we tend to replace the notation on the LHS of this equation by the notation on the RHS even in cases where only the Lebesgue integral makes sense.

-
"The fundamental theorem of calculus...is based on this interpretation of the integral." This, I think, is the key insight here. – asmeurer Dec 18 '12 at 19:41

Go back to the definition of $\int_a^b f(x)\,dx$ as the limit of a Riemann sum. Look at how $\Delta x$ was defined. Therein lies your answer.

Remember when integrating from $a$ to $b$, we had $\Delta x_i = x_{i+1}-x_i$ whereas if we integrate from $b$ to $a$, then $\Delta x_i=x_i-x_{i+1}$, which is the negative of the $\Delta x$ result before.

-
Ah, that's a good reason. But I'm especially curious if this can be explained for Lebesgue integrals, since summations are special cases of Lebesgue integrals, not Riemann integrals (or at least not as far as I know). – asmeurer Dec 18 '12 at 5:49
Be careful here: even basic (definite) integration in calculus is defined in terms of the limit of a (Riemann) sum, not vice versa. – JohnD Dec 18 '12 at 5:54
I'm not sure we're understanding each other. What I'm saying is that a summation is a Lebesgue integral with the counting measure. – asmeurer Dec 18 '12 at 5:58
@asmeurer, Signs come up to reflect orientation issues. This doesn't have anything to do with measure, so there's no such phenomenon for Lebesgue integrals, but there would be something similar for integration over manifolds. – user27126 Dec 18 '12 at 7:46

There's another very simple reason in the Riemannian integral theory. Take the linear substitution $$y = a+b-x$$ which takes $a$ to $b$, $b$ to $a$, and $\mathrm{d}x$ to $-\mathrm{d}y$. The substitution theorem in the Riemann theory then immediately says that $$\int_b^a f(x) \mathrm{d}x = -\int_a^b f(y) \mathrm{d}y.$$

Note that the corresponding theorem in Lebesgue integral has an extra absolute value in the Jacobian term, which would cancel the effect of the minus sign. So the reasoning can not in fact be used there (regarding your "Background" section). But then again there is nothing like integrating from $a$ to $b$ in Lebesgue integral, it's always integral over a set, as Christian Blatter pointed out above. The latter is simply $(a,b)$ and invariant under the substitution being taken, so the sign must stay the same as well.

-
Wouldn't it be $f(y - a - b)dy$? – asmeurer May 12 '14 at 22:12
@asmeurer No, why? $f(y)$ is not supposed to be the same as $f(x)$, just have the same integral over $(a,b)$. $y$ goes down from $b$ to $a$ as $x$ goes up from $a$ to $b$. Plot the graph of $y=a+b-x$ to see. – The Vee May 13 '14 at 10:03

I want to answer your question with Lebesgue integrals, as you ask, but the fact is that the machinery for the measure does not take this into account at all (the measure of a subset of $\mathbb R$, using the standard measure or the counting measure, is always positive). I remember having a similar issue with signed area when learning about line integrals (absolute value signs always rub me the wrong way). The answer is that it makes the addition formula hold, even in the Lebesgue sense, in the following way:

Define $\bar\int_S\,f=-\int_Sf$. The idea is that $\bar\int$ "undoes" integrals, so if $B\subset A$, then $\int_A f+\bar\int_B\,f=\int_{A-B} f$, analogous to $\int_A f+\int_B\,f=\int_{A\uplus B} f$ if $A\cap B=\emptyset$, and $\int_A f+\bar\int_A\,f=0$. But this way, we can erase more than the whole integral: $B\subset A$ implies $$\int_A f+\bar\int_B\,f=\bar\int_{B-A} f,$$ where now $\bar\int_{B-A} f$ is supposed to represent negative integration over the set. It's nothing but algebraic trickery, but it's supposed to make you think in terms of being able to integrate backwards over things. Thus, we can define $[a,b]=\overline{[b,a]}$, where I'm abusing my own notation here to indicate that this set is supposed to be integrated negatively, and $\int_{[a,b]} f=\bar\int_{[b,a]} f\Rightarrow\int_a^b=-\int_b^a$. It's a lot of notation for very little gain, but hopefully I've convinced you that this can be made to make some sense. It's certainly useful to be able to say $\int_0^x dt=x$ instead of $\int_0^x dt=|x|$!

Edit: For sums, the counting measure assigns $1$ to every point in $\mathbb Z$, but the same rule applies. For $A=[a,b)\cap\mathbb Z$, we get $\int_Af=\sum_{i=a}^{b-1}f$, and for the disjoint union rule, we have, if $B=[b,c)\cap\mathbb Z$ is disjoint with $A$, $$\int_Af+\int_Bf=\int_{A\uplus B}f\Rightarrow\sum_{i=a}^{b-1}f+\sum_{i=b}^{c-1}f=\sum_{i=a}^{c-1}f.$$

(Note how the $-1$'s appear. This is an artifact of the definition of a sum as $\sum_a^b=\sum_{[a,b]\cap\mathbb Z}$, using the closed, rather than the half-open interval, which behaves nicer w.r.t. addition. Every programmer who writes for (int i=0;i<N;i++) knows this.) Rearranging this identity, we get, for a negative sum $\overline{[a,b)\cap\mathbb Z}=(b,a]\cap\mathbb Z=[b-1,a-1)\cap\mathbb Z$,

$$\sum_{i=b}^{c-1}f-\sum_{i=a}^{c-1}f=-\sum_{i=a}^{b-1}f:=\overline\sum_Af:=\sum_{i=b}^{a-1}f.$$

I've chosen the limits on the last definition to be consistent with our addition rule, because I can now rearrange to get

$$\sum_{i=b}^{c-1}f=\sum_{i=b}^{a-1}f+\sum_{i=a}^{c-1}f,$$

which looks identical to the first addition rule, except now $a<b$, so one is a backwards sum. Thus:

$$\sum_{i=b}^{a-1}f=-\sum_{i=a}^{b-1}f\Rightarrow\sum_{i=b}^af=-\sum_{i=a+1}^{b-1}f.$$

-
"...and $\int_A f+\bar\int_A\,f=0$." As you've defined it, how could this not hold? – asmeurer Dec 18 '12 at 6:56
Your very last sentence also gives a very nice motivation (it's ultimately the same as the accepted answer from math.stackexchange.com/questions/232455/…). I need to think on how this can apply to summations. – asmeurer Dec 18 '12 at 6:58
But what about signed measures? – asmeurer Dec 18 '12 at 6:59
Honestly, almost all of the equations above are either trivial or variations on $\int_A+\int_B=\int_{A\uplus B}$. I am trying very hard to make the equations sound more important than they are. Unfortunately signed measures don't do the trick here, as that's more like declaring specific regions of space as negative. Here we want to integrate in two different ways over the same sets. – Mario Carneiro Dec 18 '12 at 7:00
Check out this edit and see if it is what you're looking for. – Mario Carneiro Dec 18 '12 at 7:29

You want that integrals should be additive in the sense that $\int_a^b + \int_b^c = \int_a^c$, i.e. area below graph between a and b, plus area between b and c, equals the total area a to c.

From this,

$\int_a^b = \int_a^c - \int_b^c$

and permuting entries in the first expression gives

$\int_a^b = \int_a^c + \int_c^b.$

Now it follows that $- \int_b^c = \int_c^b.$

-

$f(x)$ is continuous function.

"The net signed area between $x=a,x=b, y=0$ and $y=f(x)$" is defined as $\int _a^b {f(x) dx}$

And also we can find the same result with sum of endless small rectangulars areas.

"The net signed area between $x=a, x=b, y=0$ and $y=f(x)$"$=\lim_{n\to\infty} \frac{b-a}{n}\sum \limits_{k=1}^n f(a+\frac{k(b-a)}{n})$

Thus we can write

$$\int _a^b {f(x) dx}=\lim_{n\to\infty} \frac{b-a}{n}\sum \limits_{k=1}^n f(a+\frac{k(b-a)}{n}) \tag 1$$

$$\sum \limits_{k=1}^n f(a+\frac{k(b-a)}{n})=f(a+\frac{(b-a)}{n})+f(a+\frac{2(b-a)}{n})+f(a+\frac{3(b-a)}{n})+....+f(a+\frac{(n-2)(b-a)}{n})+f(a+\frac{(n-1)(b-a)}{n})+f(b)$$

$a+\frac{(n-1)(b-a)}{n}=a+b-a-\frac{(b-a)}{n}=b+\frac{(a-b)}{n}$

$a+\frac{(n-2)(b-a)}{n}=a+b-a-\frac{2(b-a)}{n}=b+\frac{2(a-b)}{n}$

.

.

If we rewrite the sum from end to beginning.

$$\sum \limits_{k=1}^n f(a+\frac{k(b-a)}{n})=f(b)+f(a+\frac{(a-b)}{n})+f(b+\frac{2(a-b)}{n})+f(b+\frac{3(a-b)}{n})+....+f(b+\frac{(n-2)(a-b)}{n})+f(b+\frac{(n-1)(a-b)}{n})+f(a)=\sum \limits_{k=1}^n f(b+\frac{k(a-b)}{n})$$

$$\sum \limits_{k=1}^n f(a+\frac{k(b-a)}{n})=\sum \limits_{k=1}^n f(b+\frac{k(a-b)}{n}) \tag 2$$

Let's change limits in the integral from $b$ to $a$.

$$\int _b^a {f(x) dx}=\lim_{n\to\infty} \frac{a-b}{n}\sum \limits_{k=1}^n f(b+\frac{k(a-b)}{n})=-\lim_{n\to\infty} \frac{b-a}{n}\sum \limits_{k=1}^n f(b+\frac{k(a-b)}{n}) \tag 3$$

If we use the result that we got above in tag 2.

$$-\lim_{n\to\infty} \frac{b-a}{n}\sum \limits_{k=1}^n f(b+\frac{k(a-b)}{n}) =-\lim_{n\to\infty} \frac{b-a}{n}\sum \limits_{k=1}^n f(a+\frac{k(b-a)}{n})\tag 4$$

$$\int _b^a {f(x) dx}=-\lim_{n\to\infty} \frac{b-a}{n}\sum \limits_{k=1}^n f(a+\frac{k(b-a)}{n}) \tag 5$$

We can combine with Equation $(1)$ and we get the relation that we wanted to find.

$$\int _b^a {f(x) dx}=- \int _a^b {f(x) dx}\tag 6$$

-