I came across a question on a high school level exam paper. The question reads:
Show that$$ \int_a^b x^ndx=-\int_b^a x^n dx. $$
Of course, students are just expected to find the antiderivative and simply substitute the limits. However, this question drags me into deep thoughts: how do we formally define integrals where the upper limit is smaller than the lower limit?
Clearly, we should have $\int_a^b f(x)dx=-\int_b^a f(x)dx$. But when I was trying to "prove" this from the definition of Riemann integrals, I find that if $a>b$, then dissections of the interval $[a,b]$ of the form $a=x_0<x_1<...<x_n=b$ is impossible. Apparently, we have not defined the integral $\int_a^b f(x)dx$ for $a>b$ in real analysis books. Lebesgue integrals don't help either, because it is integrating over sets rather than across two limits.
And here is the problem: for $a>b$, we have $$ \int_b^a f(x)dx=\int_{[b,a]} f(x) d\mu, $$ but $\int_a^b f(x)dx$ is undefined.
Of course, we can say that, by definition, $\int_a^b f(x)dx=-\int_b^a f(x)dx$. But somehow, I think we should not brutally define it; we should make it look more natural, i.e., to prove it under some assumptions.
I'd like to think that $\int_a^b f(x)dx=\int_{\gamma} f(z)dz$, where $\gamma:[0,1]\to \mathbb C$ is a curve connecting the complex numbers $a$ and $b$. This, of course, only make sense when the integral is path-independent. Let $\delta(t)=\gamma(1-t)$, so $\gamma(0)=\delta(1)=a,\gamma(1)=\delta(0)=b$. $$ \int_a^b f(x)dx=\int_{\gamma} f(z)dz=\int_{[0,1]}f(\gamma(t))\dot\gamma(t) dt. $$ The last integral can be taken in the sense of either Riemann or Lebesgue. Similarly, $$ \int_b^a f(x)dx=\int_{[0,1]}f(\delta(t))\dot\delta(t) dt=\int_{[0,1]}f(\gamma(1-t))(-\dot\gamma(1-t)) dt=-\int_{[0,1]}f(\gamma(t))\dot\gamma(t) dt. $$ So, $\int_a^b f(x)dx=-\int_b^a f(x)dx$.