I am not sure of my answers to this question. I would appreciate if someone can verify if my logic is correct, Thanks! So $C[0,1]$ is the vector space of all continuous function on the interval [0,1]. (over the real numbers) with the norm $||f||= \underset{x\in\left[0,1\right]}{sup}\left|f(x)\right|$ .
I am given two subsets of the vector space ,$ A=\left\{ g\in C\left[0,1\right]\,|\, g(1)=-g(0)\right\} , B=\left\{ g\in C\left[0,1\right]\,|\, g(1)=g(0)\right\} $ So the questions are , these two sets dense in $C[0,1]$ .
So, my answer was that neither A nor B is a dense subset of our vector space. Let there be an $\epsilon>0$ Let's take for example, $f(x)=x$ in both cases. $f(1)=1$ and $f(0)=0$ . And we are looking for functions $g,h$ such that $g(1)=-g(0)$ and $h(1)=h(0)$ , that satisfy $||f-g||<\epsilon $ and $||f-h|||<\epsilon $
Let's take $g$ for a second and $\epsilon =\frac{1}{4}$. So let's assume for a second that there exists a function like this. So for every $x \in [0,1]$ we get $|f(x)-g(x)|<\epsilon$ . So we get $|f(0)-g(0)|<\frac{1}{4}$ , therefore, $-\frac{1}{4}<g(0)<\frac{1}{4}$ . On the other hand, $|f(1)-g(1)|<\frac{1}{4}$ therefore, $\frac{3}{4}<g(1)<\frac{5}{4}$ . On the other hand we have $g(0)=-g(1)$, therefore we get we get $\frac{1}{4}<g(0)<\frac{1}{4}$ and , $-\frac{5}{4}<f(0)<-\frac{3}{4}$ . A Contradiction
In the same way, let's assume that there is a function $h$ that satisfies the conditions above. So for every $x\in[0,1]$ we get $|f(x)-h(x)|<\epsilon$ and therefore $|f(0)-h(0)|<\frac{1}{4}$, and therefore $-\frac{1}{4}<h(0)<\frac{1}{4}$ . And we have $|f(1)-h(1)|<\frac{1}{4}$ and therefore, $\frac{3}{4}<h(1)<\frac{5}{4}$, and since $h(1)=h(0)$ we get, $-\frac{1}{4}<h(0)<\frac{1}{4}$ and $\frac{3}{4}<h(0)<\frac{5}{4}$ , a contradiction.
Can someone verify this? Thank you.