Is $1+e^{-|x|^2}\in D^{1,2}(\mathbb R^d)$? Let $C_c^{\infty}(\mathbb R^d)$  the set of all infinitely manny differentiable function with compact support in $\mathbb R^d.$ We define $D^{1,2}(\mathbb R^d)$ as the completion of $C_c^{\infty}(\mathbb R^d)$ with resect to the norm $\|u\|_{D^{1,2}}:= \|\nabla u \|_{L^2(\mathbb R^d)}.$ 
I think, $f(x):=e^{-|x|^2} \in D^{1,2}(\mathbb R^d)$ ($x\in \mathbb R^d$) (Correct me if I am wrong.) 

Question: Can we say $1+f \in D^{1,2}(\mathbb R^d)$? If $f\in D^{1,2}(\mathbb R^d),$ then can we say $g+f \in D^{1,2}(\mathbb R^d)$ (where $g$ is non-zero constant function on $\mathbb R^d$.)

 A: I'm going to give you the answer under the assumption that $d \ge 3$.  In this case the Gagliardo-Nirenberg-Sobolev inequality tells us that there exists a constant $C>0$ such that 
$$
\Vert u \Vert_{L^{2^\ast}} \le C \Vert \nabla u \Vert_{L^2}
$$
for all $u \in C^\infty_c(\mathbb{R}^d)$, where
$$
2^\ast = \frac{2d}{d-2}.
$$
Using this we find that if $\{u_n \}_{n} \subset C^\infty_c$ is a Cauchy sequence with respect to $u \mapsto \Vert \nabla u \Vert_{L^2}$, then $\{u_n\}_{n}$ is a Cauchy sequence in $L^{2^\ast}$ as well, and hence converges to an element of $L^{2^\ast}$.  This means that the elements of $\mathcal{D}^{1,2}(\mathbb{R}^d)$, which are initially defined abstractly as equivalence classes of Cauchy sequences, can be canonically identified with functions belonging to $L^{2^\ast}(\mathbb{R}^d)$.  
With this in mind let's look at $u(x) = 1 + e^{-|x|^2}$.  If this belonged to $\mathcal{D}^{1,2}$ then we would have that $u \in L^{2^\ast}$, but this is impossible, as in this case we would then have the estimate
$$
\omega_d R^d = \vert B(0,R) \vert \le \int_{B(0,R)} dx \le \int_{B(0,R)} |u(x)|^{2^\ast} dx \le \int_{\mathbb{R}^d} |u(x)|^{2^\ast} dx \le \Vert u \Vert_{L^{2^\ast}}^{2^\ast} < \infty
$$
for all $R>0$, where $\omega_d = |B(0,1)|$.  
