 Okay, so what we've seen so far is that we've introduced this idea of a variational energy where even if we can't solve Schrodinger's equation, if we have a trial function, a function that we think might be a solution to Schrodinger's equation or close to it, we can insert that trial function into this expression and that tells us something related to the energy of that trial function even though it may not be a wave function. So the other thing that we know about wave functions, if we have a set of wave functions, now these are the true wave functions that actually do solve the Schrodinger's equation for a problem, whether we know what they are or not, we know that the true wave functions, if we remember the postulates of quantum mechanics, have several properties. We can always normalize the wave function, so if we want to, we can assume that the wave functions are normalized, we can also write those wave functions in a way that they're orthogonal to one another and the postulates of quantum mechanics also tell us that those wave functions are a complete basis set, meaning specifically that any function can be written as a linear combination of these wave functions. So in particular, whatever my trial function is, there's a way to write it down as a sum of the ground state, first excited state, second excited state. If we find the right coefficients, we could write any function we like as a linear combination of these correct wave functions. And again, that may be hypothetical because if we don't know what the wave functions are, we don't know how to construct this trial function out of it, but it's at least possible in principle. This turns out to be a pretty powerful statement, however, because if we take these trial functions in the variational energy expression, so every time I see a phi, each of the four times I see a phi in this expression, I'm going to replace it with this linear combination of true wave functions, and what we'll see is that the energy of this wave function, this trial wave function, the variational energy becomes a fairly complicated expression and the numerator, phi star, becomes a sum of coefficients times wave functions, but each of those is now a complex conjugate. And then the Hamiltonian acts on the trial function again, which is again a sum of coefficients times wave functions. I'll use a different summation variable here to distinguish the sum and the first sum, which I'm using i for, and the summation and the second sum I'm using j. That's the numerator. In the denominator, it looks very similar just without the Hamiltonian. So I've got the sum of coefficients times wave functions, complex conjugate, and then the sum of coefficients times wave functions without the complex conjugate. So I've just replaced the variational trial function with its representation using the correct wave functions. Now, if I look at what I've written here, we can rearrange these sums and integrals to some degree, remembering that the Hamiltonian, of course, has some derivatives in it. So the Hamiltonian is acting on everything that comes after it. It's acting on this wave function. But in terms of the derivatives here, I don't have to worry about what that does to this linear coefficient, this just constant multiplying by the wave function. So if I, in the numerator, only bother to integrate over the things that depend on the variables, r, theta, phi, or x, y, z, or whatever variables we have, the wave functions and the Hamiltonian both depend on the coordinates of our system. So I have to keep those inside the integral. Everything else I can pull outside of the integral. So outside of the integral, I have a sum over i and a sum over j, and then two coefficients, ci and cj, one of which is complex conjugated. That's the numerator, very similar in the denominator again, just without the Hamiltonian. So I've got sum over i and sum over j that I've pulled out of the integral, ci star, cj, integral of psi i star, psi j. So all I've done in that step is rearrange the order of the sums and integrals, making sure to keep variables inside the integral and the i's and j's inside to the right of the sums in which they take place. But now that I've got it rewritten in this form, we can see that this is, we already know the answer to some portions of this integral. Remember, if a wave function is normalized and it's orthogonal to all the other wave functions, and if I have the integral of one wave function times another, that integral is either going to give me a 1 or a 0, depending on whether i and j are the same number. Integral of the ground state wave function times itself is going to give me 1. Integral of the ground state wave function times a different wave function is going to give me 0. So these are all going to be 1's and 0's in the integral and the denominator. In the numerator, let's see if I rewrite the result up here. My variational energy is going to look like, I'll go ahead and keep the double sum for one more expression. I've got the integral of psi i star. I've got coefficients that I shouldn't forget. C i star C j integral psi i star. But remember, since the psi's that we're talking about are the true wave functions, the Hamiltonian acting on wave function psi j H psi is equal to E psi. So Hamiltonian acting on psi j is just energy j times psi j. And in the denominator, I'll leave the denominator unchanged. Coefficients times this integral, which is either going to be a 1 or a 0. So that step, I've replaced the Hamiltonian with the energy because it's acting on an actual wave function. Those energies can be pulled out of the integral. Those are just constants now. When I pull those out of the integral, what's left in the numerator is also just psi i times psi j inside an integral. So a bunch of ones and zeros. If I think about the summation now, so this is a sum of all wave functions i and then also a sum of all wave functions j. If I have a psi i here, the integral, if psi j is anything other than an i, if the j is some wave function other than the psi i wave function, then this integral is going to contribute nothing. The only time this integral contributes is when the j is equal to the i. So the only term that matters in the j sum is the specific case where j equals i. And in that case, this integral will give me a 1. Likewise in the numerator, so what that means is I still have to think about the sum over all the i's. The only j term that contributes is when j is equal to i. So all my j's become i's. C i star times C j becomes C i star times C i. And I can write that as just the square, the magnitude of C i squared. The integral of psi i star times psi i, that's just a 1. And I've got an e sub j, which has now become an e sub i when I get rid of my j sum. And the denominator, I've got a sum over i C i star times C j becomes C i star times C i. And this integral becomes 1. So this result, what that says is that the energy, the variational energy of this trial function, is a weighted average of the energies of each of the true wave function energies. So it's a weighted average of the ground state energy. The first excited state energy, second excited energy, and so on. So that average of all those individual energies, that has to be at least as large as the lowest one. I could average, if I take the average, let's take the specific case of just two energies, a ground state and one excited state. If I take 100% of the ground state and none of the excited state, then I'll get back the ground state energy. If I take 50, 50, I get something that's halfway up. If I take 0% of the ground state and 100% of the excited state, I'll also get something that's higher than the ground state. No matter how I choose these coefficients, no matter what the coefficients are, then the energy of that variational function is going to be larger than, at least as large as, the ground state wave function itself. So that's going to turn out to be a pretty important statement. We've seen one example of this so far for the one-dimensional particle in a box when we calculated the energy of a trial function that was not the true solution. We got something that was 1.3% larger than the ground state, and that's kind of typical. What we've noticed is that if I don't know the true wave function, if I just guess a wave function, if I get lucky and guess the ground state wave function, what I'll get back is the energy of the ground state wave function. If I make a guess that's not correct, I'll get some different energy, but the ground state wave function energy is always giving me a lower bound on the energy that I'll get. So if I guess a trial function, calculate an energy, I don't know if it's the right energy or not, but I know it's a little bit larger than the ground state energy, or if I've guessed correctly, exactly the same as the ground state energy. So the closer my guess is to the true ground state wave function, the closer the energy will get to the ground state energy. And so that's going to turn out to be a very powerful technique for us to use in trying to understand what the energy is for problems where we can't actually solve Schrodinger's equation analytically.