# Analysis example: int f(x) x^n dx = 0 implies f = 0

By | April 6, 2015

Problem. Let $$f$$ be continuous on $$[0,~1]$$ and let $\int_{0}^{1} f(x) x^n ~ dx =0$ for every nonnegative integer $$n .$$ Prove that $$f=0$$ on $$[0,~1] .$$

We first observe two lemmas. These lemmas are for beginners, so you may skip them.

Lemma 1. Under the same condition, $\int_{0}^{1} f(x) p(x) ~ dx =0$ holds for any polynomial $$p(x) .$$

Proof. If $$p(x)$$ is expressed as$p(x) = a_0 + a_1 x^1 + a_2 x^2 + \cdots + a_n x^n$ where $$a_i \mathrm{ ' s}$$ are coefficients, we have $\begin{eqnarray} \int_{0}^{1} f(x)p(x) ~ dx &=& \int_{0}^{1} f(x) \sum_{i=0}^{n} ~ a_i x^i ~ dx \\ &=& \sum _{i=0}^{n} \left( a_i \int_{0}^{1} f(x) x^i ~ dx \right) \\ &=& \sum_{i=0}^{n} \left( a_i \cdot 0 \right) =0 . \end{eqnarray}$

Lemma 2. If $$f$$ is continuous on a nondegenerate interval $$[a,~b]$$ satisfying $\int_{a}^{b} ~ f^2 (x) ~ dx =0$ then $$f$$ is zero on $$[a,~b]$$ identically.

Proof. Trivial, by continuity.

Solution to the Main Problem. We will show that the integral of $$f^2$$ over $$[0,~1]$$ is zero. This will show that $$f$$ is zero by Lemma 2.

Using the Stone-Weierstrass theorem (also called Weierstrass’ approximation theorem), we can approximate uniformly by a sequence of polynomials $$\left\{ p_n \right\}$$ so that $\left\Vert p_n -f \right\Vert < \frac{1}{n}$ where $$\Vert f \Vert$$ represents the supremum norm of $$f$$ over $$[0,~1].$$ The given condition obviously implies that the integral of $$f(x)p(x)$$ is zero for any polynomial $$p$$ by Lemma 1. Now we have $\begin{eqnarray} \left| \int_{0}^{1} f(x)f(x) ~ dx \right| &=& \left| \int_{0}^{1} f(x) p(x) ~ dx - \int_{0}^{1} f(x) p_n (x) ~ dx \right| \\ & \le & \int_{0}^{1} \left| f(x) \right| ~ \left| f(x) - p_n (x) \right| ~ dx \\ & \le & \frac{1}{n} \int_{0}^{1} |f(x)| ~ dx . \end{eqnarray}$ The last integral is constant, so taking $$n$$ arbitrarily large completes the proof.