TITLE: Comparison between $\int_0^{2\pi}f(x,x)dx$ and $\frac{1}{2\pi}\int_0^{2\pi}\int_0^{2\pi}f(x,y)dxdy$
QUESTION [5 upvotes]: I would like to find a method of comparison between 
$I=\int_0^{2\pi}\sqrt{3+4\cos(x)+2\cos(2x)}dx$ and $J=\frac{1}{2\pi}\int_0^{2\pi}\int_0^{2\pi}\sqrt{3+2\cos(x)+2\cos(y)+2\cos(x+y)}dxdy$, besides just computing the integrals. Using  mathematical software one can find $I=9.0226$ and $J=9.8935$, so $I<J$. But the method should allow extensions to larger classes of functions $f$ such that
$$\int_0^{2\pi}f(x,x)dx<\frac{1}{2\pi}\int_0^{2\pi}\int_0^{2\pi}f(x,y)dxdy.$$
Please let me know if you have an idea.

REPLY [3 votes]: This is one of those things where Fourier series are the first obvious thing to try to at least get a handle on what's going on: if we write
$$ f(x,y) = \sum_{n,m=-\infty}^\infty c_{m,n} e^{i(mx+ny)}, $$
where
$$ c_{m,n} = \frac{1}{(2\pi)^2}\int_0^{2\pi} \int_0^{2\pi} f(x,y) e^{-i(mx+ny)} \, dx \, dy $$
then
$$ f(x,x) = \sum_{n,m=-\infty}^{\infty} c_{m,n} e^{i(m+n)x}. $$
We can then integrate and apply the usual orthogonality relation $\int_0^{2\pi} e^{ikx} \, dx = 2\pi \delta_{k,0}$ to obtain
$$ \int_0^{2\pi} f(x,x) \, dx = 2\pi \sum_{n=-\infty}^{\infty} c_{n,-n} $$
On the other hand, the double integral is, basically by definition,
$$ \int_0^{2\pi} \int_0^{2\pi} f(x,y) \, dx \, dy = (2\pi)^2 c_{0,0}. $$
Therefore basically what you need is the inequality
$$ \sum_{n \neq 0 } c_{n,-n} > 0. $$
(There may be a better way to say this.)
Edit:
Now, we have an integral for the coefficients:
$$ c_{n,-n} = \int_0^{2\pi} \int_0^{2\pi} e^{i n(y-x)} f(x,y) \, dx \, dy. $$
In your case, $f(x,y)=f(y,x)$, so $c_{n,-n}=c_{-n,n}$. Hence the sum is
$$ 2\sum_{n=1}^{\infty} \int_0^{2\pi} \int_0^{2\pi} \cos{n(y-x)} f(x,y) \, dx \, dy. $$
I admit that this doesn't look very helpful in your case.

Alternative: remembering our delta functions, we can rewrite the difference as
$$ \int_0^{2\pi} \int_0^{2\pi} f(x,y) (1-2\pi\delta(x-y)) \, dx \, dy. $$
Proving your inequality is the same as proving this is positive. I see this as being useful mainly in that we can produce approximations to the delta to obtain more intuition about what properties $f$ needs to have: in this case, that we can construct a sequence $\delta_n \to \delta$ in the usual sense of linear operators. In particular, the "unit box" versions
$$ \delta_n(x) = \begin{cases} \frac{n}{2} & |x|<\frac{1}{n} \\ 0 & \text{else} \end{cases}$$
show that $f$ needs to be small near the diagonal in some sense (I'd certainly recommend restricting to $f \geqslant 0$: the alternatives are going to get even more unpleasant).
I suspect that will give you at least a sufficient condition for your inequality, but again, the nature of the example you have makes it difficult to apply this (although you can now try a Taylor expansion near the diagonal, for example). There's also trying to bound the thing above, which I haven't considered yet.