Arithmetic mean, geometric mean and definite integral If $a$ and $b$ are real positive numbers, let's consider their arithmetic mean
\begin{equation*}
AM (a, b) = \frac{a + b}{2}
\end{equation*}
and their geometric mean
\begin{equation*}
GM (a, b) = \sqrt{ab}.
\end{equation*}
Let $0 < a < b$.
Then,
\begin{equation*}
\int_a^b x \, dx = (b - a) \cdot AM(a, b),
\end{equation*}
and
\begin{equation*}
\int_a^b \frac{1}{x^2} \, dx = (b - a) \cdot \frac{1}{(GM(a, b))^2},
\end{equation*}
but
\begin{equation*}
\int_a^b x^2 \, dx \neq (b - a) \cdot (GM(a, b))^2.
\end{equation*}
The first integral is not a surprise, if I think about its geometric meaning. What about the second one? Does it have a precise geometric explanation? Does anything similar hold true if we use other means?
 A: Let $a,\,b$ have arithmetic and geometric means $A,\,G$ so $a+b=2A,\,ab=G^2$ and $a,\,b$ are the roots of $t^2-2At+G^2=0$, i.e. up to permutation they are $A\pm\sqrt{A^2-G^2}$.
If $\int_a^b f(x)dx$ is well-defined, it is an antisymmetric function of $a$ and $b$, i.e. is $b-a$ times a symmetric function thereof. In particular, the arithmetic mean of $f$ on $[a,\,b]$ is $\mu_f(a,\,b):=\frac{1}{b-a}\int_a^bf(x)dx$, and this is a symmetric function of $a,\,b$, or equivalently of $A\pm\sqrt{A^2-G^2}$. It's unclear to me that there will always be some deeper geometric interpretation than this for specific $f$.
However, your last integral is a special case of integrating a polynomial, for which the symmetric function of $a,\,b$ we get by the above procedure is a polynomial, and in particular can be written as a polynomial function of $a+b=2A,\,ab=G^2$. In your example, it's $$\frac13\left((a+b)^2-ab\right)=\frac{4A^2-G^2}{3}.$$Alternatively, whenever you see $(ab)^m(a^n+b^n)$ in the middle of a calculation such as this, you can write it as $2A(a^n,\,b^n)G^{2m}(a,\,b)$, or can replace the $A$-factor with the $n$th power of a power mean. In the example above, this power mean would be the QM (or RMS, whichever name you prefer).
