On the proof of Heisenberg's uncertainty principle 
Theorem 1 For $f \in L^2(\mathbb R)$ and $a,b \in \mathbb R$
$$
\frac{1}{2} \| f \|_2^2
\le \left( \int_{\mathbb R} (x - a)^2 | f(x) |^2 d x\right)^\frac{1}{2} \left( \int_{\mathbb R} (\xi - b)^2 | \hat{f}(\xi) |^2 d\xi \right)^\frac{1}{2}.
$$
  holds.

In our lecture we proved theorem 1 using the following theorem

Theorem 2
  For self-adjoint (possibly unbounded) operators $S,T$ on a Hilbert space $H$ and $a,b \in \mathbb R$
$$
\| (S - a I) f \| \| (T - b I) \|
\ge \frac{1}{2} | \langle [S,T] f, f \rangle |
$$
  holds for all $f \in \text{dom}(ST) \cap \text{dom}(TS)$, where $[S,T] := S T - T S$ is the commutator of $S$ and $T$.

Proof.
Define $(S f)(x) := x f(x)$ for $f \in L^2(\mathbb R^n)$ and $(T f)(x) := i f'(x)$ for differentiable $f \in L^2(\mathbb R^n)$.
For $f \in \text{dom}(ST) \cap \text{dom}(TS)$ we have
\begin{align*} \tag{1}
([S,T] f)(x)
& = i x f'(x)
= i \frac{d}{dx} ( x \cdot f(x)) \\
& = i x f'(x) - i f(x) - i x f'(x)
= - i f(x)
\end{align*}
and by theorem 2
$$ \tag{2}
\frac{1}{2} \| f \|_2^2
= \frac{1}{2} | \langle - i f(x), f(x) \rangle |
\le \| (S - a I) f \|_2 \| (T - b I) f \|_2.
$$
By the Plancherel theorem we have
$$ \tag{3}
\| (T - b I) f \|_2 
= \| \mathcal{F}((T - b I) f) \|_2
= \| (\xi - b) \hat{f} \|_2,
$$
which yields the statement. $\square$
My Questions


*

*Into what spaces do $S$ and $T$ map? Is it $L^2(\mathbb{R}^n)$?

