Differential equation in $ L^2(\mathbb{R}^n) $ related to the equality condition for uncertainty principle Define closed operators $ X_j $ and $ D_j $ on $ L^2(\mathbb{R}^n) $ as follows:
\begin{align*}
  X_j f = x_j f &\quad \text{for $ f \in L^2(\mathbb{R}^n) $ such that $ x_j f \in L^2(\mathbb{R}^n) $}, \\
  D_j f = \frac{1}{2\pi i} \frac{\partial f}{\partial x_j} &\quad \text{for $ f \in L^2(\mathbb{R}^n) $ such that $ \frac{\partial f}{\partial x_j} \in L^2(\mathbb{R}^n) $},
\end{align*}
where $ x_j $ is the $ j $-th coordinate function and $ \partial/\partial x_j $ denotes differentiation of a distribution. $ D_j $ and $ X_j $ are corresponds to each other via Fourier transform.
Let $ a $, $ b \in \mathbb{R} $. I want to determine $ u \in \operatorname{Dom}(X_j) \cap \operatorname{Dom}(D_j) $ such that one of $ (X_j - a)u $, $ (D_j - b)u $ is a purely-imaginary-number-multiple of the other. The solutions in $ C^\infty(\mathbb{R}^n) $ are
$$ u(x) = v(x_1, \dots, x_{j - 1}, x_{j + 1}, \dots, x_n) \exp(2\pi ibx_j - \pi r(x_j - a)^2), $$
where $ v \in C^\infty(\mathbb{R}^{n - 1}) $ and $ r \in \mathbb{R} $, but I have no idea what happens in $ L^2(\mathbb{R}^n) $.
Background. I am reading Folland’s Harmonic Analysis in Phase Space, in which the equality condition for uncertainty principle $ \lVert (X_j - a)u \rVert_2 \lVert (D_j - b)u \rVert_2 \geq \lVert u \rVert_2/4\pi $ is stated without detailed explanation (Folland solved the above differential equation only in $ C^\infty $ sense). I tried to make the argument complete, but I got stuck.
 A: I consulted with my senior in university and got the answer. Let $ j = n $ for simplicity and define
