Why does an integral turn negative when its limits are switched? I’m trying to find the tension at the middle of a rotating rod in a gravity-free space. To do that, I had done some math and then I integrated with the limits $L/2$ to $L$.
This sounds like a math question but I’m not sure and I want to know: Is there a significance to the negative sign in the result if I take the limits the other way around?
Does this negative sign indicate direction or do I just suck at math?
 A: It’s a basic characteristic of definite integrals that flipping the limits of integration will negate the result:
$$\int_a^b f(x)\ dx = -\int_b^a f(x)\ dx. $$
This can be seen by recalling the definition of an integral:
$$
\int_{x_{1}}^{x_{n}} f(x)\ dx = \lim_{n \to \infty} \sum_{k=1}^{n} f(x_k)\ \Delta x.
$$
If we think of this as the sum of the areas of very narrow rectangles underneath the curve of $f(x)$, then $f(x_k)$ is the height of the rectangle at the point $x_k$ and $\Delta x$ is its width.
If there are $n$ rectangles between $x_{1}$ and $x_{n}$, then
$$\Delta x = \frac{x_{n} - x_{1}}{n},\label{delx}$$
the $k$th rectangle is found at
$$ x_k = x_1 + k\Delta x, \tag{1}\label{xk}$$
and the height of the $k$th rectangle is
$$ f(x_k) = f(x_{1} + k\Delta x) = f\left(x_{1} + \frac{x_{n} - x_{1}}{n} k\right)$$
which makes the integral
$$
\int_{x_{1}}^{x_{n}} f(x)\ dx = \lim_{n \to \infty} \sum_{k=1}^{n} f\left(x_{1} + \frac{x_{n} - x_{1}}{n} k\right)\cdot \left(\frac{x_{n} - x_{1}}{n}\right).
$$
Because $x_{1}$, $x_{n}$, and $n$ are constants, we can move them outside the summation:
\begin{equation}\tag{2}\label{normal}
\int_{x_{1}}^{x_{n}} f(x)\ dx = \left(x_{n} - x_{1}\right) \lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n} f\left(x_{1} + \frac{x_{n} - x_{1}}{n} k\right).
\end{equation}
It’s important to note that the order in which we sum the values of $f(x)$ is unimportant due to the commutative property of addition. So instead of starting at $x=x_1$ and going to $x_n$, we could just as well start at the end and add backwards:
$$
\begin{align*}
\int_{x_{1}}^{x_{n}} f(x)\ dx &= \lim_{n \to \infty} \sum_{k=1}^{n} f(x_{n-k})\ \Delta x\\
&= \left(x_{n} - x_{1}\right)\lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n} f(x_{n - k}) \\
&= \left(x_{n} - x_{1}\right)\lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n} f\left(x_1 + \frac{x_n - x_1}{n}(n-k)\right) \\
&= \left(x_{n} - x_{1}\right)\lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n} f\left(x_n - \frac{x_n - x_1}{n} k\right)\tag{3}\label{reverse}
\end{align*}
$$
using \eqref{xk} to express $x_{n-k}$.
If your limits of integration are $\bf{x_{1} = a}$ and $\bf{x_{n} = b}$ then your integral when summing from start to end \eqref{normal} is
$$
\int_a^b f(x)\ dx = (b - a)\lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n} f\left(a + \frac{b - a}{n} k\right) \tag{4}\label{normalab}
$$
and when summing from end to start \eqref{reverse} is
$$
\int_a^b f(x)\ dx = \left(b - a\right)\lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n} f\left(b - \frac{b - a}{n} k \right).
$$
Now using the last equation let’s reverse the limits so that $\bf{x_{1} = b}$and $\bf{x_{n} = a}$ (i.e., swap all $a$s with $b$s and vice versa):
$$
\begin{align*}
\int_b^a f(x)\ dx &= \left(a - b\right)\lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n} f\left(a - \frac{a - b}{n} k \right) \\
& = \left(a - b\right)\lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n} f\left(a + \frac{b - a}{n} k \right) \\
&= - \left(b - a\right)\lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n} f\left(a + \frac{b - a}{n} k \right)
\end{align*}
$$
which is identical to the negative value of the unflipped integral \eqref{normalab}.
