In the theory of action-angle variables, you wind up having to solve solve integrals with a characteristic square-root behavior near the the endpoints to express the action in terms of the orbital quantities quantities. For the Kepler potential, this integral is
$$ I = \int_{a}^{b}{\sqrt{\left(r - a\right)\left(b - r\right)} \over r}\,{\rm d}r $$
I believe from external sources that this works out to
$I = \pi [ \frac{a+b}{2} - \sqrt{a b}] $
In $$ I = \pi [ \frac{a+b}{2} - \sqrt{a b}] $$ In other words, proportional to the difference of the arithmetic and geometric means.
However, apparently I suck at doing integrals, so I'm unable to figure figure out why. I suspect that there is a transformation that would would be useful in solving this integral, and quite possibly some similar similar integrals arising from other potentials. Such a transformation might might also be useful in numerically calculating integrals for potentials potentials where you can't solve it analytically. I'd like to try several several alternate potentials that are more realistic than Kepler for a problem I have where action-angle theory is useful. But all all of the transformations I've tried have run up blind alleys. Can Can someone explain to me how to derive this? Thanks in advance.