Skip to main content
Chemistry LibreTexts

Variation Approximation for the Particle in a Box (Worksheet)

  • Page ID
    40227
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Name: ______________________________

    Section: _____________________________

    Student ID#:__________________________

    Work in groups on these problems. You should try to answer the questions without referring to your textbook. If you get stuck, try asking another group for help.

    Step 1: Define Potential

    A particle with mass \(m_{eff}\) is confined to move in one dimension under the potential

    \[V(x) = 0\;if\; \dfrac{-L}{2} < x < \dfrac{L}{2}\]

    \[ V(x) = 0 \; otherwise\]

    Step 2: Define Appropriate Schrödinger Equation

    Since the potential is time independent, the time dependence of the wavefunction can be ignored and the time-independent Schrödinger equations can be used. The Schrödinger's equation for this system is


    wpe13.gif (2141 bytes)

    Use the variation principle to find approximate eigenvalues and eigenfunctions for a trial function having the form of a polynomial summation.

    Dimensionless Form (to make things easy)

    With a little effort the Schrödinger equation can be transformed into an equivalent but simpler equation without units. The new dimensionless Schrödinger equation applies to all PIB systems regardless of the particle mass or the length of the box. First, remove the units of length by defining \(x=yL/2\) for the potential is zero when \(-1<y<1\) and infinite outside this range. Thus, the box is referenced to dimensionless coordinate \(y\) and has been standardized to length 2 with the center at \(y=0\). This change of coordinates induces a change of the wave function: \(u(y) = y(yL/2)\). Second, introduce the "natural" or characteristic energy

    \[ E_{natural} = \dfrac{\hbar^2 \pi^2}{2 m_{eff} L^2} \]

    and divide both sides of Schrödinger's equation by this amount. The result is the following dimensionless Schrödinger equation:


    wpe17.gif (2071 bytes),

    where \(\epsilon=\frac{E}{E_{natural}}\).

    Notice that the dimensionless Schrödinger equation contains no memory of the particle mass or the box length - this information is contained in the coordinate transformation \(x=yL/2\) and the natural energy. The goal will be to solve the dimensionless form of the problem and then restore units for the particular mass and box at the end.

    This approach is not needed to solve the problem, but removes those pesty constants until they need to be evaluated at the end.

    Step 3: Solve the Schrödinger Equation

    While we can solve this Schrödinger equation exactly as discuss before, here we will "solve" the Schrödinger equation with the Linear Variational Method approximation (i.e., a basis).

    \[ | \varphi \rangle = \sum_i^n f_i(x) \]

    It is crucial that the basis sets satisfies the boundary conditions of the problem. With this in mind, some possible variational trial functions that might be part of a basis are

    \[\{f_1(y)\}=(y-1)(y+1)\]

    \[\{f_2(y)\}=\cos\left(\dfrac{py}{2}\right)\]

    \[\{f_3(y)\}=cosh(y)-cosh(1)\]

    In general, to perform the linear variation we require a large set of linearly independent trial functions.

    Select the Basis Set (Trial Wavefunction)

    As an example, here is such a set generalized from \(\{f_1(y)\}\):

    \[ \{ f_n(y)\} = (y-1)^{M-n+1} (y+1)^{n+1}\]

    with \(n=0,1,...,M\).

    For instance, for a three component basis set (\(M=2\)) of this specific basis:

    \[f_0=(y-1)^3(y+1), \]

    \[f_1=(y-1)^2(y+1)^2\]

    \[f_2=(y-1)(y+1)^3. \]

    Ultimately, the basis functions are chosen for reasons of simplicity, convenience, and\or aesthetics.

    Note

    Basis functions are only useful if the required overlap and Hamiltonian matrix elements (integrals) can be readily computed. We illustrate using the example basis.

    Calculate the Overlap Matrix Elements

    Elements of the overlap matrix are computed from the definition

    \[ S_{ij} = \langle \varphi_i (y) | \varphi_j(y) \rangle = \int _{-1}^{1} \varphi_i(y) \varphi_j(y) dy\]

    so nine overlap integrals needs to be evaluated

    \(S\) \(f_0(x)\) \(f_1(x)\) \(f_2(x)\)
    \(f_0(x)\) \(S_{00}= \langle f_0 | f_0 \rangle\) \(S_{01}= \langle f_0 | f_1 \rangle\) \(S_{02}= \langle f_0 | f_0 \rangle\)
    \(f_1(x)\) \(S_{10}= \langle f_1 | f_0 \rangle\) \(S_{11}= \langle f_1 | f_1 \rangle\) \(S_{12}= \langle f_1 | f_2 \rangle\)
    \(f_2(x)\) \(S_{20}= \langle f_2 | f_0 \rangle\) \(S_{21}= \langle f_2 | f_1 \rangle\) \(S_{22}= \langle f_2 | f_2 \rangle\)

    For the polynomial basis functions of the example, this is straightforward though tedious. For example to calculate the \(S_{01}\) element

    \[S_{01}= \langle f_0 | f_1 \rangle\]

    \[= \int _{-1}^{1} f_0 f_1 dy\]

    \[=\int _{-1}^{1} (y-1)^3(y+1) (y-1)^2 (y+1)^2 dy\]

    \[=\int _{-1}^{1} (y-1)^5(y+1)^3 dy\]

    Both basis functions can be expressed in a binomial expansion the the powers of \(y\) can be integrated term by term. From the definition, it follows that the overlap matrix has to be symmetric: \(S_{ij} = S_{ji}\) for our example (so almost half of the elements in the above matrix do not need to be solved.

    Calculate the Hamiltonian Matrix Elements

    Elements of the Hamiltonian matrix are computed from

    \[H_{ij} = \langle \varphi_i | H | \varphi_j \rangle = \int_{-1}^{1} \varphi_i^* (y) \dfrac{4}{\pi^2} \dfrac{d^2}{dy^2} \varphi_j (y) dy \]

    This time, the second derivative of basis functions has to be computed and again nine integrals performed. For our example, the derivatives are polynomials in \(y\) so that the matrix element evaluation is straightforward. As a check, the Hamiltonian matrix also is symmetric: \(H_{ij} = H_{ji}\) since it is Hermitian.

    \(\hat{H}\) \(f_0(x)\) \(f_1(x)\) \(f_2(x)\)
    \(f_0(x)\) \(H_{00}= \langle f_0 | \hat{H} f_0 \rangle\) \(H_{01}= \langle f_0 | \hat{H}| f_1 \rangle\) \(H_{02}= \langle f_0 |\hat{H}| f_2 \rangle\)
    \(f_1(x)\) \(H_{10}= \langle f_1 | \hat{H} | f_0 \rangle\) \(H_{11}= \langle f_0 | \hat{H}| f_1 \rangle\) \(H_{12}= \langle f_1 |\hat{H}| f_2 \rangle\)
    \(f_2(x)\) \(H_{20}= \langle f_2 | \hat{H} | f_0 \rangle\) \(H_{21}= \langle f_0 | \hat{H}| f_1 \rangle\) \(H_{22}= \langle f_2 |\hat{H}| f_2 \rangle\)

    Numerical values of \(S_{ij}\) and \(H_{ij}\) are compiled in the complete solution file.

    Secular Equations and Secular Determinant

    Eigenvalues are found from solving the secular determinant:

    \[ | H_{ik}–ES_{ik}| = 0 \]

    In general, this is a M-th order polynomial with M roots. Denote these roots by \(E_0<E_1<...E_M\). For the ground state, the smallest root, \(E_0\), is used. Higher roots are bounds for excited states.

    For the example, with \(M=3\) (four basis functions) the lowest root is 1.00001471 (an error of only ~15 ppm from the exact ground state energy).

    Wave functions are found by solving the secular equation:

    \[ | H–E_iS|a_i = 0 \]

    and substituting the eigenvector into the basis expansion:

    \[ | \varphi_i(y) \rangle = \sum_{j=0}^M a_{ij} f_i(y) \]

    Note that the vector \(a_i\) is labeled for its eigenvalue and its elements also carry a label for the basis function. The collection of \(a_{i,j}\) comprise a square matrix the columns of which are the the eigenvectors belonging to \(E_i\). For the example, see the calculated \(S\) and \(H\) matrices in the solution file.

    Step 4: Do Something with the Solutions

    After approximating the eigenstates and eigenenergies, we do something with the solutions. We instead discussed the accuracy of the approximation since we have the true analytical solution.

    Errors in the variational approximation can be assessed in several ways.

    • When the exact solution is known, a direct comparison of energy eigenvalues is possible.
    • Again, if the exact solution is known, graphical comparison of approximate and exact wave functions is possible.
    • For linear variation trial functions, convergence of energy values can be determined through gradually increasing the basis size.
    • The local energy function, defined as \(e(x) = \frac{H \varphi(x)}{\varphi(x)}\), is constant if and only if \(\varphi(x)\) is the true eigenfunction. Hence, for approximate functions a graph of \(e(x)\) reveals the departure from an exact solution.

    Wavefunction Comparison

    Ground state wave functions are compared in the following graphs. The first graph shows the approximate variational wave function (after solving the variational methods) \(\varphi(x)\)) for \(M=3\) and the exact wave function. To the eye, there is no difference between approximate and exact solutions. The second graph shows the relative error of the trial function. The sign of the trial function was reversed in these plots. Overall wave function sign (phase) has no physical significance since the wavefunction actually is oscillating in time (but ignored in the time-independent approach above). Here the relative error of the trial function are obvious; it is largest near the ends of the box where \(\varphi(y)\) is small and < 0.2% throughout most of the box.

    wpe20.gif (5174 bytes)

    Local Energy Function

    According to the Schrödinger equation, the quotient function defined as \(\frac{H \varphi(x)}{\varphi(x)} = E\) is a constant. But for a trial function the corresponding quotient, \(e(x) = \frac{H\varphi(x)}{\varphi(x)}\) may vary across the box. This function is called the "local energy" function. Any departure from constant value reveals an error in the trial function. For example, when \(M=3\) the local energy function is graphed below.

    wpe1F.gif (3674 bytes)

    For the dimensionless problem this local energy deviates from \(E_{true}(=1)\) most greatly near the ends of the box and stays within about 3% of \(E_{true}\) through most of the box. [This solution was created using mathcad. The solution file is available for downloading. It can easily be extended to a larger basis. Minor changes in the mathcad solution allow the potential to be "decorated"; e.g., a central well (or barrier) can be added to the box.]

    Note: Lower bounds

    There are other ways to assess the errors in a trial variational function. Since the variation principle provides an upper bound to the true energy, it is natural to seek a lower bound to bracket the exact energy. Such lower bounds can be found but often they exaggerate the size of the error. One such lower bound method is due to Temple [G. Temple, Proc. Roy. Soc., A119, 276 (1928)] and involves computing matrix elements of the square of the Hamiltonian (a computationally laborious process).

    Problems

    1. For the example problem, plot the trial wave function for the first excited state in the box, and the relative error of this state function.
    2. Trial functions don't have to be polynomials. Calculate the variational energy from the trial function f3(y)=cosh(ay)-cosh(a) wherea is a variable parameter. Hint: The Rayleigh quotient is indeterminate at a=0. Make a graph of W(a) versus a (near but not including a=0) to estimate the minimum of W. Use L'Hospital's rule to determine the minimum. How big is the error in this trial energy?
    3. Symmetry was ignored in the treatment of the example on this page. To consider symmetry, answer the following:
      (a) Show that fn(-y) = (-1)M fM-n(y) . Hence, also that fM-n(-y)= (-1)Mfn(y). Finally, show that the sum and differences fn(y) fM-n(y) are either even parity or odd parity depending on M.
      (b) Examine the linear coefficients of the ground state trial function in the example. Namely, consider the expansion coefficients a0 = -0.166284, a1 = 0.687277, a2 = -0.687277, a3 = 0.166284 for M=3. Explain the magnitudes and signs in light of symmetry.
    4. Use the following basis set for a linear variational treatment of the PIB: fn(y) = (y2-1)n, n=1,2,...,M. (a) Calculate the variational energy and wave function of the ground state for M=1,3,5. (b) Analyse the errors in these variational results.

    References

    • A. Das and A. C. Melissinos, Quantum Mechanics [Gordon and Breach, 1986], p. 332ff.
    • I. N. Levine, Quantum Chemistry [Prentice Hall, 1991], p. 189ff.
    • Additional references.

    Contributors and Attributions

    • R.D. Poshusta

    This page titled Variation Approximation for the Particle in a Box (Worksheet) is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Nancy Levinger.