Let $Af(x)=xf(x)$ be the unbounded operator defined on $L^2(\mathbb R)$ with as its domain the space of infinitely differentiable functions with compact support on $\mathbb R$ (denoted by $C_c^{\infty}(\mathbb R)$). I remember my lecturer once when I asked him about the closedness of $A$, he told me that $A$ is not closed for its domain is too "small". Now, I wanted to write down details but I got stack and this why I am seeking your help. I would like a proof of the non closedness of this operator $A$ on $C_c^{\infty}(\mathbb R)$.
Many thanks in advance for your help.
Math
Define $f:=\chi_{[-1,1]}$. Define $g(x):=xf(x)$. Define $\eta_\varepsilon$ as the standard mollifier. Define $\forall k \in \mathbb{N}, f_k:=f*\eta_\frac{1}{k}$, where $*$ is the convolution. Then $$\forall k \in \mathbb{N}, f_k\in C_c^\infty(\mathbb{R})$$ and $$\|f_k-f\|_{L^2(\mathbb{R})}\rightarrow0, k\rightarrow\infty$$ and $$\|Af_k-g\|_{L^2(\mathbb{R})}\rightarrow0, k\rightarrow\infty.$$ Then $$\|(f_k,Af_k)-(f,g)\|_{L^2(\mathbb{R})\times L^2(\mathbb{R})}\rightarrow0, k\rightarrow\infty,$$ and so $(f,g)$ is in the closure of $\operatorname{graf}(A)$. However $f$ is not in the domain of $A$ and then $(f,g)\notin\operatorname{graf}(A)$. So $\operatorname{graf}(A)$ isn't closed in $L^2(\mathbb{R})\times L^2(\mathbb{R})$ which, by definition, means that $A$ is not closed.