*Why can we use the Plancherel theorem? 
I have tried to calculate
\begin{align*}
    \| (T - b I) f \|_2^2
    & = \int_{\mathbb{R}^n} | i f'(x) - b f(x) |^2 dx \\
    & = \int_{\mathbb{R}^n} | f'(x) |^2 - i b \overline{f(x)} f'(x) + i b f(x) \overline{f'(x)} + | b f(x) |^2 dx \\
    & = \int_{\mathbb{R}^n} | f'(x) |^2 dx
    - i b \int_{\mathbb{R}^n} \frac{d}{dx} | f(x) |^2 dx
    + | b |^2 \| f \|_2^2 \\
    & = \int_{\mathbb{R}^n} | f'(x) |^2 dx
    + | b |^2 \| f \|_2^2
    - i b \bigg[| f(x) |^2\bigg]_{x = - \infty}^{\infty}
\end{align*}
Is this correct? Can we conclude this is finite?

*How do we deal with the $\int_{\mathbb{R}} | f'(x) |^2 dx$ term?
Under the suitable assumptions (in another proof of theorem 1, where $f \in  L^2(\mathbb{R})$ we used this) we can say
\begin{equation*}
\int_{\mathbb R^n}  | f'(x) |^2 dx
= \int_{\mathbb R^n}  | \mathcal{F}(f')(x) |^2 dx
= \int_{\mathbb R^n} x^2 | \hat{f}(x) |^2 dx,
\end{equation*}
but for this we would need that $f' \in L^2$.
Our lecture assistant conjectured that we need to require $f' \in L^2$.
How can we show this is necessary?


*I know that $\big[| f(x) |^2\big]_{x = - \infty}^{\infty}$ only makes sense for $n = 1$. How can we generalise it? Can we conclude that it vanishes as $|f(x)| \xrightarrow{x \to \pm \infty} 0$ because $f \in L^2(\mathbb{R}^n)$?

 A: @1: Yes, $S$ and $T$ are (unbounded) operators defined on suitable subspaces of $L^2$ going into $L^2$. You probably want either the Schwartz space or $H^1$ / its fourier transform respectively as domain for $T$ and $S$.
@3: If one of the integrals on the RHS of theorem 1 is infinite, there is really nothing to prove. If the other integral is zero, then $f=0$ and the inequaltiy is true. If the other integral is non-zero, then the RHS is $+\infty$ and the inequality is also true. Therefore you can assume right away and w.l.o.g. that both integrals are finite, i.e. not only $f\in L^2$, but $(x-a)f(x) \in L^2$ and $(\xi-b)\hat{f}(\xi)\in L^2$ as well so that $x f(x)\in L^2$ and $\xi \hat{f}(\xi)\in L^2$. Now since Fourier transform exchanges multiplication by $x$ with differentiation (up to some $\pm i$), this means that $f'(x)\in L^2$ as well. One has to be a bit careful here because this is only a weak derivative, but that doesn't change anything relevant.
@2: And this is the reason you can apply Plancherel's theorem: You assume wlog that all the relevant functions are in $L^2$.
A: I'm not able to answer this entirely or rigorously but I think I can share some thoughts about it 
1:My guess is they go from $L^2$ to $L^2$, a priori for $T$ for example it doesn't holds but I suppose one can consider some kind of smooth space $L^2(\Omega)$ where it does 
2: I don't get how the proof follows from using Plancherel but I believe it should be possible to obtain the inequality without using it.
\begin{align}
\|(S-aI)f\|\|(T-bI)f\|
& \overset{\text{CS}}
\ge \left|\langle(S-aI)f,(T-bI)f\rangle \right|\\
& =\left[\Re(\langle(S-aI)f,(T-bI)f\rangle)^2+\Im(\langle(S-aI)f,(T-bI)f\rangle)^2\right]^{\frac{1}{2}}\\
& \ge \left|\Im(\langle(S-aI)f,(T-bI)f\rangle)\right|\\
& = \left|\frac{1}{2i}\left[ \langle(S-aI)f,(T-bI)f\rangle-\overline{\langle(S-aI)f,(T-bI)f\rangle} \right]\right|\\
& = \left|\frac{1}{2i}\left[\langle(S-aI)f,(T-bI)f\rangle-\langle(T-bI)f,(S-aI)f\rangle\right]\right|\\
& = \left|\frac{1}{2i}\left[(ST-aT-bS-abI)f^2-(TS-bS-aT-baI)f^2\right]\right|\\
& = \left|\frac{1}{2i}\left[(ST-TS)f^2\right]\right|\\
& = \left|\frac{1}{2i}\left[\langle(ST-TS)f,f\rangle\right]\right|\\
& = \left|\frac{1}{2i}\left[\langle[TS]f,f\rangle\right]\right|\\
& = \left|\frac{1}{2i}\left[\langle-if,f\rangle\right]\right|\\
& = \frac{1}{2}|\langle f,f\rangle|\\
& = \frac{1}{2}\|f\|\\
\end{align}
3: I think this question is contained in the two previous, you wrote that $\int_{\mathbb R^n}  |f'(x) |^2 dx= \int_{\mathbb R^n} x^2 | \hat{f}(x) |^2 dx$ but I think you meant $\int_{\mathbb R^n}  |f'(x) |^2 dx= \int_{\mathbb R^n} x^2 | \hat{f}(\xi) |^2 d\xi$ which is just what you had before $\|(T-bI)f\|_2=\|(\xi-b)\hat{f}\|_2,$ with $b=0$ from question 2 and as $Tf=f'$ then if $f'\in L^2$ should come from question 1
4: Not really sure but I believe this case wouldn't be interesting because that would mean inequality isn't bounding anything as 
$$
\|(S-aI)f\|\|(T-bI)f\|
\ge\frac{1}{2}\|f\|
=0
\quad (\text{when } f\to 0)
$$
5: I don't get the question entirely but I think the case $a,b=0$ shouldn't be interesting either, if $\|(S-aI)f\|_2=0$ then $Sf=af$ that is we could think of $a$ as an eigenvalue of $S$ so in general we would be more interested in $a,b\neq 0$, also we could interpret the inequality as saying that you can't have an $a$ and $b$ being eigenvalues of $T$ and $S$ simultaneously as that would mean 
$$
0=\|(S-aI)f\|\|(T-bI)f\|\ge\frac{1}{2}\|f\|\quad (\text{when } Sf=af \text{ and } Tf=bf)
$$
A: FOURIER ANALYSIS
For $p\in [1,\infty)$ the space $L^p(\textbf{R}^n)$ is the space of countable functions which satisfy
$$
||f||_p:=\left(\int_{\textbf{R}^n}|f(x)|^pdx\right)^{1/p}<\infty
$$ 
The space $L^2(\textbf{R}^n)$ have inner product
$$
(f,g):=\int_{\textbf{R}^n}f(x)\overline{g(x)}dx
$$
The space $L^{\infty}(\textbf{R}^n)$ is the set of all bounded in all $\textbf{R}^n$ functions $f$ (except for a posiblly set of mesure $0$) and have metric 
$$
||f||_{\infty}:=\textrm{inf}\{\lambda\in\textbf{R}:\mu\{|f(x)|>\lambda\}=0\}
$$
For $p\geq 1$ every $L^p$ is Banach
If $f\in L^1(\textbf{R}^n)$, we define the Fourier transform $\widehat{f}$ of $f$ as
$$
\widehat{f}(\xi)=\int_{\textbf{R}^n}e^{-2\pi i (x,\xi)}f(x)dx\textrm{, }\xi\in  \textbf{R}^n,
$$
where
$$
(x,\xi):=x_1\xi_1+x_2\xi_2+\ldots+x_{n}\xi_n
$$
and
$$
||x||:=\sqrt{x_1^2+x^2+\ldots+x_n^2}
$$
If $f\in L^2(\textbf{R}^n)$, then $\widehat{f}\in L^2(\textbf{R}^n)$ and
$$
f(x)=\int_{\textbf{R}^n}e^{2\pi i (x,\xi)}\widehat{f}(\xi)d\xi\textrm{, }x\in\textbf{R}^n.
$$ 
Theorem 1. If $f\in L^1(\textbf{R}^n)$, then
i) $\widehat{f}$ is bounded and
$$
||\widehat{f}||_{\infty}\leq ||f||_1
$$
ii) $\widehat{f}$ is uniformly continuous.
Theorem 2. (Riemann-Lebesgue) If $f\in L^1(\textbf{R}^n)$, then $\widehat{f}(\xi)\rightarrow 0$, when $||\xi||\rightarrow\infty$.
The Schwartz space $S(\textbf{R}^n)$ is the space in which every element $f$ of it, is $C^{\infty}(\textbf{R}^n)$ (infinite times differentiatable) and every partial derivative of $f$ tends to $0$ more quickly than any polynomial i.e. for all $m_1,m_2,\ldots,m_n,N$ and $R>0$ exists positive constant $c=c(m_1,m_2,\ldots,m_n,N,R)$ such that
$$
\left|\frac{\partial^{m_1+m_2+\ldots+m_n}}{\partial x_1^{m_1}\partial x_2^{m_2}\ldots\partial x_n^{m_n}}f(x)\right|\leq \frac{c}{(1+||x||^2)^N}\textrm{, }\forall x\in\textbf{R}^n.
$$ 
$S(\textbf{R}^n)$ is dense in $L^p$, $1\leq p<\infty$
Proposition 1. If $f\in S(\textbf{R}^n)$, then $\widehat{f}\in S(\textbf{R}^n)$.
Also
$$
\frac{\partial \widehat{f}}{\partial\xi_j}(\xi)=-2\pi i\int_{\textbf{R}^n}e^{-(x,\xi)}x_jf(x)dx
$$ 
Hence with integration by parts we get
$$
\widehat{\partial_jf}(\xi)=2\pi i \xi_j\widehat{f}(\xi)
$$
Some usefull results are: If $f,g\in S(\textbf{R}^n)$, then
$$
f(x)(-2\pi i x_j)^a\leftrightarrow\frac{\partial^a\widehat{f}}{\partial \xi^a_j}
$$
and
$$
\frac{\partial^af}{\partial x_j^a}\leftrightarrow (2\pi i\xi_j)^a\widehat{f}(\xi)
$$
$$
\int_{\textbf{R}^n}f(x)\widehat{g}(x)dx=\int_{\textbf{R}^n}\widehat{f}(x)g(x)dx
$$
$$
(f*g)(x):=\int_{\textbf{R}^n}f(x-y)g(y)dy
$$
$$
(f,g)=(\widehat{f},\widehat{g})
$$
$$
\widehat{(f*g)}(\xi)=\widehat{f}(\xi)\widehat{g}(\xi)
$$
Theorem.(Plancherel) 
Also if $f\in L^2$, then $\widehat{f}\in L^2$ and
$$
||f||_2^2=||\widehat{f}||_2^2
$$
Theorem.(Parseval) If $f,g\in L^2$, then 
$$
(f,g)=(\widehat{f},\widehat{g})
$$
HERMITIAN OPERATORS
Deffinition. An operator $\textbf{A}$ of a Hilbert space $H$, will called self-adjoint or Hermitian if 
$$
(\textbf{A}f,f)=(f,\textbf{A}f)\textrm{, }\forall f\in H
$$
Definition. The characteristic values (eigenvalues) of $\textbf{A}$, are all $\lambda$ such 
$$
\textbf{A}f=\lambda f.
$$ 
Characteristic elements (eigenvectors) are called all such $f$.
Theorem. A Hermitian operator have characteristic values real. The characteristic elements are orthogonal and $(\textbf{A}f,f)$ is real for every $f$. Also
$$
|(\textbf{A}f,f)|\leq ||\textbf{A}||\cdot ||f||^2
$$ 
Theorem. If $\textbf{A}f\neq 0$ when $f\neq0$ and $\textbf{A}$ is Hermitian in a Hilbert space $H$, then the set of all $f_k$ eigenvectors are complete orthogonal base i.e. 
$$
(f_k,f_l)=0\textrm{, if }k\neq l
$$
and every $g\in H$ have unique expansion
$$
g=\sum_k(g,f_k)f_k
$$
Here we omit our selfs to a descrete spectrum $\lambda_k$. 
Definition. If $\textbf{A}$ is an operator of a Hilbert space $H$, then we set 
$$
(\Delta \textbf{A}):=\left\langle \textbf{A}^2\right\rangle-\left\langle \textbf{A}\right\rangle^2,
$$
where we have set (the mean value):
$$
\left\langle \textbf{A}\right\rangle f:=(\textbf{A}f,f)
$$
Theorem.(Heisenberg's uncertainty principle) If $\textbf{A}$ and $\textbf{B}$ are Hermitian and $\textbf{AB}\neq \textbf{BA}$, then 
$$
(\Delta \textbf{A})(\Delta \textbf{B})\geq\frac{1}{2}\left|\left\langle[\textbf{A},\textbf{B}]\right\rangle\right|,
$$
where 
$$
[\textbf{A},\textbf{B}]=\textbf{AB}-\textbf{BA}.
$$
Proof. We can set in the proof that 
$$
\left\langle \textbf{A}\right\rangle=\left\langle \textbf{B}\right\rangle=0\tag 1
$$ 
If not this dont hold, then we can set
$$
\widetilde{\textbf{A}}=\textbf{A}-\left\langle \textbf{A}\right\rangle
$$
and
$$
\widetilde{\textbf{B}}=\textbf{B}-\left\langle \textbf{B}\right\rangle.
$$
Then
$$
\left\langle \widetilde{\textbf{A}}\right\rangle=\left\langle \widetilde{\textbf{B}}\right\rangle=0
$$
Hence when (1) holds, then 
$$
(\Delta \textbf{A})^2=\left\langle \textbf{A}^2\right\rangle=(\textbf{A}^2f,f)=(\textbf{A}f,\textbf{A}f)=||\textbf{A}f||^2
$$
and
$$
(\Delta \textbf{B})^2=\left\langle \textbf{B}^2\right\rangle=(\textbf{B}^2f,f)=(\textbf{B}f,\textbf{B}f)=||\textbf{B}f||^2
$$
Hence
$$
\Delta \textbf{A}=||\textbf{A}f||\textrm{, }\Delta \textbf{B}=||\textbf{B}f||
$$
Hence from Schwartz inequality
$$
(\Delta \textbf{A}) (\Delta \textbf{B})=||\textbf{A}f||\cdot ||\textbf{B}f||\geq |(\textbf{A}f,\textbf{B}f)|=|(f,\textbf{AB}f)|=|\left\langle\textbf{A}\textbf{B}\right\rangle|\tag 2
$$
But because $\textbf{AB}\neq \textbf{BA}$ we have $\textbf{C}=\textbf{AB}$ is not Hermitian. Hence 
$$
Re\left\langle \textbf{C}\right\rangle=\left\langle\frac{\textbf{C}+\textbf{C}^{+}}{2}\right\rangle\textrm{, }Im\left\langle \textbf{C}\right\rangle=\left\langle\frac{\textbf{C}-\textbf{C}^{+}}{2i}\right\rangle,
$$
where $\textbf{C}^{+}=(\textbf{AB})^{+}=\textbf{B}^{+}\textbf{A}^{+}=\textbf{BA}$ is the adjoint of $\textbf{C}$. Hence
$$
Re\left\langle\textbf{C}\right\rangle=\left\langle\frac{\textbf{AB}+\textbf{BA}}{2}\right\rangle\textrm{, }Im\left\langle\textbf{C}\right\rangle=\left\langle\frac{\textbf{AB}-\textbf{BA}}{2i}\right\rangle=\frac{1}{2i}\left\langle[\textbf{A},\textbf{B}]\right\rangle
$$
But
$$
|\left\langle \textbf{AB}\right\rangle|\geq |Im\left\langle\textbf{AB}\right\rangle|=\frac{1}{2}|\left\langle[\textbf{A},\textbf{B}]\right\rangle |\tag 3
$$
From $(2)$, $(3)$ we get the result. QED
APPLICATION. If $\textbf{S},\textbf{T}$ are Hermitian operators (with $\textbf{ST}\neq \textbf{TS}$), then we set
$$
\textbf{A}f=(\textbf{S}-\textbf{I}a)f\textrm{, }\textbf{B}f=(\textbf{T}-\textbf{I}b)f\textrm{, }x\in\textbf{R}.
$$
Then also $\textbf{A},\textbf{B}$ are Hermitian and
$$
[\textbf{A},\textbf{B}]=(\textbf{S}-a \textbf{I})(\textbf{T}-b\textbf{I})-(\textbf{T}-b \textbf{I})(\textbf{S}-a\textbf{I})=
$$
$$
=\textbf{ST}-b\textbf{S}-a\textbf{T}+ab\textbf{I}-(\textbf{TS}-a\textbf{T}-b\textbf{S}+ab\textbf{I})=[\textbf{S},\textbf{T}]
$$
Hence we get from Schwartz inequality
$$
||\textbf{A}f||\cdot ||\textbf{B}f||\geq |(\textbf{A}f,\textbf{B}f)|=|(f,\textbf{AB} f)|=|\left\langle \textbf{AB}\right\rangle|\geq \frac{1}{2}|\left\langle[\textbf{A},\textbf{B}]\right\rangle|\tag 4
$$
Inequality (4) is your Theorem 2. Hence setting $\textbf{S}f(x)=xf(x)$ and $\textbf{T}=\frac{1}{2\pi i}\frac{d}{dx}$, we have from Placherel formula
$$
||\textbf{T}f-bf(x)||_2=||\frac{1}{2\pi i}f'(x)-bf(x)||_2=
$$
$$
=\left\|\frac{1}{2\pi i}\int_{\textbf{R}}f'(t)e^{-2\pi i t x}dt-b\int_{\textbf{R}}f(t)e^{-2\pi i t x}dt\right\|_2=
$$
$$
=\left\|-\frac{1}{2\pi i}\int_{\textbf{R}}f(t)(-2\pi i x)e^{-2\pi i t x}dt-b\int_{\textbf{R}}f(t)e^{-2\pi i t x}\right\|_2=
$$
$$
=||(x-b)\widehat{f}||_2.
$$
Also
$$
||\textbf{S}f(x)-af(x)||_2=||(x-a)f(x)||_2
$$
But
$$
[\textbf{S},\textbf{T}]f=\textbf{ST}f(x)-\textbf{TS}f(x)=x\frac{1}{2\pi i}f'(x)-\frac{1}{2\pi i}\frac{d}{dx}(xf(x))=
$$
$$
=\frac{x}{2\pi i}f'(x)-\frac{x}{2\pi i}f'(x)-\frac{1}{2\pi i}f(x)=-\frac{1}{2\pi i}f(x)
$$
Hence
$$
|\left\langle [\textbf{S},\textbf{T}]\right\rangle f|=\frac{1}{2\pi}||f||_2
$$
and therefore from (4) (when $f'\in L^2$):
$$
\frac{1}{4\pi}||f||_2\leq ||(x-a)f(x)||_2\cdot ||(\xi-b)\widehat{f}(\xi)||_2.
$$
QED
NOTES. Actualy 
$$
(\textbf{T}f,f)=\frac{1}{2\pi i}\left(f',f\right)=\frac{1}{2\pi i}[|f|^2]^{+\infty}_{-\infty}-\frac{1}{2\pi i}(f,f')=(f,\textbf{T}f)
$$
and $\textbf{T}$ is Hermitian when $f'\in L^2$.
