Let $$S=\left\{\sin(nx):2\leq n\in\mathbb N\right\}\cup\left\{\cos(nx):0\leq n\in\mathbb Z\right\}$$ i.e. the standard basis for all trig. polynomials excluding $\sin(1\cdot x)$. By Fejer's theorem, if we included $\sin(x)$, then $span(S)$ would have been dense in $C_{per}[-\pi,\pi]$ , i.e real continuous functions with $f(-\pi)=f(\pi)$.
But is $span(S)$ with the above definition dense in $C_{per}[-\pi,\pi]$? The relevant norm is $$||f||_\infty=\sup\{|f(x)|:x\in[-\pi,\pi]\}$$
Also, I should note that this proof needs to avoid Fourier related stuff.
I thought maybe to use Stone-Weierstrass:
- obviously $[-\pi,\pi]$ is compact,
- (I think) $span(S)$ forms an algebra,
- $span(S)$ separates points, and
- $1=\cos(0\cdot x)\in span(S)$.
So it should be dense... But somehow I don't feel comfortable with this proof.
First, I'm not entirely sure $span(S)$ forms an algebra, specifically being closed to multiplication. Second, is there a way to better illustrate how is it that for every continuous function $f$ there exists a trigonometric polynomial close as desired to $f$ given the above norm? How about $\sin(x)$ that has been excluded in $S$?
And in general, if $span(S)$ is indeed dense, is there a constructive way to generate smaller subsets that are also dense in $C_{per}[-\pi,\pi]$?
This set is not an algebra. I think the easiest way to show that is to show that the span is not dense; hence, we know that some assumption of the Stone-Weierstrass theorem fails, and you already checked the rest of them.
If span is dense, then $\sin x$ can be approximated within $\epsilon$ by some linear combination of $\sin nx$, $n\ge 2$, and $\cos nx$. Let $f$ be this linear combination, so that $|f(x)-\sin x|<\epsilon$. Then $$f(x)\sin x> \sin^2x - \epsilon|\sin x|$$ hence $$ \int_{-\pi}^\pi f(x)\sin x \,dx > \int_{-\pi}^\pi \sin^2 x \,dx - \epsilon \int_{-\pi}^\pi |\sin x |\,dx = \pi - 2\epsilon $$ which is strictly positive when $\epsilon$ is small enough.
On the other hand, $\int_{-\pi}^\pi f(x)\sin x \,dx=0$ because $\int_{-\pi}^\pi \sin nx \sin x \,dx=0$ for $n\ge 2$ (use trig identities), and $\int_{-\pi}^\pi \cos nx \sin x \,dx=0$ for all $n\in\mathbb Z$ (notice the integrand is odd). A contradiction.