This lecture is a bit different from our other ones, in that we are going to be introducing some formalism. It is possible that the variational principle was covered in PHYS 3316, but it is so important that it bears repeating. If you took PHYS 3314/3318 last semester, then you will have seen the basic idea of variational calculus, but probably not applied it in quite this way. If you take PHYS 4443, you will see even more of this stuff. It is important.
Taking derivatives with respect to complex numbers
{\em In this section we introduce a bit of complex analysis that you might not have seen before. If you take AEP 4210 you will see more of this. We could go forward without this notation, but to be honest it would drive me crazy. This is the way real physicists deal with functions of complex variables, so you might as well learn it.}
Suppose we have a function $f(x,y)$ which we want to make stationary:
\begin{eqnarray}\label{pd}
\frac{\partial f}{\partial x}&=&0\\
\frac{\partial f}{\partial y}&=&0
\end{eqnarray}
For concreteness imagine:
\begin{equation}
f(x,y) = x^2+ y^2 + 4x -2y.
\end{equation}
We can formally think of $f$ as being a function of $z$ and $z^*$ where
\begin{eqnarray}\label{ci}
z&=&x+i y\\
z^*&=&x-i y.
\end{eqnarray}
This seems a little strange: doesn't knowing $z$ already tell you $z^*$? On a formal level, however, Eq.~(\ref{ci}) is just a linear transformation. For example, in our example function is
\begin{equation}
f=z^* z + (2+i) z+ (2-i)z^*.
\end{equation}
Here is a cool trick. If I think about $z$ and $z^*$ as independent variables, I can take derivatives with respect to them,
\begin{eqnarray}
\frac{\partial f}{\partial z^*}&=& z+(2-i)\\
\frac{\partial f}{\partial z}&=& z^*+(2+i)
\end{eqnarray}
If I set each of these equal to zero, I get $x=-2$ and $y=1$, which is the same as I would get from Eq.~(\ref{pd}).
In homework I will have you prove in general that for any function $f(x,y)$, the stationary condition is equivalent to
\begin{eqnarray}\label{vd}
\frac{\partial f}{\partial z}&=&0\\
\frac{\partial f}{\partial z^*}&=&0.
\end{eqnarray}
Moreover, if $f$ is real valued, then the second equation is equivalent to the complex conjugate of the first, and is redundent.
The energy functional
Given any function $\psi(x)$ we can construct a quantity
\begin{equation}
{\cal E}[\psi]=\langle H\rangle = \frac{\int \!\!dx\, \psi^*(x) H \psi(x)}{\int\!\!dx\,\psi^*(x)\psi(x)}.
\end{equation}
This is clearly just the expectation value of the energy, and we will call it the {\em energy functional}. We call it a {\em functional} because it is parameterized by a function: ie. it is a function of a function.
To make working with this object easier, we will use the Finite Differences approach introduced in recitation. In particular, instead of thinking of $x$ as a continuous variable, we will imagine it is discrete. Then $f$ can be thought of as a vector and $H$ as a matrix. In that representation
\begin{equation}
{\cal E }= \frac{\sum_{ij} \psi_i^* H_{ij} \psi_j}{\sum_i \psi_i^* \psi_i}.
\end{equation}
Now comes the cool part
\begin{eqnarray}
\frac{\partial{\cal E}}{\partial \psi_i^*}&=&\frac{ \sum_j H_{ij} \psi_j}{\sum_i \psi_i^* \psi_i}- \frac{\psi_i}{\sum_i \psi_i^* \psi_i}
\frac{\sum_{ij} \psi_i^* H_{ij} \psi_j}{\sum_i \psi_i^* \psi_i}\\
&=&\frac{1}{\sum_i \psi_i^* \psi_i}\left[
\sum_j H_{ij} \psi_j-{\cal E} \psi_i
\right]
\end{eqnarray}
This last equation is just the $i$'th component of $H\psi-E\psi$. Thus the Schodinger equation is equivalent to
\begin{eqnarray}\label{discretevar}
\frac{\partial{\cal E}}{\partial \psi_i^*}&=&0.
\end{eqnarray}
If we wanted to get fancy, we could then take the continuum limit (making the number of points in our finite difference approximation infinite). We would then formally write the Schrodinger equation as
\begin{eqnarray}\label{discretevar2}
\frac{\delta{\cal E}}{\delta \psi^*(x)}&=&0.
\end{eqnarray}
You will see more of this in PHYS 3314 or 3318.
Variational Approximation
This variational formulation of Schrodinger's equation is great for approximations. For example, suppose we wanted an estimate of the ground state energy of a particle in the potential $V(x)=m\omega^2 x^2/2$. [We know the exact answer here, but lets pretend we don't know it.]
What we do is we make a guess, say $\psi(x)=\exp(-|x|/(2 d))/(\sqrt{2 d})$ where $d$ will be a free parameter. By minimizing $\cal E$ with respect to $d$ we get an approximation to the ground state energy.
Complete the variational harmonic oscillator activity.
What is great, is we get an {\em upper bound} to the ground state energy. What is even better is that we can systematically improve it by just adding more variational parameters. For example, if we use $\psi(x) = (a+b x + c x^2+d x^4) \exp(-|x|/(2s))$, we would get an answer closer to the exact result. You will find that even with very primitive wavefunctions you get remarkably good results.