How do you know which way to choose the limits of an integral?

In the beginning of equation 13.18, in which Mr. Feynman calculates the potential energy of an object outside a spherical shell, it says: $$W=\frac{Gm'2 \pi a \mu}{R} \int \limits_{R+a}^{R-a} \, dr$$

The result of the integral should be: $$W=\frac{Gm'2 \pi a \mu}{R} \bigl((R-a)-(R+a)\bigr)$$

$(R-a)-(R+a)$ is $-2a$ and so $$W=-\frac{Gm'4 \pi a^2 \mu}{R}$$ $$W=-\frac{Gm'm}{R}$$

How does Mr. Feynman know how to choose the limits of the integral? If I chose the limits from $R-a$ to $R+a$, I would get in the end: $W=\frac{Gm'm}{R}$. The only difference is the algebraic sign at the beginning.

I don't know why you have to choose the beginning of the integral further away from P ($R+a$) and end closer to P ($R-a$). Is there any rule that states that, or why did Mr. Feynman choose the limits of the integral the way he did? Did he think: I've got to get a negative result, so I choose the limits from $R+a$ to $R-a$?

Did he think: I've got to get a negative result, so I choose the limits from $R+a$ to $R−a$?

Yep! Well, probably. I don't know exactly what Feynman was thinking, of course, but that's a pretty typical way for a physicist to figure out the correct sign for an expression.

If you want to be a little more precise, you can use the same sort of physical reasoning earlier in the calculation: in particular, on the mass of the ring. Feynman gives the following expression for that mass:

$$\mathrm{d}m = 2\pi a\mu\mathrm{d}x$$

Now, we know the mass has to be positive. So $\mathrm{d}x$ had better be greater than zero, and that in turn means we have to do the integral in the direction of increasing $x$.

$$\int_{\text{smaller limit}}^{\text{larger limit}}\ldots\mathrm{d}x$$

In figure 13.6, $x$ increases from left to right, so the lower limit of the integral has to be the left side of the sphere (where $x = -a$), and the upper limit has to be the right side (where $x = a$). So you could actually think of the integral like this:

$$\int_{\text{left side of sphere}}^{\text{right side of sphere}}\ldots\mathrm{d}x$$

Just one catch: Feynman actually writes the integral as an integral over $r$, not $x$. So he's doing this instead:

$$\int_{\text{left side of sphere}}^{\text{right side of sphere}}\ldots\mathrm{d}r$$

It's still the case that the lower limit is at the left side of the sphere, but you just have to pick the value of $r$ (instead of $x$) at that point, which is $r = R + a$. That's why $R + a$ is the lower limit. And similarly, the upper limit is $R - a$ because $r = R - a$ at the right side of the sphere.

As you can tell, this sort of reasoning can be tricky, which is why we like to bypass it and just pick whichever sign gives the correct answer.

• Knowing Feynman, he probably did it adjusting the signs. One of my professors used to say "Never start a calculation before knowing what the answer is going to be". – Davidmh May 7 '14 at 9:27

This is really just a comment to David's answer but it got a bit long for the comment box.

I was hesitant to post an answer saying that physicists just choose the limits that give the correct result, but since David has crossed that line I'll stand beside him and agree :-)

Feynmann is calculating the work done using the usual formula for work:

$$dW = \mathbf{F} \cdot \mathbf{dr}$$

where $\mathbf{F}$ and $\mathbf{dr}$ are vectors so they have a direction as well as a magnitude. If $\mathbf{F}$ and $\mathbf{dr}$ point in the same direction the work is $|F||dr|$ and if they point in opposite directions it's $-|F||dr|$. The argument is that if the test mass does work then its energy must decrease by an amount equal to the work done. That's why you can use the work to calculate the potential energy.

The trouble is that even experienced physicists can get mixed up between the work done by the test mass and the work done on the test mass. These two quantities are equal but with opposite signs. You could indulge in frenzied head scratching trying to work out which is which, but it's far easier to make the obvious observation that the energy of the test mass decreases as you get closer to the spherical shell so if you're going to equate $dU$ with $dW$ then $dW$ must be negative. So you just put the limits into the integral in the order that gives a negative result.