# A question about the integral form of the Cauchy-Schwarz inequality.

I'm confused about the following form of the Cauchy-Schwarz inequality:

$$\int{f(x)g(x)} dx\leq \sqrt{\int{f(x)^2dx}}\sqrt{\int{g(x)^2dx}} \tag{A}$$

An analogous form for the inequality is $(ac+bd)\leq (a^2+b^2)(c^2+d^2)$. Assuming that the integral inequality above is the same in spirit as this, we should have something like

\begin{align}f(x_1)g(x_1)&+f(x_2)g(x_2)+\dots f(x_n)g(x_n)\\&\leq \sqrt{f(x_1)^2+f(x_2)^2+\dots+f(x_n)^2}+\sqrt{g(x_1)^2+g(x_2)^2+\dots+g(x_n)^2}\end{align}

Extending the argument to an infinite number of $x_i$'s, we still do not get A. This is because it is not like if we had an infinite number of $x_i$'s on the interval $[a,b]$, we'd have $$f(x_1)+f(x_2)+\dots=\int_a^b{f(x)dx}$$

By my understanding, $\int{f(x)dx}$ is not the summation of $f(x_i)$.

It is the summation of $\lim\limits_{\Delta x\to\infty}f(x_i)\Delta x$.

Where am I going wrong?

• $\Delta x \to 0$ – Ivo Terek Feb 9 '15 at 13:45

I think this will help

$$\int f(x)g(x)dx=\sum f(x_i)g(x_i)\Delta x=\sum f(x_i)(\Delta x)^{\frac12}g(x_i)(\Delta x)^{\frac12}$$ $$\leq (\sum f^2(x_i)\Delta x)^{\frac12} (\sum g^2(x_i)\Delta)^{\frac12}$$ $$=(\int f^2(x_i)dx)^{\frac12}(\int g^2(x_i)dx)^{\frac12}$$

• I don't know if the reasoning is indeed correct, but that's clever. – algebraically_speaking Feb 9 '15 at 13:33
• I think that it is correct as we can represent all integrals as limit of a sum. – Akshay Bodhare Feb 9 '15 at 13:37

Hint: See $\int f(x)g(x) dx$ as an $L^2$ Inner Product of functions. Then if you write $$p(\lambda) = \int_{a}^{b} \Big(f(x) + \lambda g(x)\Big)^2 dx \geq 0$$

you get the Schwarz inequality for integrals

$$\Bigg[\int_{a}^{b} f(x) g(x) dx\Bigg]^2 \leq \int_{a}^{b} f(x)^2 dx\int_{a}^{b} g(x)^2 dx$$

Cauchy-Schwarz holds for arbitrary positive-definite inner products $\langle \cdot, \cdot \rangle$. You want that with: $$\langle f,g \rangle = \int_a^b f(x)g(x)\,{\rm d}x,$$so that $\langle f,g \rangle \leq \|f\|\|g\|$ reads: $$\int_a^b f(x)g(x) \,{\rm d}x \leq \left (\int_a^b f(x)^2 \,{\rm d} x\right)^{1/2} \left (\int_a^b g(x)^2 \,{\rm d} x\right)^{1/2}.$$