Maths WorkshopMaths problems with full solutions
Exercise 781Calculus › Single-variable calculus › Integration › Riemann integralL1Added 2 Nov 2026

The Cauchy–Schwarz inequality for integrals

#inequalities#Cauchy-Schwarz#quadratic polynomial

Statement

1. Let f,gf,g be continuous on [a,b][a,b]. Prove that
(∫abfg)2≤∫abf2⋅∫abg2.\left(\int_a^bfg\right)^2\le\int_a^bf^2\cdot\int_a^bg^2.
2. Deduce a bound for ∫0π/2sin⁡x dx\displaystyle\int_0^{\pi/2}\sqrt{\sin x}\,dx.

Hint

For every real λ\lambda, ∫ab(f+λg)2≥0\int_a^b(f+\lambda g)^2\ge0. This is a quadratic polynomial in λ\lambda that is never negative.

Show solutionHide solution

Solution

1. Expanding,
0≤∫ab(f+λg)2=λ2∫g2+2λ∫fg+∫f2for all λ∈R.0\le\int_a^b(f+\lambda g)^2=\lambda^2\int g^2+2\lambda\int fg+\int f^2\quad\text{for all }\lambda\in\mathbb{R}.
A quadratic Aλ2+Bλ+CA\lambda^2+B\lambda+C that is never negative has non-positive discriminant, B2−4AC≤0B^2-4AC\le0 (if A=∫g2=0A=\int g^2=0, then g=0g=0 and the inequality is trivial). Here B=2∫fgB=2\int fg, so
4(∫fg)2−4∫g2∫f2≤0.4\left(\int fg\right)^2-4\int g^2\int f^2\le0.

2. Take f=sin⁡xf=\sqrt{\sin x} and g=1g=1 on [0,π2][0,\frac\pi2]:
(∫0π/2sin⁡x dx)2≤∫0π/2sin⁡x dx⋅∫0π/21 dx=1⋅π2.\left(\int_0^{\pi/2}\sqrt{\sin x}\,dx\right)^2\le\int_0^{\pi/2}\sin x\,dx\cdot\int_0^{\pi/2}1\,dx=1\cdot\frac\pi2.
So the integral is at most π/2≈1.2533\sqrt{\pi/2}\approx1.2533.

Remark. The true value is about 1.1981.198, so the bound is quite sharp. It is attained exactly when ff and gg are proportional.