Is set
$\displaystyle L=\{f\in X | \int_{-\infty}^{+ \infty} f(x)dx =0\} $.
closed in Banach space $\displaystyle X$?
a) $\displaystyle X = L^1 (-\infty, +\infty)$, b) $\displaystyle X = L^2 (-\infty, +\infty)$
a) Is true because $\displaystyle f\mapsto \int_{\mathbb{R}}f$ is a continuous linear functional on $\displaystyle L_1(\mathbb{R})$. If we denote by $\displaystyle T$ this continuous mapping the space $\displaystyle L$ is
$\displaystyle T^{-1}(0)$.
b) Is false. To prove it just observe that there are dense subspaces in $\displaystyle L_2(\mathbb{R})$ formed by integrable functions and with integral 0. Look at the Haar system Haar wavelet - Wikipedia, the free encyclopedia.
If the set of functions with integral 0 were closed, this would imply that the closure of the span of the Haar system, that is the whole $\displaystyle L_2(\mathbb{R})$, would be included in $\displaystyle L$, that certainly is not true.