Assume that $ f ∈ L([a, b])$ and $\int x^nf(x)dx=0$ for $n=0,1,2...$. Assume that $ f ∈ L([a, b])$ and $\int x^nf(x)dx=0$ for $n=0,1,2...$.  Prove $f=0$ a.e.  Since there exist polynomials going to f almost everywhere all I would need to do is bring the limit in to prove that $ ||f||_2 = 0$ and then I'm done.  But no success with this.  Thanks for any help.
 A: Byron's answer is perfectly OK. Here is another one.
Since the polynomials are uniformly dense in $\mathcal C([a,b])$ (the space of continuous functions on $[a,b]$), it follows from the assumption that $\int_{[a,b]} g(x)f(x)\, dx=0$ for all $g\in\mathcal C([a,b])$. (This means that the signed measure $f(x)dx$ is the $0$ measure). From this, "it is well known" that one can deduce that $f=0$ a.e. The details are as follows.
Assume that $f$ is not equal to $0$ a.e. Then, for example, the set $\{ f>0\}$ has positive measure. So one can find $\varepsilon >0$ such that the set $\{ f>\varepsilon\}$ has positive measure. By the regularity of the Lebesgue measure, one can find a compact set $K$ and an open set $V$ such that $K\subset \{ f>\varepsilon\}\subset V$ and the measure of $V\setminus K$ is as small as we wish. Now, choose a continuous function $g$ such that $0\leq g\leq 1$
 which is equal to $1$ on $K$ and to $0$ outside $V$. Then $$\left\vert\int_{[a,b]} gf\right\vert=\left\vert\int_V gf\right\vert\geq \left\vert\int_Kgf\right\vert-\int_{V\setminus K}\vert gf\vert\geq \varepsilon\, m(K)-\int_{V\setminus K} \vert f\vert\, , $$
