I found this limiting argument very common in proving inequalities in Sobolev spaces. Basically, what people do is to observe that test functions (smooth functions with compact support) are dense in $W^{k,p}(\mathbb{R})$, for $1\leq k<\infty, 1\leq p<\infty$, prove the inequality for test functions and then pass to limit.
My concern is: I don't know why the density fact will give us what we want. Could somebody walk me (rigorously) through maybe just one example?
Let's look at this one:
Show the space $W^{1,1}(\mathbb{R})$ embeds continuously into $L^{\infty}(\mathbb{R})$.
It's essentially to show that $||f||_{L^{\infty}(\mathbb{R})}\leq ||f||_{W^{1,1}(\mathbb{R})}$ for any $f\in W^{1,1}(\mathbb{R})$. Proving the inequality for test functions is easy. Then how does that imply the inequality for any $f\in W^{1,1}(\mathbb{R})$?
I suppose, for any $f\in W^{1,1}(\mathbb{R})$, you take a sequence of test functions $f_n$ that converges to $f$ in $W^{1,1}(\mathbb{R})$. We know that $||f_n||_{L^{\infty}(\mathbb{R})}\leq ||f_n||_{W^{1,1}(\mathbb{R})}$. Then take limit. RHS conveges to $||f||_{W^{1,1}(\mathbb{R})}$. But why would LHS converge to $||f||_{L^{\infty}(\mathbb{R})}$?
$$ |f_n - f_{n+p}|_{L^\infty} \le |f_n - f_{n+p}|_{W^{1,1}} $$because of the inequality you have shown, hence the sequence $(f_n) $ is a Cauchy sequence in the space $L^\infty$.
The uniqueness of the limit for both norms (maybe because of the convergence in distribution, which is weaker than both convergences, but I am not sure of this point) ensures that $|f_{n+p}|_{L^\infty} \to |f|_{L^\infty}$.