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

Open in Colab
Source

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+c2f2∣H^∣c1f1+c2f2⟩⟨c1f1+c2f2∣c1f1+c2f2⟩E_\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(a−x)+c2x2(a−x)2\psi(x) \approx c_1x(a-x) + c_2x^2(a-x)^2
Hij=⟨fi∣H^∣fj⟩H_{ij} = \langle f_i|\hat{H}|f_j\rangle
Sij=⟨fi∣fj⟩S_{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}
Eigenvalues: [ 4.93487481+0.j 51.06512519+0.j]
First eigenvector: [-0.66168489 -0.74978204]

So we see that the smallest energy in this basis is

Eϕ=4.9349ℏ2mE_\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=π2ℏ22≈4.9348ℏ2mE_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?

<Figure size 960x720 with 1 Axes>