Hamiltonian in position basis Let $ H = \frac{-h^2}{2m}\frac{\partial^2 }{\partial x^2}$. I want to find the matrix elements of $H$ in position basis. It is written like this:
$\langle x \mid H \mid x' \rangle  = \frac{-h^2}{2m}\frac{\partial^2}{\partial x^2} \delta(x -x')$.
How do we get this? are we allowed to do $\langle x | \frac{\partial^2}{\partial x^2} \mid x' \rangle = \frac{\partial^2}{\partial x^2} \langle x \mid x' \rangle$?  Why? It seems some thing similar is done above. 
 A: You're given $$H=-\frac{\hbar^2}{2m}\frac{d^2}{dx^2}$$  This is an operator, so it acts on functions of x $$H\psi(x) = -\frac{\hbar^2}{2m}\frac{d^2\psi(x)}{dx^2}$$  
The LHS is just the inner product of $\langle x|$ with the new state $H|\psi \rangle$, and on the RHS, $\psi(x)$ is just the inner product of $\langle x|$ with $|\psi \rangle$, so  $$ \langle x|H|\psi \rangle  = -\frac{\hbar^2}{2m}\frac{d^2\langle x|\psi \rangle}{dx^2}$$  Subsitute the position eigenstate $|x' \rangle$ for $|\psi \rangle$ and the result follows.
A: The key here is that you can think of $\frac{\partial^2}{\partial x^2}$ as an operator acting on the $x$ variable - which, happily, does not occur in $| x^\prime \rangle$. Hence it is possible to move the operator out of the bracket (otherwise, there would be a pesky multiplication rule kicking in).
A different approach would be to calculate the eigenvalues of $H$ in the position basis rather than the matrix elements, since $H$ is diagonal in this basis, this works and the two results are equal. We then have:
$$\langle x | H | x^\prime \rangle = E_x \Psi(x) \delta(x-x^\prime) = E_x \langle x | x^\prime \rangle = H \langle x | x^\prime \rangle$$
where:


*

*the first equality is due to the diagonality of $H$ in this basis.

*the second equality is true as we can represent the wave function of a particle by $\Psi(r) = \langle r | x \rangle$.

*the third equality is the eigenvalue equation for $H$.

A: If the matrix elements of your Hamiltonian are given by $ \langle x|H|x`\rangle $.
This can be written as $\langle x|Hx`\rangle$, so if you take a complex conjugate, you end up with $\langle x`H|x\rangle$, since $H$ is hermitian. Therefore, the expression you have obtained is valid in both cases.
A: Indeed, the operator H is the sum of the kinetic energy operator and the potential energy operator. The kinetic energy operator is $$ T =\frac{P^2}{2m}
$$ other part, the operator $P$ in the x basis is $$
\langle x|P^2|x' \rangle  = -\hbar^2 \frac{d^2}{dx^2} $$
A: Wave functions of position states are Dirac delta functions:
$$| x' \rangle \leftrightarrow \varphi_{x'}(\xi) = \delta(\xi - x')$$
If we apply the Hamiltonian to the wave function, we obtain
$$\hat{H} \varphi_{x'}(\xi) = -\frac{\hbar^2}{2 m} \frac{\partial^2}{\partial \xi^2} \varphi_{x'}(\xi) = -\frac{\hbar^2}{2 m} \frac{\partial^2}{\partial \xi^2} \delta(\xi - x')$$
Finally, we take the inner product with $\langle x |$ and apply the sifting property of delta functions:
$$\langle x | \hat{H} | x' \rangle = \int \varphi_x^*(\xi) \hat{H} \varphi_{x'}(\xi) \, d \xi = -\frac{\hbar^2}{2 m} \int \delta(\xi - x) \frac{\partial^2}{\partial \xi^2} \delta(\xi - x') \, d \xi = -\frac{\hbar^2}{2 m} \frac{\partial^2}{\partial x^2} \delta(x - x')$$
A: $$<x|H|x'>=<x|-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}|x'>$$
         $$=-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}<x|x'>$$
         $$=-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}\delta(x-x').$$