$$ G(x_n) = \exp(2\pi ibx_n - \pi r(x_n - a)^2). $$
Then, $ u \in L^2(\mathbb{R}^n) $ satisfies the condition if and only if
$$ u(x) = v(x_1, \dots, x_{n - 1}) G(x_n) \quad (\text{for a.e. $ x \in \mathbb{R}^n $}) \tag{$ * $} $$
for some $ v \in L^2(\mathbb{R}^{n - 1}) $ and $ r > 0 $.
To prove this, we consider the differential equation
$$ (X_n - a)u = ir(D_n - b)u, \tag{$ ** $} $$
where $ r \in \mathbb{R} $, in $ L^1_{\mathrm{loc}}(\mathbb{R}^n) $. It is clear that ($ ** $) has no non-zero solution in $ L^1_{\mathrm{loc}}(\mathbb{R}^n) $ when $ r = 0 $, so we assume $ r \neq 0 $.
Lemma 1. If $ u \in L^1_{\mathrm{loc}}(\mathbb{R}^n) $ satisfies ($ ** $), $ D_n(u/G) = 0 $.
Proof. By Leibniz rule (for differentiation of distributions) and the fact that $ u $ and $ G $ are solutions to ($ ** $), we get
\begin{align*}
D_n\left(\frac{u}{G}\right)
&= -\frac{D_n G}{G^2} \cdot u + \frac{D_n u}{G} \\
&= -\frac{(X_n - a)G/ir + bG}{G^2} \cdot u + \frac{(X_n - a)u/ir + bu}{G} \\
&= 0. \quad \square
\end{align*}
Lemma 2. If $ f \in L^1_{\mathrm{loc}}(\mathbb{R}^n) $ and $ D_n f = 0 $, there exists $ g \in L^1_{\mathrm{loc}}(\mathbb{R}^{n - 1}) $ such that $ f(x) = g(x_1, \dots, x_{n - 1}) $ for a.e. $ x \in \mathbb{R}^n $.
Proof. Let $ \mathcal{D}_n $ be the set of all $ \psi \in \mathcal{D}(\mathbb{R}^n) $ satisfying $ \int_{\mathbb{R}} \psi(x) \,dx_n = 0 $ for all $ (x_1, \dots, x_{n - 1}) \in \mathbb{R}^{n - 1} $. It is easily seen that $ \langle f, \psi \rangle = 0 $ for $ \psi \in \mathcal{D}_n $. Fix $ \rho \in \mathcal{D}(\mathbb{R}) $ such that $ \int_{\mathbb{R}} \rho(x_n) \,dx_n = 1 $. For every $ \phi \in \mathcal{D}(\mathbb{R}^n) $,
$$ \psi(x) = \phi(x) - \rho(x_n) \int_{\mathbb{R}} \phi(x_1, \dots, x_{n - 1}, t) dt $$
is in $ \mathcal{D}_n $. Therefore, by Fubini’s theorem,
\begin{align*}
\langle f, \phi \rangle
&= \left\langle f, \rho(x_n) \int_{\mathbb{R}} \phi(x_1, \dots, x_{n - 1}, t) dt \right\rangle \\
&= \int_{\mathbb{R}^n} \left(\int_{\mathbb{R}} f(x) \rho(x_n) \,dx_n\right) \phi(x_1, \dots, x_{n - 1}, t) \,d(x_1, \dots, x_{n - 1}, t).
\end{align*}
This means that $ g(x_1, \dots, x_{n - 1}) = \int_{\mathbb{R}} f(x) \rho(x_n) \,dx_n $ is a function satisfying $ f(x) = g(x_1, \dots, x_{n - 1}) $ for a.e. $ x \in \mathbb{R}^n $. $ \square $
By these lemmas, a solution $ u \in L^1_{\mathrm{loc}}(\mathbb{R}^n) $ to ($ ** $) must have the form ($ * $), where $ v \in L^1_{\mathrm{loc}}(\mathbb{R}^{n - 1}) $ and $ r \in \mathbb{R} $. In this situation, $ \lVert u \rVert_2 = \lVert v \rVert_2 \lVert G \rVert_2 $, so $ u \in L^2(\mathbb{R}^n) $ if and only if $ v \in L^2(\mathbb{R}^{n - 1}) $ and $ r > 0 $, or $ v = 0 $. This proves the necessity.
The sufficiency follows from the next lemma:
Lemma 3. Let $ g \in L^1_{\mathrm{loc}}(\mathbb{R}^{n - 1}) $, $ h \in L^1_{\mathrm{loc}}(\mathbb{R}) $ and $ f(x) = g(x_1, \dots, x_{n - 1}) h(x_n) $. If $ D_n h \in L^1_{\mathrm{loc}}(\mathbb{R}) $, $ D_n f(x) = g(x_1, \dots, x_{n - 1}) D_n h(x_n) $ for a.e. $ x \in \mathbb{R}^n $.
Proof. By Fubini’s theorem,
\begin{align*}
\langle f, D_n \phi \rangle
&= \int_{\mathbb{R}^n} f(x) D_n \phi(x) \,dx \\
&= \int_{\mathbb{R}^{n - 1}} g(x_1, \dots, x_{n - 1}) \int_{\mathbb{R}} h(x_n) D_n \phi(x) \,dx_n \,d(x_1, \dots, x_{n - 1}) \\
&= -\int_{\mathbb{R}^{n - 1}} g(x_1, \dots, x_{n - 1}) \int_{\mathbb{R}} D_n h(x_n) \phi(x) \,dx_n \,d(x_1, \dots, x_{n - 1}) \\
&= -\langle g(x_1, \dots, x_{n - 1}) D_n h(x_n), \phi \rangle
\end{align*}
for all $ \phi \in \mathcal{D}(\mathbb{R}^n) $. This means $ D_n f(x) = g(x_1, \dots, x_{n - 1}) D_n h(x_n) $ for a.e. $ x \in \mathbb{R}^n $. $ \square $
