8.6: Variational Method in MAPLE
- Page ID
- 28793
\( \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}}\)
The variational method is exceptionally well suited to computer algebra packages such as maple. The procedure is as follows:
- Define Trial wavefunction \(\Phi\)
- Evaluate Normalization factor \(|c^2 | = \langle \Phi |\Phi \rangle \)
- Evaluate unnormalised kinetic energy \(\langle T \rangle = −\hbar^2 \langle \Phi |\nabla^2 |\Phi \rangle /2m\)
- Evaluate unnormalised potential energy \(\langle V \rangle = \langle \Phi |\hat{V} |\Phi \rangle\)
- Differentiate with respect to variational parameters \(D_{a_n} = \frac{d}{da_n} (\langle T \rangle + \langle V \rangle )/c^2\)
- Solve \(D_{a_n} = 0\) for all \(a_n\)
- Substitute optimal value for \(a_n\) into \(\Phi\).
- Evaluate \([\langle T \rangle + \langle V \rangle ]/c^2\) using optimised wavefunction.
If one needs to do another variational calculation for a different potential and trial wavefunction, only definitions 1 and 3 need to be changed.