# Calculating the expectation value of a Hamiltonian

I want to calculate the expectation value of a Hamiltonian. I have a wave function that is $$\psi = \frac{1}{\sqrt{5}}(1\phi_1 + 2\phi_2).$$

I want to know if I set this up properly. The Hamiltonian is $\hat H \left(x, \frac{\hbar \partial^2}{2m\partial x^2}\right)$. To get an expectation value I need to integrate this:

$$\int \psi^* \hat H \psi dx.$$

Since the wavefunctions are normalized and real I can go with $\psi^* = \psi$.

OK, so I put together the integral.

$$\int \frac{1}{\sqrt{5}}(\phi_1 + 2\phi_2)\frac{\hbar}{2m} \frac{1}{\sqrt{5}}(\phi_1'' + \phi_2'') dx=\frac{\hbar}{2m}\frac{1}5\int(\phi_1 + 2\phi_2)(\phi_1'' + 2\phi_2'')dx,$$

and I know the wavefunction for $$\phi_n = \sqrt{\frac{2}{L}}\sin\left(\frac{n\pi x}{L}\right)$$ so $$\phi_1 = \sqrt{\frac{2}{L}}\sin\left(\frac{\pi x}{L}\right)$$ and $$\phi_2 = \sqrt{\frac{2}{L}}\sin\left(\frac{2\pi x}{L}\right).$$

I can plug these in and do the integral, and I wanted to check that was the right thing to do. I suspect there is an easier method, though. But if this will work then I can say "great, I at least understand this enough to do the problem."

-
Can Jesse or someone else explain the notation for the hamiltonian? Is $\hat H = (\ldots,\ldots)$ meant to be $\hat H = \hat H (\ldots,\ldots)$? – BMS Apr 22 '14 at 2:29
It was supposed to be without the = sign. Fixed it. – Jesse Apr 22 '14 at 2:44
Use the facts: 1. $\phi_1$ and $\phi_2$ are eigenstates of $H$ and 2. They are orthogonal as their eigenvalues are distinct. No explicit computations of integrals are needed. – suresh Apr 22 '14 at 2:54
Does that mean that $\phi_1\phi_2''$ for example is zero? I saw that goes to zero when i did the integration... – Jesse Apr 22 '14 at 3:09

So here is the abstract approach:

$$\langle \psi | H | \psi \rangle = \frac{1}{5}\bigg( \langle \phi_1 | H | \phi_1 \rangle + 2\langle \phi_1 | H | \phi_2 \rangle + 2\langle \phi_2 | H | \phi_1 \rangle + 4 \langle \phi_2 | H | \phi_2 \rangle \bigg) \,.$$

Now you know that $H|\phi_1\rangle = E_1 |\phi_1 \rangle$ and $H|\phi_2\rangle = E_2 |\phi_2 \rangle$ --- or rather, you can easily check that the functions you've given are indeed eigenstates of the Hamiltonian:

$$\frac{-\hbar^2}{2m} \frac{d^2}{dx^2} \phi_n = \frac{n^2 \pi^2 \hbar^2}{2m L^2} \phi_n \equiv E_n \phi_n \,.$$

The functions $\phi_n$ are also normalised, as you can check, and are orthogonal to one another --- this must be the case, because they are the eigenfunctions of a Hermitian operator (with different eigenvalues). Hence the expression above becomes:

$$\langle \psi | H | \psi \rangle = \frac{1}{5}\bigg( E_1\langle \phi_1 | \phi_1 \rangle + 2E_2 \langle \phi_1 | \phi_2 \rangle + 2E_2\langle \phi_2 | \phi_1 \rangle + 4E_2 \langle \phi_2 | \phi_2 \rangle \bigg) \,.$$ $$\langle \psi | H | \psi \rangle = \frac{1}{5}\bigg( E_1 + 4E_2\bigg) \,.$$

Substituting in the form of the energies gives:

$$\langle \psi | H | \psi \rangle = \frac{17}{5} \frac{\pi^2 \hbar^2}{2m L^2} \,.$$

This is, to me, easier than computing the integral you've given, although the integral you've given is correct (or almost --- the Hamiltonian should have factor of $\hbar$ squared in front of the second derivative). If you tried to compute the integral, you would find a good deal of cancellation due to the orthogonality of the functions involved. If you're good at quickly spotting when an integral vanishes, e.g.:

$$\int_0^L \sqrt{\frac{2}{L}} \sin \left(\frac{\pi x}{L }\right) \sqrt{\frac{2}{L}} \sin \left(\frac{2\pi x}{L }\right) \,dx = 0$$

then the above prescription might not seem any simpler. But as far as cleanness of approach goes, it's nicer to invoke the orthogonality of the eigenfunctions --- which is a result of central importance in this kind of problem, and one which you will prove in any introductory QM course --- before delving into explicit computations.

================================================================================

NB: I anticipate that you may not have met the above notation yet. There isn't anything to it. For our purposes, just take $\langle \psi | H |\psi \rangle$ to mean

$$\int \psi^*(x) H \psi(x) \,dx \,,$$

from which you should be able to see how the first line follows. The statement that two functions are orthogonal amounts to $\langle \phi_1 | \phi_2 \rangle = 0$, whilst the statement that a function is normalised amounts to $\langle \phi_1 | \phi_1 \rangle = 1$.

-
Thanks, I run into Dirac notation and I never was able to manage it well. Weirdly I got an answer of 33/10 in my final answer but I suspect that it's a arithmetic mistake. But really I just wanted to check that I wasn't too far off the rails. And again, this helps a lot. Every QM text just jumps into Dirac; few actually explain what the notation DOES. Even profs seem to just assume everyone knows it (magically, I suppose). – Jesse Apr 22 '14 at 12:22
Oh by the way, my reasoning about $\psi^* = \psi$ (given the real-ness of the wavefunction) is ok, right? (I know that in other cases it isn't.... but I also know that the orthogonality of the $\phi$ functions eliminates a ton of stuff). – Jesse Apr 22 '14 at 12:25
Yes indeed, $\psi = \psi^*$ in this case. I agree that Dirac notation is often introduced with little motivation. The point is this: the states of a quantum mechanical system are represented by vectors in a vector space. Just as in classical mechanics we describe a system by a list of particles' positions and momenta, in QM the objects which we use to describe systems must constitute a vector space. The reason for this is that in QM we have a notion of superposition of states --- that is, we're allowed to multiply states by numbers and add them together. This is precisely what vectors are. – gj255 Apr 22 '14 at 12:44
You may be used to the vector notation $\vec{a}$ or $\mathbf{a}$, but to emphasise that these vectors are more abstract --- they're not arrows in space --- we use the notation $|a\rangle$. Certain sets of functions constitute vector spaces, and functions are the objects you typically deal with early on in QM. But in general our states may not be describable by functions; they are, however, always describable by some vector. Hence Dirac notation is really just vector notation --- linear algebra notation --- which is there to emphasise the underlying mathematical structure of the theory. – gj255 Apr 22 '14 at 12:50
thanks so much - i took linear algebra but it was all proofs, we never did anything with actual calculations (or at lest very little). I felt that was problematic though I understood why they covered what they did. – Jesse Apr 22 '14 at 18:27