Let $\hat A, \hat B$ be two operators on ${L}^2[-1,1]$ such that
$$ \hat A\psi(x) = x\psi(x)$$ $$ \hat B\psi(x) = -i\hbar \frac{d\psi(x)}{dx}$$
It's easy to see that $\hat A$ is bounded and self-adjoint, while $\hat B$ is unbounded. To define its adjoint, we limit $\hat B$ to the following domain $\{\psi \in \mathcal{C}^1[-1,1] \vert \psi(-1)=\psi(1)\}$. These two operators do not commute, therefore we'd expected Heisenberg uncertainty principle to hold. However, consider the family of functions $f_n(x)$ for $n\in \mathbb{Z}$
$$ f_n(x) = \frac{1}{\sqrt{2}}e^{i\pi nx}$$
which forms a basis of orthonormal eigenvectors of $\hat B$ and also belongs to Dom($\hat B$). Since they're eigenvectors, $\hat B$'s uncertainty in the state $f_n(x)$ is zero. Meanwhile, $\hat A$'s uncertainty is also well-defined and finite, perhaps we have no reason to believe it wouldn't. In other terms,
$$ \Delta_{f_{n}} \hat A \Delta_{f_{n}}\hat B = 0 $$
which is conflict with Heisenberg uncertainty principles. The reason such contradiction emerges is because $f_n(x)$ does not belong to Dom$(\hat A\hat B)\cap$Dom$(\hat B \hat A)$, as Heisenberg principle of uncertainty requires. In particular, $\hat A f_n(x)$ does not satisfy boundary conditions. However, this motivation doesn't really convince me, especially from a physical point of view. Is such a system even buildable in our universe? How would uncertainty relations really apply if we were to build it? Is it just mathematical gibberish or there's also a more concrete explanation?