[proofplan]
We conjugate the momentum operator by the unitary [Fourier transform](/page/Fourier%20Transform). On test functions, [integration by parts](/theorems/210) shows that $-i\,d/dx$ becomes multiplication by the frequency variable $\xi$. Multiplication by $\xi$ on its natural maximal domain is self-adjoint, and the inverse Fourier transform of that domain is exactly $H^1(\mathbb R)$. Finally, the density of $C_c^\infty(\mathbb R)$ in $H^1(\mathbb R)$ identifies the graph closure of $P_0$ with this self-adjoint operator, proving essential self-adjointness.
[/proofplan]
[step:Conjugate the test function operator to multiplication by frequency]
Let $\mathcal F:L^2(\mathbb R)\to L^2(\mathbb R)$ denote the unitary Fourier transform obtained by extending the map
\begin{align*}
\mathcal F:C_c^\infty(\mathbb R)\to L^2(\mathbb R), \quad (\mathcal Fu)(\xi)=(2\pi)^{-1/2}\int_{\mathbb R}u(x)e^{-ix\xi}\,d\mathcal L^1(x)
\end{align*}
from test functions. Define the multiplication operator
\begin{align*}
M_\xi:D(M_\xi)\subset L^2(\mathbb R)\to L^2(\mathbb R), \quad (M_\xi f)(\xi)=\xi f(\xi)
\end{align*}
with domain
\begin{align*}
D(M_\xi)=\{f\in L^2(\mathbb R): \xi f\in L^2(\mathbb R)\}.
\end{align*}
For $u\in C_c^\infty(\mathbb R)$ and $\xi\in\mathbb R$, [integration by parts](/theorems/2098) is valid because $u$ has compact support. The boundary term vanishes, and hence
\begin{align*}
(\mathcal F(P_0u))(\xi)=(2\pi)^{-1/2}\int_{\mathbb R}(-iu'(x))e^{-ix\xi}\,d\mathcal L^1(x)=\xi(\mathcal Fu)(\xi).
\end{align*}
Thus
\begin{align*}
\mathcal F P_0u=M_\xi\mathcal Fu
\end{align*}
for every $u\in C_c^\infty(\mathbb R)$.
[guided]
The reason for introducing the Fourier transform is that differentiation becomes multiplication. We use the unitary Fourier transform
\begin{align*}
\mathcal F:L^2(\mathbb R)\to L^2(\mathbb R)
\end{align*}
whose action on test functions is
\begin{align*}
(\mathcal Fu)(\xi)=(2\pi)^{-1/2}\int_{\mathbb R}u(x)e^{-ix\xi}\,d\mathcal L^1(x).
\end{align*}
We also define the frequency multiplication operator
\begin{align*}
M_\xi:D(M_\xi)\subset L^2(\mathbb R)\to L^2(\mathbb R), \quad (M_\xi f)(\xi)=\xi f(\xi),
\end{align*}
where
\begin{align*}
D(M_\xi)=\{f\in L^2(\mathbb R): \xi f\in L^2(\mathbb R)\}.
\end{align*}
Now fix $u\in C_c^\infty(\mathbb R)$. Since $u$ is compactly supported and smooth, the classical integration by parts formula applies on any interval containing $\operatorname{supp}u$, and the boundary term is zero because $u$ vanishes near the endpoints. Therefore
\begin{align*}
(\mathcal F(P_0u))(\xi)=(2\pi)^{-1/2}\int_{\mathbb R}(-iu'(x))e^{-ix\xi}\,d\mathcal L^1(x).
\end{align*}
Integrating by parts transfers the derivative from $u$ to the exponential:
\begin{align*}
(2\pi)^{-1/2}\int_{\mathbb R}(-iu'(x))e^{-ix\xi}\,d\mathcal L^1(x)=(2\pi)^{-1/2}\int_{\mathbb R}u(x)(-i)(i\xi)e^{-ix\xi}\,d\mathcal L^1(x).
\end{align*}
Since $(-i)(i\xi)=\xi$, this becomes
\begin{align*}
(\mathcal F(P_0u))(\xi)=\xi(\mathcal Fu)(\xi).
\end{align*}
Equivalently,
\begin{align*}
\mathcal F P_0u=M_\xi\mathcal Fu.
\end{align*}
This is the core algebraic fact of the proof: the momentum operator is Fourier-conjugate to multiplication by the real variable $\xi$.
[/guided]
[/step]
[step:Show that multiplication by $\xi$ is self-adjoint on its maximal domain]
We first verify symmetry. If $f,g\in D(M_\xi)$, then $\xi f\in L^2(\mathbb R)$ and $\xi g\in L^2(\mathbb R)$, so the products $(\xi f)\overline g$ and $f\overline{\xi g}$ lie in $L^1(\mathbb R)$ by Cauchy-Schwarz. Since $\xi$ is real-valued,
\begin{align*}
(M_\xi f,g)_{L^2}=\int_{\mathbb R}\xi f(\xi)\overline{g(\xi)}\,d\mathcal L^1(\xi)=\int_{\mathbb R}f(\xi)\overline{\xi g(\xi)}\,d\mathcal L^1(\xi)=(f,M_\xi g)_{L^2}.
\end{align*}
It remains to identify the adjoint domain. Let $g\in D(M_\xi^*)$. Then there exists $h\in L^2(\mathbb R)$ such that
\begin{align*}
\int_{\mathbb R}\xi f(\xi)\overline{g(\xi)}\,d\mathcal L^1(\xi)=\int_{\mathbb R}f(\xi)\overline{h(\xi)}\,d\mathcal L^1(\xi)
\end{align*}
for every $f\in D(M_\xi)$. Every $f\in C_c^\infty(\mathbb R)$ belongs to $D(M_\xi)$, so the preceding identity implies $\xi g=h$ as distributions on $\mathbb R$. Since $h\in L^2(\mathbb R)$, we obtain $\xi g\in L^2(\mathbb R)$, hence $g\in D(M_\xi)$ and $M_\xi^*g=M_\xi g$. Therefore $D(M_\xi^*)\subset D(M_\xi)$. Symmetry gives $M_\xi\subset M_\xi^*$, so $D(M_\xi)\subset D(M_\xi^*)$. Thus $M_\xi=M_\xi^*$.
[/step]
[step:Identify the Fourier-side domain with $H^1(\mathbb R)$]
We claim that
\begin{align*}
\mathcal F(H^1(\mathbb R))=D(M_\xi)
\end{align*}
and, for $u\in H^1(\mathbb R)$,
\begin{align*}
\mathcal F(Pu)=M_\xi\mathcal Fu.
\end{align*}
Indeed, suppose $u\in H^1(\mathbb R)$. Let $u'\in L^2(\mathbb R)$ denote its [weak derivative](/page/Weak%20Derivative). The [distributional derivative](/page/Distributional%20Derivative) identity gives
\begin{align*}
\mathcal F(u')=i\xi\mathcal Fu
\end{align*}
in $L^2(\mathbb R)$. Since $\mathcal F(u')\in L^2(\mathbb R)$, we have $\xi\mathcal Fu\in L^2(\mathbb R)$, so $\mathcal Fu\in D(M_\xi)$, and
\begin{align*}
\mathcal F(Pu)=\mathcal F(-iu')=\xi\mathcal Fu=M_\xi\mathcal Fu.
\end{align*}
Conversely, suppose $f\in D(M_\xi)$ and set
\begin{align*}
u=\mathcal F^{-1}f\in L^2(\mathbb R).
\end{align*}
Define
\begin{align*}
v=\mathcal F^{-1}(i\xi f)\in L^2(\mathbb R).
\end{align*}
For every $\varphi\in C_c^\infty(\mathbb R)$, the Fourier derivative rule on test functions and unitarity of $\mathcal F$ give
\begin{align*}
\int_{\mathbb R}u(x)\varphi'(x)\,d\mathcal L^1(x)=-\int_{\mathbb R}v(x)\varphi(x)\,d\mathcal L^1(x).
\end{align*}
Thus $v$ is the weak derivative of $u$, so $u\in H^1(\mathbb R)$. Therefore $\mathcal F(H^1(\mathbb R))=D(M_\xi)$ and $\mathcal F P\mathcal F^{-1}=M_\xi$.
[guided]
The domain of the self-adjoint multiplication operator is not arbitrary; it is exactly the Fourier image of $H^1(\mathbb R)$. We prove both inclusions.
First let $u\in H^1(\mathbb R)$. By definition, $u\in L^2(\mathbb R)$ and there exists a weak derivative $u'\in L^2(\mathbb R)$. The Fourier transform converts weak differentiation into multiplication by $i\xi$, so
\begin{align*}
\mathcal F(u')=i\xi\mathcal Fu
\end{align*}
as an identity in $L^2(\mathbb R)$. Since $\mathcal F$ is unitary and $u'\in L^2(\mathbb R)$, the function $\mathcal F(u')$ lies in $L^2(\mathbb R)$. Hence $i\xi\mathcal Fu\in L^2(\mathbb R)$, equivalently $\xi\mathcal Fu\in L^2(\mathbb R)$. This says precisely that $\mathcal Fu\in D(M_\xi)$. Moreover
\begin{align*}
\mathcal F(Pu)=\mathcal F(-iu')=-i\mathcal F(u')=-i(i\xi\mathcal Fu)=\xi\mathcal Fu=M_\xi\mathcal Fu.
\end{align*}
Conversely, let $f\in D(M_\xi)$. We must show that its inverse Fourier transform has one weak derivative in $L^2$. Define
\begin{align*}
u=\mathcal F^{-1}f\in L^2(\mathbb R).
\end{align*}
Because $f\in D(M_\xi)$, the product $\xi f$ belongs to $L^2(\mathbb R)$, so the function
\begin{align*}
v=\mathcal F^{-1}(i\xi f)
\end{align*}
also lies in $L^2(\mathbb R)$. We now verify that $v$ is the weak derivative of $u$. Let $\varphi\in C_c^\infty(\mathbb R)$. The weak derivative condition requires
\begin{align*}
\int_{\mathbb R}u(x)\varphi'(x)\,d\mathcal L^1(x)=-\int_{\mathbb R}v(x)\varphi(x)\,d\mathcal L^1(x).
\end{align*}
Using unitarity of $\mathcal F$ and the test-function identity $\mathcal F(\varphi')=i\xi\mathcal F\varphi$, this equality follows from the definitions of $u$ and $v$. Therefore $u$ has weak derivative $v\in L^2(\mathbb R)$, so $u\in H^1(\mathbb R)$. This proves $\mathcal F(H^1(\mathbb R))=D(M_\xi)$ and the operator identity $\mathcal F P\mathcal F^{-1}=M_\xi$.
[/guided]
[/step]
[step:Conclude that $P$ is self-adjoint]
Since $\mathcal F:L^2(\mathbb R)\to L^2(\mathbb R)$ is unitary and $\mathcal FP\mathcal F^{-1}=M_\xi$ with $\mathcal F(D(P))=D(M_\xi)$, the operator $P$ is unitarily equivalent to $M_\xi$. Self-adjointness is preserved under unitary equivalence. Since $M_\xi$ is self-adjoint, $P$ is self-adjoint.
[/step]
[step:Identify the closure of $P_0$ with $P$]
The operator $P_0$ is the restriction of $P$ to $C_c^\infty(\mathbb R)$, because the weak derivative of a [test function](/page/Test%20Function) equals its classical derivative. Hence $\overline{P_0}\subset P$.
We prove the reverse inclusion by graph-norm density. The graph norm of $P$ is
\begin{align*}
\|u\|_{\operatorname{graph}(P)}^2=\|u\|_{L^2(\mathbb R)}^2+\|Pu\|_{L^2(\mathbb R)}^2=\|u\|_{L^2(\mathbb R)}^2+\|u'\|_{L^2(\mathbb R)}^2=\|u\|_{H^1(\mathbb R)}^2.
\end{align*}
The space $C_c^\infty(\mathbb R)$ is dense in $H^1(\mathbb R)$. Therefore, for every $u\in H^1(\mathbb R)$, there exists a sequence $(u_k)_{k\in\mathbb N}$ in $C_c^\infty(\mathbb R)$ such that
\begin{align*}
\|u_k-u\|_{H^1(\mathbb R)}\to 0.
\end{align*}
By the graph-norm identity, this is exactly
\begin{align*}
\|u_k-u\|_{L^2(\mathbb R)}+\|P_0u_k-Pu\|_{L^2(\mathbb R)}\to 0.
\end{align*}
Thus every $u\in D(P)$ belongs to $D(\overline{P_0})$ and $\overline{P_0}u=Pu$. Hence $\overline{P_0}=P$.
[/step]
[step:Deduce essential self-adjointness]
We have shown that $P$ is self-adjoint and that $\overline{P_0}=P$. Therefore the closure of $P_0$ is self-adjoint. By definition, $P_0$ is essentially self-adjoint. This also identifies its closure as
\begin{align*}
P:H^1(\mathbb R)\subset L^2(\mathbb R)\to L^2(\mathbb R), \quad Pu=-iu'.
\end{align*}
This is the momentum operator on the real line.
[/step]