2

I have a quick question about how to prove this claim. I read in another post here:Nonzero $f \in C([0, 1])$ for which $\int_0^1 f(x)x^n dx = 0$ for all $n$

which gives a solution using the Stone Weierstrass theorem. Before reading, I gave my own solution which seems correct to me but is not mentioned in this thread so I would like some confirmation.

Proof:

By Weierstrass, $\forall \epsilon>0$, there exists a polynomial $P(x)$ such that $|P(x)-f(x)|\leq \epsilon$ on $[0,1]$.

Now, $0\leq \int_{0}^{1} f(x)^2 dx\leq \int_{0}^{1} f(x)[P(x)+\epsilon]dx$

$=\int_{0}^{1} f(x)P(x) dx+\epsilon\int_{0}^{1} f(x) dx$

$=0+0$,

Where the last equality sign comes from the assumption that $\int{0}^{1} x^nf(x) dx=0$ and from the linearity of the integral.

Thanks in advance!

Jungleshrimp
  • 1,605

1 Answers1

5

Note that if your argument worked, it doesn't really need Weierstrass, as you don't use that $\epsilon$ is small. Given any polynomial $P$, you have $$|P(x)-f(x)|\leq \|P\|_\infty+\|f\|_\infty.$$ If you call this latter number $c$, then $|f(x)|\leq |P(x)|+c$ and you could repeat your argument.

And this shows the issue: in your argument you are assuming that both $P$ and $f$ are non-negative. If you were to assume that $f\geq0$ then $\int_0^1 f(x)dx=0$ already gives you $f=0$, without using the polynomials.

Martin Argerami
  • 217,281