# bounded measure and dense subset of continuous functions

Let $C_0(R^n)$ be the space of continuous functions from $R^n$ to $R$ which vanish at infinity. Let $D$ be a subset of $C_0(R^n)$, I'd like to prove that if D is not dense in $C_0(R^n)$, then there exists a bounded measure $\mu$ such that $\int f d\mu=0, \forall f \in D$ and $\int g d\mu \neq 0$ for some $g \in C_0(R^n)$. It this true?

All I can say is $\exists \epsilon >0$ and $g \in C_0(R^n)$ such that $||g - f||>\epsilon, \forall f \in D$, but then I don't how what to do.

-
If $D$ is a dense subset of the unit ball of $C_0(R^n)$ endowed with the uniform norm, then such a measure doesn't exist. – Davide Giraudo Mar 30 '14 at 9:31
@DavideGiraudo Thanks for this comment. So if I add the condition that $D$ is a linear subspace of $C_0(R^n)$, your previous answer is valid, right?(yes, I have a quick eye to catch it) – Petite Etincelle Mar 30 '14 at 9:45

Assume that $D$ is a subspace of $C_0(\mathbf R^n)$. Denote $F\subset C_0(\mathbf R^n)$ the closure of the vector subspace generated by $D$. Then $F$ is strictly contained in $C_0(\mathbf R^n)$: pick some $g\in C_0(\mathbf R^n)\setminus F$ and with Hahn-Banach theorem, define a linear continuous functional $L\colon C_0(\mathbf R^n)\to\mathbf R$ such that $L(g)\neq 0$ and $L(f)=0$ for each $f\in F$.
If $D$ is not a subspace, the result doesn't necessarily hold: take $D$ the unit ball.
hmm -- why is the vector subspace generated by $D$ also not dense? What if $D$ is the unit ball? – Thomas Mar 30 '14 at 9:27
I've edited. ${}{}$ – Davide Giraudo Mar 30 '14 at 9:54