Is $\{f\in C[0,1]: f(0)=f(1)\}$ a closed subset of $C[0,1]$?

30 Views Asked by At

Let $C=\{f\in C[0,1]: f(0)=f(1)\}$ equipped with the maximum norm. I want to show if $C$ is closed in $C[0,1]$.

My idea was the following: Let $(f_n)_n\subset C$ be a converging sequence say $f_n\rightarrow f\in C[0,1]$, I want to show that $f\in C$. Therefore $$|f(0)-f(1)|\leq |f(0)-f_n(0)|+|f_n(0)-f_n(1)|+|f_n(1)-f(1)|\le 2\|f_n-f\|+|f_n(0)-f_n(1)|$$ now since $f_n\in C$ we know that $|f_n(0)-f_n(1)|=0$ and since $f_n\rightarrow f$ we also know that $\|f_n-f\|\rightarrow 0$ so as $n\rightarrow 0$ we deduce $|f(0)-f(1)|=0$ and thus $f(0)=f(1)$.

Does this work?