Putnam 2013, Problem B-4

For any continuous real-valued function $f$ defined on the interval $[0,1]$, let
$$
\mu(f) = \int_0^1 f(x)\,dx,\ \text{Var}(f) = \int_0^1 (f(x) - \mu(f))^2\,dx,\ \ M(f) = \max_{0 \leq x \leq 1} |f(x)|.
$$
Show that if $f$ and $g$ are continuous real-valued functions defined on the interval $[0,1]$, then
$$
\text{Var}(fg) \leq 2\text{Var}(f)M(g)^2 + 2\text{Var}(g)M(f)^2.
$$

Solution:
Write $f_0(x) = f(x) - \mu(f)$ and $g_0(x) = g(x) - \mu(g)$, so that $\int_0^1 f_0(x)^2 dx = \text{Var}(f)$, $\int_0^1 g_0(x)^2 dx = \text{Var}(g)$, and $\int_0^1 f_0(x) dx = \int_0^1 g_0(x) dx = 0$. Now since $|g(x)| \leq M(g)$ for all $x$, $0 \leq \int_0^1 f_0(x)^2 (M(g)^2 - g(x)^2) dx = \text{Var}(f)M(g)^2 - \int_0^1 f_0(x)^2 g(x)^2 dx$, and similarly $0 \leq \text{Var}(g)M(f)^2 - \int_0^1 f(x)^2 g_0(x)^2 dx$. Summing gives

$$\text{Var}(f)M(g)^2 + \text{Var}(g)M(f)^2 \geq \int_0^1 (f_0(x)^2 g(x)^2 + f(x)^2 g_0(x)^2) dx. \tag{1}$$

Now

$$\int_0^1 (f_0(x)^2 g(x)^2 + f(x)^2 g_0(x)^2) dx - \text{Var}(fg)$$
$$= \int_0^1 (f_0(x)^2 g(x)^2 + f(x)^2 g_0(x)^2 - (f(x)g(x) - \int_0^1 f(y)g(y) dy)^2) dx;$$

substituting $f_0(x) + \mu(f)$ for $f(x)$ everywhere and $g_0(x) + \mu(g)$ for $g(x)$ everywhere, and using the fact that $\int_0^1 f_0(x) dx = \int_0^1 g_0(x) dx = 0$, we can expand and simplify the right hand side of this equation to obtain

$$\int_0^1 (f_0(x)^2 g(x)^2 + f(x)^2 g_0(x)^2) dx - \text{Var}(fg)$$
$$= \int_0^1 f_0(x)^2 g_0(x)^2 dx$$
$$- 2\mu(f)\mu(g) \int_0^1 f_0(x)g_0(x) dx + (\int_0^1 f_0(x)g_0(x) dx)^2$$
$$\geq -2\mu(f)\mu(g) \int_0^1 f_0(x)g_0(x) dx.$$

Because of (1), it thus suffices to show that

$$2\mu(f)\mu(g) \int_0^1 f_0(x)g_0(x) dx \leq \text{Var}(f)M(g)^2 + \text{Var}(g)M(f)^2. \tag{2}$$

Now since $(\mu(g)f_0(x) - \mu(f)g_0(x))^2 \geq 0$ for all $x$, we have

$$2\mu(f)\mu(g) \int_0^1 f_0(x)g_0(x) dx \leq \int_0^1 (\mu(g)^2 f_0(x)^2 + \mu(f)^2 g_0(x)^2) dx$$
$$= \text{Var}(f)\mu(g)^2 + \text{Var}(g)\mu(f)^2$$
$$\leq \text{Var}(f)M(g)^2 + \text{Var}(g)M(f)^2,$$

establishing (2) and completing the proof.