I've been trying to find an example of a function $f \in \mathcal{C}[-1,2]$ with $f \neq 0$ such that $\int_{-1}^2 x^{2n} f(x) \; dx = 0$ for all $n \geqslant 0$, but I'm finding it very difficult. I thought about just proving existence (without finding an explicit function), but not sure how to do it. I'm fairly certain it has something to do with the Stone-Weierstrass Theorem or the Weierstrass Approximation Theorem though. Any ideas to point me in the right direction would be greatly appreciated.
Prove that there a non-zero continuous function $f$ on $[-1,2]$ for which $\int_{-1}^2 x^{2n} f(x) \; dx = 0$ for all $n \geqslant 0$.
definite integralsintegrationreal-analysisweierstrass-approximation
Best Answer
Since $x^{2n}$ is even function $\forall n \in \mathbb{Z}$, this implies that for any odd function $f$, $\int_{-a}^{a}x^{2n}f(x)dx=0$.
Under the condition that $f(x)$ continuously tapers off to $0$ when $x$ approaches $\pm a$, and $f(x)=0$ when $|x|\geq a$, then $\int_{-a}^{b}x^{2n}f(x)dx=0$.
One such example is $f(x)=\arcsin(\sin(k\pi x))\lfloor e^{-x^2}+1-\frac{1}{e}\rfloor$ for any $k \in \mathbb{Z}$
An important note is that $f$ doens't have to have kinks either,
Take for instance $f(x)=(1-\cos(2k\pi x))\lfloor e^{-x^2}+1-\frac{1}{e}\rfloor sgn(x)$, where $sgn$ is the sign function.
In general, any odd function $O$, and any even function $A$ such that $A(x)=0$ when $|x|$ larger than some $a$ implies that:
$$\int_{x_0}^{x_1}AOdx=0$$
For any bounds such that $\min(|x_0|,|x_1|) \geq a$ or $|x_0|=|x_1|$