Showing that Position and Momentum Operators are Hermitian I'd like to show that the position operator $ X = x$ and momentum operator $ P = \frac \hbar i \frac \partial {\partial x}$ are Hermitian/Self Adjoint when acting in the Hilbert Space $H = L^2(R)$. I would like to show this in the general case $\langle \phi |X \psi \rangle = \langle X\phi | \psi \rangle$ where $\phi, \psi \in H$, and the same for $\hat P$.
I know this can be demonstrated easily in the specific case $\langle \psi | X\psi \rangle = \langle X \psi | \psi \rangle$ using:
$$\langle \psi | \psi \rangle = \int_\infty^\infty \psi^*(x) \psi(x) \ dx = \int_\infty^\infty |\psi(x)|^2 dx$$
But I am not sure how to expand this to the general case for $\langle \phi| \psi \rangle$? I'd appreciate any help to get me on the right track
 A: For all the following integrals, the limits are from $-\infty$ to $\infty$.
Assume we are working in the position representation.
For $\hat{x}$ to be Hermitian we must show that:
$$\langle{\phi|\hat{x}\psi}\rangle=\langle{\psi|\hat{x}\phi}\rangle^*$$
LHS:
$$\langle{\phi|\hat{x}\psi}\rangle=\int{\phi^*(x\psi)dx}$$
RHS:
$$\langle{\psi|\hat{x}\phi}\rangle^*=(\int{\psi^*(x\phi)dx})^*$$
Eigenvalues of $\hat{x}$ are real, $x=x^*$:
$$\langle{\psi|\hat{x}\phi}\rangle^*=\int{\psi(x\phi^*)dx}$$
$$=\int{\phi^*(x\psi)dx}$$
$$\therefore\langle{\phi|\hat{x}\psi}\rangle=\langle{\psi|\hat{x}\phi}\rangle^*$$
Thus, $\hat{x}$ is Hermitian.
For $\hat{p}$ to be hermitian we must show the following:
$$\langle{\phi|\hat{p}\psi}\rangle=\langle{\psi|\hat{p}\phi}\rangle^*$$
LHS:
$$\langle{\phi|\hat{p}\psi}\rangle=\int{\phi^*(-i\hbar \frac{\partial\psi}{\partial x})dx}$$
RHS:
$$\langle{\psi|\hat{p}\phi}\rangle^*=(\int{\psi^*(-i\hbar \frac{\partial\phi}{\partial x})dx})^*$$
$$=\int{\psi(i\hbar \frac{\partial\phi^*}{\partial x})dx}$$
$$=i\hbar \int{\psi(\frac{\partial\phi^*}{\partial x})dx}$$
Using integration by parts gives:
$$\langle{\psi|\hat{p}\phi}\rangle^*=[\phi^*\psi]_{-\infty}^{\infty}-i\hbar \int{\phi^*(\frac{\partial\psi}{\partial x})dx}$$
Assume the wavefunctions go to zero at infinity then:
$$\langle{\psi|\hat{p}\phi}\rangle^*= -i\hbar \int{\phi^*(\frac{\partial\psi}{\partial x})dx}$$
$$= \int{\phi^*(-i\hbar\frac{\partial\psi}{\partial x})dx}$$
$$\therefore \langle{\phi|\hat{p}\psi}\rangle=\langle{\psi|\hat{p}\phi}\rangle^*$$
Thus $\hat{p}$ is Hermitian.
A: (1) Just commute $x$. You’re in the privileged basis for it.
(2) Integrate by parts, raising $\psi$ and lowering $\phi.$
