5

Let $f:[-1,1] \rightarrow \mathbb{R}$ be any even continuous function on $[-1,1]$ (i.e. $f(-x)=f(x)$ $\forall x \in [-1,1]$). Let $\epsilon>0$. Prove that there exists an even polynomial $p$ such that $$|f(x)-p(x)|< \epsilon$$ $$\forall x \in [-1,1]$$

Here, "even polynomial" means that $p(-x)=p(x)$, not simply that it has even degree.

I think I should use the Stone-Weierstrass theorem to show that the subalgebra of even polynomials, call it $\mathcal{A}$, over this interval is dense, from which the result follows immediately.

For this to work I require that $\mathcal{A}$ contains the constants (obviously true) and separates points...which is not true, unfortunately. Anyone have any hints? I would prefer hints only, rather than solutions.

Oh yes, and I should mention that the version of the Stone-Weierstrass theorem that I can use says that if a subalgebra of $C(\mathbb{R})$ contains the constants and separates points, then it is dense in $C(\mathbb{R})$.

Ducky
  • 2,006
  • By S-W there is certainly a polynomial $p$ that does what you want, so it would seem you then use the "evenness" of $f$ to show that $p$ must also be even (i.e. no odd polynomial could be within epsilon of $f$). –  Jan 28 '15 at 01:35
  • Right, this seems like the most straightforward option, though it still eludes me – Ducky Jan 28 '15 at 02:14
  • @trb456: It isn't true that $p$ must be even, but its even part will still approximate $f$. – Jonas Meyer Jan 28 '15 at 02:43
  • I'd say @orangeskid's answer fills in the details... –  Jan 28 '15 at 02:43
  • @Jonas Meyer: I did not say $p$ must be even, it's just a polynomial. But the "even-ness" of $f$ should force $p$ to be even, as the current answer shows. But if this is not so, then you should post an answer, as I would like to see it! –  Jan 28 '15 at 02:46
  • @trb456: It is incorrect that $p$ is forced to be even. And you did write "show that $p$ must also be even" so I cannot understand your first sentence. The fact is, an approximating polynomial obtained from Weierstrass's theorem for an even function need not be even. But, one can take the even part of the polynomial, which is even, and still approximates. That is what orangekid's answer does, except without using those words. It would be redundant for me to post an answer. – Jonas Meyer Jan 28 '15 at 02:50
  • @Jonas Meyer: per that answer: "Moreover, $\frac{1}{2}\cdot (p(x) + p(-x) )$ is an even polynomial already". So how does this show that $p$ need not be even when this $p$ is even? I am sure you are correct, but I don't see why yet. I am truly asking for edification. –  Jan 28 '15 at 02:55
  • 1
    @trb456: Starting with a polynomial function $p$ on $[-1,1]$, one can define another polynomial $q$ on $[-1,1]$ by the formula $q(x) = \frac12(p(x)+p(-x))$. This $q$ is called the even part of $p$, and you can see that what it does is remove all the odd degree terms from $p$. It is easy to check that $q$ is even, whether or not $p$ is even. Typically, $q$ and $p$ are different polynomials. In case $f$ is even, it turns out that if $p$ approximates $f$ on $[-1,1]$, then so does $q$ (in a sense made precise in orangekid's answer). But this does not mean that $p$ is even. – Jonas Meyer Jan 28 '15 at 02:59
  • 1
    @JonasMeyer: Yes, duh! The answer shows that if there is some polynomial approximation, then there is some even approximation because $f$ is even, but it does not have to be the same approximation. Thanks! –  Jan 28 '15 at 03:05
  • Very closely related: http://math.stackexchange.com/q/284996/ – Jonas Meyer Jan 28 '15 at 03:09
  • Thanks for all the comments. Glad my question could generate some discussion, as well – Ducky Jan 28 '15 at 04:17

3 Answers3

9

Hint: If $\sup_{x \in [-1,1]} |\,p(x) - f(x)|<\epsilon$ then $\sup_{x \in [-1,1]} |\,\frac{1}{2}(\,p(x)+ p(-x)\,)- f(x)\,|<\epsilon$

$\bf{Added:}$ Let $p(x)$ a polynomial so that for every $x \in [-1,1]$ we have $|\,p(x) - f(x)|<\epsilon$. Note that if $x \in [-1,1]$ then also $-x \in [-1,1]$. So we have $$|\,p(x) - f(x)|<\epsilon\\ |\,p(-x) - f(-x)|<\epsilon$$

Add up the inequality and divide by $2$:

$$\frac{1}{2} ( |\,p(x) - f(x)| + |\,p(-x) - f(-x)|) < \epsilon$$

Note that we have $|a+b| \le |a|+|b|$ for all numbers. Therefore we get

$$\frac{1}{2} \cdot |(p(x) + p(-x) ) - (f(x) + f(-x) ) | < \epsilon$$ or $$ |\frac{1}{2}\cdot (p(x) + p(-x) ) - \frac{1}{2}\cdot(f(x) + f(-x) ) | < \epsilon$$ $\tiny{\text{ the averages also satisfy the inequality }}$.

Now since $f$ is even we have $\frac{1}{2}\cdot(f(x) + f(-x) ) = f(x)$. Moreover, $\frac{1}{2}\cdot (p(x) + p(-x) )$ is an even polynomial already. We are done.

orangeskid
  • 53,909
  • I can see that this is true if $p$ is even, but I'm not seeing how this helps the proof (excuse my ignorance). – Ducky Jan 28 '15 at 02:15
8

Just for reference, here is another trick: Since $x\mapsto f(\sqrt{x})$ is continuous on $[0, 1]$, for $\epsilon > 0$ there exists a polynomial $q(x)$ such that

$$ \sup_{x\in[0,1]} |f(\sqrt{x}) - q(x)| < \epsilon. \tag{*}$$

Now let $p(x) = q(x^2)$ and notice that $p$ is even and

$$ \sup_{x\in[-1,1]}|f(x) - p(x)| = \sup_{x\in[0,1]} |f(\sqrt{x}) - q(x)| \stackrel{\text{by (*)}}{<} \epsilon $$

Sangchul Lee
  • 167,468
2

A little late, but I'd like to add a short proof for possible future readers. The subspace $E$ of even polynomials on $[0,1]$ is dense in $C([0,1])$ by Stone-Weierstrass. Approximate $f|_{[0,1]}$ by $p\in E$ to within $\epsilon$; then $x\mapsto p(|x|)$ on $[-1,1]$ is an even polynomial, and $|f(x)-p(|x|)|<\epsilon$ on $[-1,1]$.

user254433
  • 2,733