> [!NOTE] Theorem
> Let $f,g$ be [[Riemann integration|Darboux integrable functions]] on a [[Closed Real Interval|closed real interval]] $[a,b].$ Then $\int_{a}^{b} f(x)g(x) \, dx \leq \left( \int_{a}^{b} f(x) \, dx \right)^{\frac{1}{2}}\left( \int_{a}^{b} g(x) \, dx \right)^{\frac{1}{2}} $
**Proof**: Let $\lambda> 0.$ By [[Monotonicity of Riemann Integral]], $\int_{a}^{b} (f(x) - \lambda g(x))^{2} \, dx \geq \int_{a}^{b} 0 \, dx = 0 $and rearranging gives $2\lambda \int_{a}^{b} f(x)g(x) \, dx \leq \int_{a}^{b} f(x)^{2} \, dx + \lambda^{2} \int_{a}^{b} g(x)^{2} \, dx \tag{1}$Define the constants $A=\int_{a}^{b} f(x)^{2} \, dx$ and $B=\int_{a}^{b} g(x)^{2} \, dx.$ Define the real function $b(\lambda)=\frac{A+\lambda^{2}B}{2\lambda}.$ Then by $(1),$ $\int_{a}^{b} f(x)g(x) \, dx \leq b(\lambda) \tag{2}$
Now $b'(\lambda)=-\frac{1}{2}A\lambda^{-2}+ \frac{1}{2}B$ and $b''(\lambda)=A\lambda^{-3}.$ Thus $\lambda=\sqrt{ A/B }$ gives the minimum value of $b(\lambda)$ since $b'(\sqrt{ A/B })=0$ and $b''(\sqrt{ A/B })>0.$ Setting $\lambda$ in $(2)$ gives $\int_{a}^{b} f(x)g(x) \, dx \leq \left( \int_{a}^{b} f(x) \, dx \right)^{\frac{1}{2}}\left( \int_{a}^{b} g(x) \, dx \right)^{\frac{1}{2}}$