# Help proving the Weierstrass Approximation Theorem using Fejer's Theorem

I found a series of steps designed to give a constructive proof of WAT using Fejer's Theorem.

For clarity, I'm using the following statement of WAT:

Let $[a,b]\subset \mathbb{R}$ suppose that $f:[a,b]\rightarrow \mathbb{R}$ is continuous. Prove that for any $\epsilon >0$, there is a polynomial $P: \mathbb{R} \rightarrow \mathbb{R}$ such that $|f(x)-P(x)|<\epsilon$ for any $x\in [a,b]$.

First, I want to produce a continuous function $\tilde f: [a-1, b+1]\rightarrow \mathbb{R}$ so that $\tilde f(x) = f(x)$ for any $x\in [a,b]$ and $\tilde f(a-1)=\tilde f(b+1)$.

Second, I want to produce a continuous real function $g$ so that $g(x)=\tilde f(x)$ on $[a-1, b+1]$ and $g$ is $(2+b-a)$-periodic.

Third, I'll define $F(y)= g((2+b-a)\frac{y}{2\pi})$.

Fourth, I want to produce a trigonometric polynomial $T$ with $|T(y)-F(y)|<\frac{\epsilon}{2}$. (I know that this is immediate from Fejer's Theorem.)

Fifth, I want to produce an actual polynomial $P$ so that $|P(y)-F(y)|<\epsilon$ for any $y\in [\frac{2\pi(a-1)}{2+b-a}, \frac{2\pi(b+1)}{2+b-a}]$.

Last, I want to show that $|P(\frac{2\pi}{2+b-a})-f(x)|<\epsilon$ for any $x\in [a,b]$.

I am pretty stuck on producing constructions for the first two steps and proving their desired properties.

As I indicated, the fourth step is clear, and it will give a trigonometric polynomial $T$ of the form $a_0+\sum_{k=1}^{N}(a_k \cos(kt)+b_k\sin(kt))$. Then my idea for the fifth step is to produce $P$ by using the Taylor series expansions of sine and cosine to obtain a sequence of polynomials $(p_n)$ converging (uniformly ?) to $T$. Combining this with the fourth step should yield the fifth step, I think. But I'm not sure how to verify that this is true specifically on $[\frac{2\pi(a-1)}{2+b-a}, \frac{2\pi(b+1)}{2+b-a}]$.

Also, I'm unsure of how the last step is supposed to follow.

Am I on the right track? If so, I'd appreciate seeing how all the details are worked out. I'd also really appreciate it if responses could follow the steps directly, so that I can understand the process better.

## 1 Answer

SKETCHY. You are on the right track. Assume that $a=1-\pi, b=\pi-1$: no generality is lost since you can always reduce to this case via a harmless affine change of variable.

NOTE 1. The affine change of variables is the following: if $f$ is defined on $[a, b]$, then one should replace it with $$F(x)=f\left[ (\pi-1)\frac{x-a}{b-a} +(1-\pi)\frac{x-b}{a-b}\right].\Box$$

You have proven that, on the enlarged interval $[-\pi, \pi]$, the extension $\tilde f$ of $f$ (NOTE: I prefer not to use $f'$, easily mistaken for a derivative) is approximated by a trig polynomial $$\tag{1} |\tilde{f}(x)-T_m(x)|\le \frac\epsilon2,\quad T_m(x)=\sum_{k=-m}^m a_k^{(m)}e^{ikx}.$$ In your question, $T_m$ is called $T$ and it has the form $$\tag{2} T(x)=a_0+\sum_{k=1}^m \left( a_k \cos(kt)+b_k\sin(kt)\right).$$

NOTE 2 This is a point in your question where you implicitly assume that $a=1-\pi, b=\pi-1$. On other intervals, trigonometric polynomials have different normalizations. On $[0, 1]$, for example, the trig polynomial $T$ given by (2) is not periodic.

This technical note set aside, we use Euler's formula and rewrite $$T(x)=a_0+\sum_{k=1}^m\left( \frac{a_k-ib_k}{2} e^{ikt} +\frac{a_k+ib_k}{2}e^{-ikt}\right)$$ which is the exponential form of $T$.

We can therefore work with the trig polynomial $T_m$ given by (1), which has the advantage that it can be Taylor expanded easily, using the fact that $$\tag{3} e^{ikx}=\sum_{h=0}^\infty \frac{i^h k^h}{h!}x^h.$$ Inserting (3) into (1), we see that it makes sense to approximate $T_m$ with its truncated Taylor expansion $$T^{n}_m(x)=\sum_{h=0}^n\sum_{k=-m}^m a_k^{(m)}\frac{i^h k^h}{h!}x^h.$$ We need to estimate $$|T_m(x)-T^n_m(x)|.$$ Show that, if you take $n$ sufficiently big, this is smaller than $\epsilon$. Use the fact that $|x|\le C$ (actually, $C=\pi$, but that's not important). (You will probably see the term $A_m=\sum_{k=-m}^m |a_k^{(m)}|$ appearing. )

• Thank you Giuseppe. I should have been more clear, but I'm working at a very elementary level with Fourier series. The definition is in terms of cosine and sine. I'm not familiar with the exponential definition. I can't follow much of what you're saying, as I can't figure out the details of the proof outlined in my question. If you're willing, could you show how to use the steps exactly as I outlined to get the result (which means, for example, not assuming WLOG the endpoints of the interval)? This way I'll understand the concepts/vocabulary better and figure out the small details. – CuriousKid7 Mar 1 '17 at 10:52
• @CuriousKid7: I have included some more details – Giuseppe Negro Mar 1 '17 at 14:13