Can I conclude these weak derivatives are strong? I'm trying to show the momentum operator $P : \mathcal D(P)\ \dot{=}\ C^\infty_0(\Bbb R)\to L^2(\Bbb R)$ with $P=-i\hbar\partial_x$ is essentially self-adjoint, which is equivalent to saying that it is symmetric (densely defined, which is true because $\overline{C^\infty_0}(\Bbb R)=L^2(\Bbb R)$, and Hermitian) and $\ker(P^*\pm i 1) = \{0\}$. The momentum is symmetric because
$$\require{cancel}(\varphi|P\psi) = \int_\Bbb R \overline{\varphi(x)}(-i\hbar\partial_x\psi)(x)\ dx = \cancel{[-i\hbar \overline \varphi \psi]_{-\infty}^{+\infty}} + \int_\Bbb R \overline{-i\hbar \text{w-}\partial_x\varphi(x)}\psi(x)\ dx, $$
where $\text{w-}\partial_x$ indicates the weak derivative, and the equation holds for all $\psi \in C^\infty_0(\Bbb R)$ and $\varphi \in \mathcal D(P^*)$, which can (and should) be taken to be the maximal domain of definition, i.e. the Sobolev space
$$\mathcal D(P^*) = W^{1,2}(\Bbb R)=\{\varphi \in L^2(\Bbb R)\ |\ \text{w-}\partial_x\varphi \in L^2(\Bbb R)\}. $$
Now, to show the kernels of $P^*\pm i 1$ are trivial, I can take $\psi_\pm\in\ker(P^*\pm i1)$, which means that
$$\text{w-}\partial_x \psi_\pm(x) = \pm \frac 1 \hbar \psi_\pm(x). $$
At this point, I could proceed to ignore the $\text{w-}$ symbol and just treat the derivative as a strong derivative, so I can solve the ODE via $\psi_\pm(x) = a_\pm e^{\pm x/\hbar}$, which is $\in L^2$ iff $a_\pm = 0$ as needed. But why can I do this? The Sobolev embedding theorem only seems to guarantee that $\psi_\pm \in C^0(\Bbb R)$, which wouldn't be enough to argue that $\psi_\pm$ can be strongly differentiated.
 A: A bootstrapping argument shows that we can worry only about classical solutions: Consider the equation
\begin{equation}\tag{1}
\text{w-}\partial_x \psi= \dfrac{\psi}{h},
\end{equation}
given that $\psi \in W^{1,2}$ (the domain doesn't matter here). Since the right hand side is weakly differentiable, then so is the left and so w-$\partial_x \psi\in W^{1,2}$. This means two things:

*

*$\psi\in C^1$ by Sobolev embedding.

*We can (weakly) differentiate the equation (1) to obtain that w-$\partial_x^2\psi \in W^{1,2}$.

Now you basically iterate step 2 to conclude that w-$\partial_x^k\psi\in W^{1,2}$ for all $k\geq 0$, and by Sobolev embedding (as in step 1) $\psi\in C^\infty$.
A: Jose27's approach is probably the simplest, but I suppose someone may find another approach useful too. The main point I'd like to stress is: there's a number of ways in which one manipulate weak derivatives in the same way as strong derivatives.
$\newcommand{\R}{\mathbb{R}}$
Let's say $\psi \in W^{1,2}(\R)$ solves the ODE
$$
\psi' = \dfrac{\psi}{h}
$$
in the weak sense (I'm dropping the $\text{w-}\partial_x$ notation here). What would be your first instinct if this was a classical ODE? Chances are, you would consider the function $\gamma(x) := e^{-x/h} \psi(x)$ and argue that it is constant. The same argument works here.
The first step is showing that
$$
\gamma'(x) = -\frac 1h e^{-x/h} \psi(x) + e^{-x/h} \psi'(x) 
= -\frac 1h e^{-x/h} \psi(x) + e^{-x/h} \frac{\psi'(x)}{h} = 0,
$$
again, in the weak sense. This manipulation is quite standard, but this is how you justify it. For any $\eta \in C_c^\infty(\R)$ we have
\begin{align*}
\int \gamma(x) \eta'(x) 
& = \int e^{-x/h} \psi(x) \eta'(x) \\
& = \int \psi(x) (e^{-x/h} \eta(x))' 
+ \int \psi(x) \cdot \frac 1h e^{-x/h} \eta(x) \\
\text{(by our weak ODE)} \quad 
& = - \int \frac{\psi(x)}{h} \cdot e^{-x/h} \eta(x) 
+ \int \psi(x) \cdot \frac 1h e^{-x/h} \eta(x) \\
& = 0.
\end{align*}
Now that we know $\gamma \in W^{1,2}_{loc}(\R)$ has $\gamma' \equiv 0$ (in the weak sense), it has to be constant: $\gamma \equiv c$. In consequence, $\psi(x) = c e^{-x/h}$, as required. This step is again standard. One of the ways to see it is to consider mollifications $\gamma_\varepsilon := \gamma * \eta_\varepsilon$ with suitably chosen smooth $\eta_\varepsilon$. One checks that $\gamma_\varepsilon$ is smooth (as a convolution with a smooth function) and that $\gamma'_\varepsilon = \gamma' * \eta_\varepsilon = 0$ (this follows from the definition of weak derivatives, just as before). Then $\gamma_\varepsilon$ has to be constant (as a smooth function with zero derivative), but $\gamma_\varepsilon \to \gamma$ locally in $L^1$, hence $\gamma$ is also constant.

Side remark. It's possible that for many people the first instinct would be to consider the function $\kappa(x) := \log \psi(x)$, as this is what separation of variables yields. If only $\psi>0$ (so that the logarithm makes sense), then
$$
\kappa'(x) = \frac{\psi'(x)}{\psi(x)} = \frac 1h,
$$
and in consequence $\kappa(x) = c + \frac{x}{h}$ for some $c$, and finally $\psi(x) = e^c e^{x/h}$. To justify these calculations in the weak setting, one needs to put in some extra work to deal with the logarithm (what if $\psi(x)=0$? what if $\psi(x)<0$?), but the same can be said about the strong-derivative case, right?