where $m(K)$ is the measure of $K$. 
Since the measure of $V\setminus K$ is as small as we wish, we may assume that $\int_{V\setminus K} \vert f\vert<\varepsilon\, m(K)$, and it follows that $\int_{[a,b]} gf\neq 0$; which is a contradiction.
A: A modification of my answer here.
You could use the functional form of the Monotone Class Theorem.
Let $\cal H$ be the collection of all bounded, Borel measurable 
functions $g$ so that $\int g(x) f(x)\, dx=0$. 
Then $\cal H$ is a monotone vector space (exercise for the reader!).
Let $\cal K$ be the set of functions $\{x^k: k\in\mathbb{N}\}$.
Then $\cal K$ is a multiplicative class contained in $\cal H$, so the
Monotone Class Theorem says that 
$$b(\sigma({\cal K}))\subseteq {\cal H},$$ 
where $b(\sigma({\cal K}))$ is the space of all bounded functions 
measurable with respect to the $\sigma$-algebra generated by 
$\cal K$. Since $\cal K$ generates the Borel $\sigma$-algebra 
we deduce that $\mbox{sgn}(f)\in{\cal H}$ and hence that $\int\mbox{sgn}(f(x)) f(x)\,dx= \int |f(x)|\, dx=0$. 
A: Fix $\xi \in \mathbb{R}$. By the definition of the exponential function, we have
$$\sum_{n=0}^k \frac{(\imath x \xi)^n}{n!} f(x) \to e^{\imath \,x \xi} f(x)$$
as $k \to \infty$ for any $x \in [a,b]$. Moreover,
$$\left|\sum_{n=0}^k \frac{(\imath x \xi)^n}{n!} f(x) \right| \leq |f(x)| e^{|\xi| \max\{|a|,|b|\}} \in L^1([a,b])$$
for all $k \geq 0$. Therefore, we conclude from the dominated convergence theorem that
$$\int_a^b e^{\imath \, x \xi} f(x) \, dx = \lim_{k \to \infty} \sum_{n=0}^k \frac{(\imath \xi)^n}{n!} \int_a^b x^n \cdot f(x) \, dx =0.$$
Since $\xi \in \mathbb{R}$ is arbitrary, this shows that the Fourier transform of $f \cdot 1_{[a,b]}$ equals $0$. Now the uniqueness of the Fourier transform yields $f=0$ (Lebesgue-)almost everywhere on $[a,b]$.
Remark: This question shows that it suffices to assume $\int_a^b x^n f(x) \, dx =0$ for all $n \geq 1$.
A: Define
$$
F(x)=\int_a^xf(t)\,\mathrm{d}t\tag{1}
$$
Since $f\in L^1([a,b])$, $F$ is continuous.
By definition, $F(a)=0$. Furthermore, by hypothesis, $\displaystyle F(b)=\int_a^bf(t)\,\mathrm{d}t=0$.
For any polynomial, $p$, let $\displaystyle P(x)=\int_a^xp(t)\,\mathrm{d}t$, which is also a polynomial. Then integration by parts yields
$$
\begin{align}
\int_a^bF(x)p(x)\,\mathrm{d}x
&=F(b)P(b)-F(a)P(a)-\int_a^bf(x)P(x)\,\mathrm{d}x\\
&=0\tag{2}
\end{align}
$$
The Stone-Weierstrass Theorem says that polynomials are dense in $C([a,b])$. Thus, for any $\epsilon\gt0$, there is a polynomial, $p$, so that
$$
\max_{x\in[a,b]}|F(x)-p(x)|\le\epsilon\tag{3}
$$
Thus,
$$
\int_a^b(F(x)-p(x))^2\,\mathrm{d}x\le(b-a)\epsilon^2\tag{4}
$$
Furthermore, using $(2)$, we get
$$
\begin{align}
\int_a^b(F(x)-p(x))^2\,\mathrm{d}x
&=\int_a^bF(x)^2\,\mathrm{d}x+\int_a^bp(x)^2\,\mathrm{d}x-2\int_a^bF(x)p(x)\,\mathrm{d}x\\
&=\int_a^bF(x)^2\,\mathrm{d}x+\int_a^bp(x)^2\,\mathrm{d}x\tag{5}
\end{align}
$$
$(4)$ and $(5)$ imply that
$$
\int_a^bF(x)^2\,\mathrm{d}x\le(b-a)\epsilon^2\tag{6}
$$
Since $\epsilon\gt0$ was arbitrary, we must have
$$
\int_a^bF(x)^2\,\mathrm{d}x=0\tag{7}
$$
Since $F$ is continuous, $(7)$ implies that $F(x)=0$ for $x\in[a,b]$. Thus $(1)$ implies that
$$
f(x)=0\quad\text{a.e.}\tag{8}
$$
A: By hypothesis is easy to conclude that $\int pf \ dx = 0$ for all polynomials $p$ (*). Consider $\varphi $ a smooth function  with compact support.
By the Weierstrass approximation theorem exists a sequence $p_n$ of polynomial that converges uniformly to $\varphi$. Then given $\epsilon >0$ exists $n_o \in N$ where $|p_n (x) - \varphi (x)| < \epsilon$ for all $x \in [a,b]$ and for all $n \geq n_o$ .
We have for $n \geq n_o$ fixed:
$$ |\int \varphi f| = |\int \varphi f - p_nf + p_nf| \leq |\int (\varphi - p_n)f| + |\int p_nf| = |\int (\varphi - p_n)f | (by \  (*) )$$
$$ \leq \int |(\varphi - p_n)f|  \leq \epsilon \int |f|$$
Then we conclude that $\int \varphi f =0 $ . By the du Bois-Reymond theorem (see theorem 17 of http://people.oregonstate.edu/~peterseb/mth627/docs/627w2004-convolution.pdf) we can conclude that $f=0$.
A: First, consider $g$ to be continuous and of compact support.  Then, by Weierstrass approximation theorem, there exists a sequence of polynomials $p_n\rightarrow g$ uniformly.  Since continuous function with compact support are dense in $L^1$, choose $g$ such that $\int^{b}_{a}|g-f|dx<\varepsilon$, for all $\varepsilon>0$ there exists a sequences of polynomials $p_n$ such that $\int^{b}_{a}|p_nf-gf|dx<\varepsilon M$ for all $n\geq n_0$.  Then, we have $$|\int^{b}_{a}(p_nf-f^2)dx|\leq\int^{b}_{a}|p_nf-gf|dx+\int^{b}_{a}|gf-f^2|dx<(M\varepsilon+M\varepsilon)$$  Here, $M=\int^{b}_{a}|f|dx$.  Since $\varepsilon $ was arbitrary, implies $\int^{b}_{a}f^2dx=0$.  So $f=0$ a.e.
A: Clearly the condition that $\int_a^b x^n f(x)\,dx = 0$ extends to all polynomials so $\int_a^b p(x)f(x)\,dx = 0$ for all polynomials. Since $f\in L^1([a,b])$, $f$ is the almost everywhere uniform limit of polynomials (this is an application of Lusin+Egorov). Let $p_n\stackrel{\text{u}\,}{\rightarrow}f$ almost everywhere. Then we have that for any polynomial $p$, $pp_n\stackrel{\text{u}\,}{\rightarrow}pf$ almost everywhere. Can you see how to proceed?
