I came across these two results recently:
$$ \int_a^b \sqrt{\left(1-\dfrac{a}{x}\right)\left(\dfrac{b}{x}-1\right)} \: dx = \pi\left(\dfrac{a+b}{2} - \sqrt{ab}\right)$$
$$ \int_a^c \sqrt[3]{\left| \left(1-\dfrac{a}{x}\right)\left(1-\dfrac{b}{x}\right)\left(1-\dfrac{c}{x}\right)\right|} \: dx = \dfrac{2\pi}{\sqrt{3}}\left(\dfrac{a+b+c}{3} - \sqrt[3]{abc}\right)$$ for $0<a\leq b\leq c$.
I haven't tried to solve the first one yet, but I have an idea of how to approach it, namely using the substitution $x=a\cos^2\theta+b\sin^2\theta$. I have no idea how to approach the second one, however.
I think that the most interesting thing about the results above is that it seems like there is a proof for the AM-GM inequality hidden within. Clearly both integrands are positive and so the AM-GM falls out for the 2 and 3 variable case. All that is required is to prove the results.
My question is twofold:
- How would the second integral be computed? Is there an approach using elementary techniques?
- Can this be generalised to prove the AM-GM inequality for $n$-variables?
$\DeclareMathOperator{\Res}{Res}$ $\DeclareMathOperator{\sgn}{sgn}$ $\newcommand{\d}{\mathrm{d}}$ $\newcommand{\e}{\mathrm{e}}$ $\newcommand{\E}{\mathrm{E}}$ $\newcommand{\P}{\mathrm{P}}$ $\newcommand{\i}{\mathrm{i}}$ $\newcommand{\abs}[1]{\left\lvert #1 \right\rvert}$
Let $0 < a_0 \leq a_1 \ldots \leq a_{n-1}$ be a monotone sequence of $n$ positive real numbers. Then $$\boxed{ \sum_{k=0}^{n-2}\frac{1}{\pi}\sin \tfrac{\pi (k+1)}{n}\int_{a_k}^{a_{k+1}} \left(\prod_{i=0}^{n-1}\sqrt[n]{\abs{x-a_i}}\right)\frac{\d x}{x} =\frac{1}{n}\sum_{i=0}^{n-1}a_i - \sqrt[n]{\prod_{i=0}^{n-1}a_i} }\text{.}$$
The left side is manifestly nonnegative, so OP's second question is answered in the affirmative, although the form of the left side for $n=2,3$ is deceptively simple and does not reflect the general case.
The underlying method of this answer does not differ from that of Svyatoslav's, save for doing the bookkeeping needed to provide for the $n$-variable case. The method can be adapted to show that, for a positive random variable $X$ that takes on a finite set of values,
$$ \int_{\mathrm{ess}\,\inf X}^{\mathrm{ess}\,\sup X} \frac{\sin (\pi \P(X >x))}{\pi x}\e^{\E \ln \abs{X-x}} \d x =\E\,X - \e^{\E\ln X} \text{;}$$
it's tempting to think that this last equality holds for arbitrary positive random variables with finite arithmetic and geometric mean, but I have no proof of that.
Write $I$ for the closed interval $[a_0,a_{n-1}]$. Take the cut of $\sqrt[n]{z}$ to be the negative real axis. Write $\mathbb{C}^*$ for the Riemann sphere. Consider the meromorphic differential forms $\alpha_{U_0}$, $\alpha_{U_1}$, $\alpha_{U_2}$, on $U_0 = \mathbb{C}\backslash (-\infty,a_{n-1}]$, $U_1 = \mathbb{C}\backslash [a_0,\infty)$, and $U_2=\mathbb{C}^*\backslash [0,a_{n-1}]$ given by
$$\begin{aligned} \alpha_{U_0} &=\left(\prod_{i=0}^{n-1}\sqrt[n]{z-a_i}\right)\frac{\d z}{z} \\ \alpha_{U_1} &=-\left(\prod_{i=0}^{n-1}\sqrt[n]{a_i-z}\right)\frac{\d z}{z} \\ \alpha_{U_2} &=-\left(\prod_{i=0}^{n-1}\sqrt[n]{1-a_iz^{-1}}\right)\frac{\d (z^{-1})}{(z^{-1})^2}\text{.} \end{aligned}$$
These three forms agree pairwise on the intersections of their respective domains. That's because—for the chosen cut convention—
if $a > 0$ and either $\Im z \neq 0$ or $\Re z > a$, then
$$\sqrt[n]{z-a} = \frac{\sqrt[n]{1-az^{-1}}}{\sqrt[n]{z^{-1}}}\text{;}$$
if $a > 0$ and $\Im z \neq 0$, then
$$\sqrt[n]{a-z} = \e^{-\i\pi \sgn \Im z /n}\sqrt[n]{z-a}\text{.}$$
Consequently, there is a unique meromorphic differential form $\alpha$ on $\mathbb{C}^*\backslash I = \bigcup_{i=0}^2U_i$ such that $\left. \alpha\right\rvert_{U_i} = \alpha_{U_i}$ for $i=0,1,2$. This $\alpha$ has a simple pole at $0$ and a double pole at $\infty$.
So let $C$ be a cycle separating $I$ from $\{0,\infty\}$ and oriented in the negative sense. What is $$\frac{1}{2\pi\i}\oint_C\alpha\text{?}$$
If $C$ is taken to be a rectangle with sides parallel to and infinitesimally close to $I$, then
$$\frac{1}{2\pi\i}\oint_C \alpha = \frac{1}{2\pi\i}\left(\int_{I+\i 0^+}\alpha - \int_{I-\i0^+}\alpha\right)\text{,}$$
the contribution from the remaining sides vanishing.
If $C$ is taken to encircle $\{0,\infty\}$ in a positive sense, then
$$\frac{1}{2\pi\i}\oint_C \alpha = \Res_0 \alpha + \Res_{\infty}\alpha\text{.}$$
For the former choice, note that, for real $x$,
$$\sqrt[n]{x\pm \i 0^+} = \sqrt[n]{\abs{x}}\e^{\pm\i\pi [x < 0]/n}$$
where $[(-)]$ is Iverson bracket notation.
Therefore
$$\int_{I\pm\i0^+}\alpha = \int_I\e^{\pm\i\pi N(x)/n}\left(\prod_{i=0}^{n-1}\sqrt[n]{\abs{x-a_i}}\right)\frac{\d x}{x}$$
where $N(x)$ is the number of the $a_i$ greater than $x$. Then
$$\frac{1}{2\pi\i}\oint_C\alpha = \frac{1}{\pi}\int_I\sin \tfrac{\pi N(x)}{n} \left(\prod_{i=0}^{n-1}\sqrt[n]{\abs{x-a_i}}\right)\frac{\d x}{x}$$ which, because $N(x)$ is constant away from the $a_i$, simplifies to $$\frac{1}{2\pi\i}\oint_C\alpha = \sum_{k=0}^{n-2}\frac{1}{\pi}\sin \tfrac{\pi (k+1)}{n}\int_{a_k}^{a_{k+1}} \left(\prod_{i=0}^{n-1}\sqrt[n]{\abs{x-a_i}}\right)\frac{\d x}{x}\text{.}$$
As for the latter choice: from the Laurent expansions of $\alpha$ at $0$, $\infty$
$$\alpha_z = \left(-\sqrt[n]{\prod_{i=0}^{n-1}a_i} + \mathcal{O}(z)\right)\frac{\d z}{z}$$ $$\alpha_z = \left(-\frac{1}{z^{-1}} + \frac{1}{n}\sum_{i=0}^{n-1}a_i + \mathcal{O}(z^{-1}) \right)\frac{\d (z^{-1})}{z^{-1}}$$
the required residues are found to be $$\Res_0 \alpha = - \sqrt[n]{\prod_{i=0}^{n-1}a_i}$$ $$\Res_{\infty} \alpha = \frac{1}{n}\sum_{i=0}^{n-1}a_i$$
whence
$$\frac{1}{2\pi\i}\oint_C\alpha = \frac{1}{n}\sum_{i=0}^{n-1}a_i - \sqrt[n]{\prod_{i=0}^{n-1}a_i}\text{.}$$
These two choices of $C$ must result in the same value for $\tfrac{1}{2\pi\i}\int_C\alpha$, whence
$$\boxed{ \sum_{k=0}^{n-2}\frac{1}{\pi}\sin \tfrac{\pi (k+1)}{n}\int_{a_k}^{a_{k+1}} \left(\prod_{i=0}^{n-1}\sqrt[n]{\abs{x-a_i}}\right)\frac{\d x}{x} =\frac{1}{n}\sum_{i=0}^{n-1}a_i - \sqrt[n]{\prod_{i=0}^{n-1}a_i} }\text{.}$$