Find all the continuous functions such that $\int_{-1}^{1}f(x)x^ndx=0$. Find all the continuous functions on $[-1,1]$ such that $\int_{-1}^{1}f(x)x^ndx=0$ fof all the even integers $n$.
Clearly, if $f$ is an odd function, then it satisfies this condition. What else?
 A: You observed that every odd continuous function $f$ satisfies all of these equations. Try to prove the converse also: If $f$ is a solution, then it is odd.
Hint: Every function $f$ can be split into its even and odd parts. It therefore suffices to prove the following: If $f$ is even and solves your equations, then it is identically equal to zero. Think about approximation by polynomials. Show that an even function $f\in C([-1,1])$ can be uniformly approximated by even polynomials. There are multiple ways of doing this.
A: Since any $f(x)$ can be divided into a sum of odd and even functions, say $f(x) = g(h) + h(x)$, where $g(x)$ is odd and $h(x)$ is even, we may concentrate on asking whether or not even functions such that:
$$\int_{-1}^{1}{h(x)x^ndx}=0$$
exist. Moreover if such a function does exist, it is also true that by construction for every even polynomial $P(x)$:
$$\int_{-1}^{1}{h(x)P(x)dx}=0$$
We construct $P_m$, the $m$-polynomial expansion of:
$$\frac{\sin(m (x-\alpha))}{m(x-\alpha)} + \frac{\sin(m (x+\alpha))}{m(x+\alpha)}$$
At the limit $m\rightarrow\infty$: 
$$\lim_{m\rightarrow\infty}\int_{-1}^{1}{h(x)P_m(x)dx}=2h(\alpha)$$
Since we can construct such a series for each $\alpha$, the function $h(x)$ must be arbitrarily small at each point, hence showing that no such even non-zero functions exist and that only odd functions fulfill the requirement.
A: Rewrite the integral as
$$\int_0^1 [f(x)+f(-x)]x^n dx = 0,$$
which holds for all even $n$, and do a change of variables $y=x^2$ so that for all $m$, even or odd, we have
$$ \int_0^1 \left[\frac{f(\sqrt{y})+f(-\sqrt{y})}{2 \sqrt{y}}\right] y^{m} dy = 0. $$
By the Stone Weierstrass Theorem, polynomials are uniformly dense in $C([0,1])$, and therefore, if the above is satisfied, we must have
$$\frac{f(\sqrt{y})+f(-\sqrt{y})}{2 \sqrt{y}}=0$$
provided it is in $C([0,1])$. [EDIT: I just realized the singularity can be a problem for continuity--so perhaps jump to the density of polynomials in $L^1([0,1])$.] Substituting $x=\sqrt{y}$ and doing algebra, it follows $f$ is an odd function.
