Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

DEMO: Linear Variational Method

Linearizing the problem

Basis sets and coefficients

ϕ(r)=nNcnfn(r)\phi(r) = \sum_n^N c_nf_n(r)

Gaussians are commonly used as basis sets

f(r)=eαr2f(r) = e^{-\alpha r^2}
ϕ(r)=n=1Ncneαnr2\phi(r) = \sum_{n=1}^N c_n e^{-\alpha_n r^2}

Smallest example

ϕ=c1f1+c2f2\phi = c_1f_1 + c_2f_2
Eϕ=ϕH^ϕϕϕ=c1f1+c2f2H^c1f1+c2f2c1f1+c2f2c1f1+c2f2E_\phi = \frac{\langle\phi|\hat{H}|\phi\rangle}{\langle\phi|\phi\rangle} = \frac{\langle c_1f_1 + c_2f_2|\hat{H}|c_1f_1 + c_2f_2 \rangle}{\langle c_1f_1 + c_2f_2|c_1f_1 + c_2f_2 \rangle}

Eigenvalue Problem

[S11S12S12S22]1[H11H12H12H22][c1c2]=E[1001][c1c2]\begin{bmatrix} S_{11} & S_{12} \\ S_{12} & S_{22} \end{bmatrix}^{-1}\begin{bmatrix} H_{11} & H_{12} \\ H_{12} & H_{22} \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = E \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix}

Example: Particle in a Box

H^=22md2dx2\hat{H} = -\frac{\hbar^2}{2m}\frac{d^2}{dx^2}
ψ(x)c1x(ax)+c2x2(ax)2\psi(x) \approx c_1x(a-x) + c_2x^2(a-x)^2
Hij=fiH^fjH_{ij} = \langle f_i|\hat{H}|f_j\rangle
Sij=fifjS_{ij} = \langle f_i|f_j\rangle
H=2a3m[16a230a230a4105]\mathbf{H} = \frac{\hbar^2a^3}{m} \begin{bmatrix} \frac{1}{6} & \frac{a^2}{30}\\ \frac{a^2}{30} & \frac{a^4}{105} \end{bmatrix}
S=a510[13a214a214a463]\mathbf{S} = \frac{a^5}{10} \begin{bmatrix} \frac{1}{3} & \frac{a^2}{14}\\ \frac{a^2}{14} & \frac{a^4}{63} \end{bmatrix}

So we see that the smallest energy in this basis is

Eϕ=4.93492mE_\phi = 4.9349 \frac{\hbar^2}{m}

How does this compare to the analytic solution? Plugging in for the ground state, n=1n=1, and a=1a=1 we get

E1=π2224.93482mE_1 = \frac{\pi^2\hbar^2}{2} \approx 4.9348 \frac{\hbar^2}{m}

So we can see that our variational solution worked out well for the energy. Now how about the wavefunction?