# Determine whether the following integral inequality holds

Suppose that $\int_0^1 f dx = 0$. Is it true that $$\left( \int_0^1 fg dx \right)^2 \leq \left( \int_0^1 g^2 dx - \left( \int_0^1 g dx \right)^2 \right) \left( \int_0^1 f^2 dx \right)$$ For context, this was stated as a true or false question on an old qualifying exam. I've tried noting that $$\int_0^1 fg dx = \int_0^1 f (g-1) dx$$ Then, employing Cauchy-Schwarz gives $$\left( \int_0^1 f g dx \right)^2 \leq \left( \int_0^1 g^2 dx - 2 \int_0^1 g dx +1 \right) \left( \int_0^1 f^2 dx \right)$$ From here, I thought I had it, since we have that $-2 \int_0^1 g dx + 1 \geq -\left( \int_0^1 g dx \right)^2$, but of course the inequality is going in the wrong direction. I tried to build some counterexamples, but everything I've tried has shown the inequality to be true. Any help is appreciated!

This is true. If $\int_0^1g(x)dx=0$, this is just Cauchy-Schwarz. Now note that neither side changes if you shift $g$ by a constant.

• I just proved that it is true actually - although it wasn't just Cauchy Schwarz. Can you elaborate? – Rellek Dec 22 '17 at 23:42
• No, but it is Cauchy-Schwarz if $\int g=0$. For the general case, let $h=g-\int g$, so the inequality is true with $g$ replaced by $h$. However, changing $g$ to $h$ does not change the value of either side of the inequality (you can easily check this), so the inequality is true with $g$ as well. – Jason Dec 22 '17 at 23:50

This is actually true. Consider the original work done in the answer, and assume without loss of generality that $||g||_2 = ||f||_2 = 1$ (this denotes $L^2$-norm). Then, we get $$||f g||_1^2 \leq 2 - 2 ||g||_2$$ Consider now the transformation $f \mapsto c \cdot f$, $g \mapsto \frac{g}{c}$. Note that this leaves the left hand side invariant, however, the right hand side changes as $$||f g ||_1^2 \leq c^2 - 2 c ||g||_2 + 1$$ For all $c$. Now, optimize in $c$; taking the derivative with respect to $c$ and setting equal to $0$ yields $$c = ||g||_2$$ Plugging back in, we see $$||fg||_1^2 \leq ||g||_2^2 - 2 ||g||_2 \cdot ||g||_2 + 1 = 1 - ||g||_2^2$$ Which is precisely the inequality we wanted to prove.

If probabilistic arguments are employed, we can simplify the arguments without writing integrals.

Suppose $X\sim U[0,1]$. We rewrite the given inequality in terms of expected values: $$E[f(X)g(X)]^2 \le var[g(X)]E[f(X)^2].$$ As @Jason points out, shifting $g$ by a constant doesn't affect the inequality (since $E[f(X)]=0$, so $E[f(X)(g(X)+k)]=E[f(X)g(X)+kf(X)]=E[f(X)g(X)]$), so the given inequality holds if and only if $$E[f(X)(g(X)-k)]^2 \le var[g(X)-k]E[f(X)^2].$$ To apply the Cauchy-Schwartz inequality, we take $k=E[g(X)]$, so that $var[g(X)-k]=E[(g(X)-k)^2]$. Then it's equivalent to $$E[f(X)(g(X)-E[g(X)])]^2 \le E[(g(X)-E[g(X)])^2]E[f(X)^2].$$

This is the Cauchy-Schwartz inequality which holds for any random variables.

• I'm not sure choosing $f = g$ disproves the inequality, since we are assuming that $\int_0^1 f dx = 0$, so we just get the regular equality of Cauchy-Schwarz. I will take a closer look at the rest though, since I agree that I believe it to be false. – Rellek Dec 22 '17 at 22:01
• @Rellek You're right. I'll fix that. – GNUSupporter 8964民主女神 地下教會 Dec 22 '17 at 22:06
• @Rellek Thanks to Jason's answer, I've figured it out. The shifting a function by a constant is made intuitively easy by linking it to the variable of a uniformly distributed random variable, which measures the dispersion of data. – GNUSupporter 8964民主女神 地下教會 Dec 23 '17 at 0:05