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.

The Schrödinger Equation and the Wavefunction

The exciting journey into the microscopic world

SE-intro

Figure 1:You are now entering the quantum world. Proceed with caution.

What do we require from the new quantum theory?

SE-intro

Figure 2:Schrödinger had to accept that electrons are correctly described by wave functions.

Quantum wave equation

Ψ(x,t)=Aei(kxωt)\Psi(x,t) = Ae^{i(kx-\omega t)}
Ψ(x,t)=Aei(pxEt)\Psi(x,t)=Ae^{\frac{i}{\hbar}(px-E t)}

From Quantum Wave Function to Quantum Wave Equation

Ψ(x,t)t=iEΨ(x,t)\frac{\partial \Psi(x,t)}{\partial t} = -\frac{i}{\hbar} E \Psi(x,t)
Ψ(x,t)x=ipΨ(x,t)\frac{\partial \Psi(x,t)}{\partial x} = \frac{i}{\hbar} p \Psi(x,t)
2Ψ(x,t)x2=p22Ψ(x,t)=2m(EV)2Ψ(x,t)\frac{\partial^2 \Psi(x,t)}{\partial x^2} = -\frac{p^2}{\hbar^2} \Psi(x,t) = -\frac{2m(E - V)}{\hbar^2} \Psi(x,t)

Quantum vs Classical Wave equation

SE-intro

Figure 3:Dissecting the Schrödinger equation, using the 1D version for simplicity.

Separation of Variables and the Time-Independent Schrödinger Equation

From the equation to its meaning

We now have the equation and a strategy for solving it. What we do not yet have is the meaning of the object the equation keeps handing us. This half of the lecture answers that question and turns ψ\psi into numbers an experiment can check.

What is the meaning of a wave-function ψ\psi ?

Probability Refresher

Random Variables

Probability Distributions

Further Exploration

Source
import matplotlib.pyplot as plt
import numpy as np

# Discrete probabilities (fair dice)
outcomes = np.arange(1, 7)
probs = np.ones_like(outcomes) / 6

plt.bar(outcomes, probs)
plt.xlabel("Dice outcome")
plt.ylabel("Probability")
plt.title("PMF of a Fair Die")
plt.show()
<Figure size 640x480 with 1 Axes>
Source
# -----------------------------
# Correct sampling for H-atom 1s
# -----------------------------
N = 6000
a0 = 1.0

# For 1s: if x = 2r/a0, then x ~ Gamma(k=3, theta=1)
x = np.random.gamma(shape=3.0, scale=1.0, size=N)
r = 0.5 * a0 * x

# Isotropic angles
u = np.random.rand(N)
theta = np.arccos(1 - 2*u)
phi = 2*np.pi*np.random.rand(N)

# Convert to Cartesian and take a 2D projection
x3 = r * np.sin(theta) * np.cos(phi)
y3 = r * np.sin(theta) * np.sin(phi)

# Histogram for the shell probability density P(r) (per unit r)
bins = np.linspace(0, 6*a0, 80)
hist, edges = np.histogram(r, bins=bins, density=True)
centers = 0.5*(edges[1:] + edges[:-1])

# Analytical radial distribution P(r) = 4 r^2 |psi|^2 = 4 r^2 / (a0^3*pi) * exp(-2r/a0) * pi
# Simplifies to: P(r) = (4/a0^3) r^2 exp(-2r/a0), which integrates to 1
rr = np.linspace(0, bins[-1], 400)
P_r = (4.0/(a0**3)) * rr**2 * np.exp(-2*rr/a0)

# Side-by-side subplots: dot cloud and radial distribution

fig, axs = plt.subplots(1, 2, figsize=(12, 5))

# Left: simulated dot cloud
axs[0].scatter(x3, y3, s=1, alpha=0.5)
axs[0].set_title("Hydrogen 1s: position observations (2D projection)")
axs[0].set_xlabel("x [$a_0$]")
axs[0].set_ylabel("y [$a_0$]")
axs[0].set_aspect('equal')

# Right: radial distribution histogram + analytical curve
axs[1].plot(centers, hist, lw=2, label="Monte Carlo (histogram)")
axs[1].plot(rr, P_r, lw=2, linestyle="--", label="Analytical 1s")
axs[1].set_title("Radial probability distribution")
axs[1].set_xlabel("r [$a_0$]")
axs[1].set_ylabel("$P(r)$")
axs[1].legend()

plt.tight_layout()
plt.show()
<Figure size 1200x500 with 2 Axes>

Normalization of wavefunction

Source
import numpy as np
import matplotlib.pyplot as plt

# Define x values
x = np.linspace(0, 1, 500)

# Unnormalized psi
psi_unnorm = x
psi2_unnorm = psi_unnorm**2

# Normalized psi (C = sqrt(3))
psi_norm = np.sqrt(3) * x
psi2_norm = psi_norm**2

# Compute integrals for annotation
area_unnorm = np.trapezoid(psi2_unnorm, x)
area_norm = np.trapezoid(psi2_norm, x)

# Create the figure and axes
fig, axes = plt.subplots(1, 2, figsize=(12, 5))

# --- Plot 1: Unnormalized psi² ---
axes[0].fill_between(x, psi2_unnorm, alpha=0.4, color="blue")
axes[0].set_title("Unnormalized $|\psi(x)|^2$")
axes[0].set_xlabel("x")
axes[0].set_ylabel(r"$|\psi(x)|^2$")
axes[0].grid(True)
axes[0].text(0.5, 0.2, rf"Area = {area_unnorm:.2f}", 
             transform=axes[0].transAxes, fontsize=12, color="blue")

# --- Plot 2: Normalized psi² ---
axes[1].fill_between(x, psi2_norm, alpha=0.4, color="green")
axes[1].set_title("Normalized $|\psi(x)|^2$")
axes[1].set_xlabel("x")
axes[1].set_ylabel(r"$|\psi(x)|^2$")
axes[1].grid(True)
axes[1].text(0.5, 0.2, rf"Area = {area_norm:.2f}", 
             transform=axes[1].transAxes, fontsize=12, color="green")

plt.tight_layout()
plt.show()
<>:24: SyntaxWarning: invalid escape sequence '\p'
<>:33: SyntaxWarning: invalid escape sequence '\p'
<>:24: SyntaxWarning: invalid escape sequence '\p'
<>:33: SyntaxWarning: invalid escape sequence '\p'
/tmp/ipykernel_2783/3267431332.py:24: SyntaxWarning: invalid escape sequence '\p'
  axes[0].set_title("Unnormalized $|\psi(x)|^2$")
/tmp/ipykernel_2783/3267431332.py:33: SyntaxWarning: invalid escape sequence '\p'
  axes[1].set_title("Normalized $|\psi(x)|^2$")
<Figure size 1200x500 with 2 Axes>

What can we do with probability distribution functions (PDF)?

The Mathematical Language of Quantum Mechanics: Operators

SE-intro

Figure 4:Analogy of operators with ordinary functions.

Linear operators

A^[c1f1(x)+c2f2(x)]=c1A^f1(x)+c2A^f2(x)\hat{A}[c_1 f_1(x)+c_2f_2(x)]= c_1 \hat{A}f_1(x)+c_2 \hat{A}f_2(x)

Schrödinger equation in operator notation

The correspondence principle of Quantum Mechanics

ObservablesClassicalQuantum
Positionxxx^=x\hat{x}=x
Momentump=mvp=mvp^=ix\hat{p}=-i\hbar \frac{\partial}{\partial x}
Potential EnergyV(X)V(X)V^=V(x)\hat{V}=V(x)
Kinetic EnergyK=p22mK=\frac{p^2}{2m}K^=p^22m\hat{K}=\frac{\hat{p}^2}{2m}
Total EnergyH(x,p)=p22m+V(x)H(x,p)=\frac{p^2}{2m}+V(x)H^=K^+V^\hat{H}=\hat{K}+\hat{V}
Equation of motionNewton’s law F=maF=ma
or Hamiltons equations
H^ψ=Eψ\hat{H}\psi=E\psi Or
iψt=H^ψi\hbar\frac{\partial \psi}{\partial t}=\hat{H}\psi
Quantization and wave-particle duality?N/AEnergy quantization and duality are
naturally described by EnE_n and ψn\psi_n.

What about quantities which correspond to operators?

x=x1p2+x2p2+...\langle x \rangle = x_1 p_2+x_2 p_2 + ...
x=xp(x)dx\langle x \rangle = \int x\cdot p(x) dx
f=f(x)p(x)dx\langle f \rangle = \int f(x) \cdot p(x) dx
A=A^p(x)dx=ψ(x)A^ψ(x)dx\langle A \rangle = \int \hat{A} p(x) \cdot dx = \int \psi^{*}(x) \cdot \hat{A} \psi(x) \cdot dx
Average quantityCorresponding operator
E=ψ(x)H^ψ(x)dx\langle E \rangle=\int \psi^{*}(x) \hat{H} \psi(x) dxH^=22md2dx2+V(x)\hat{H}=-\frac{\hbar^2}{2m}\frac{d^2}{dx^2}+V(x)
K=ψ(x)K^ψ(x)dx\langle K \rangle=\int \psi^{*}(x) \hat{K}\psi(x) dx K^=22md2dx2\hat{K}=-\frac{\hbar^2}{2m}\frac{d^2}{dx^2}
p=ψ(x)p^ψ(x)dx\langle p \rangle=\int \psi^{*}(x) \hat{p} \psi(x) dxp^=iddx\hat{p}=-i\hbar\frac{d}{dx}
p2=ψ(x)p^2ψ(x)dx\langle p^2 \rangle=\int \psi^{*}(x) \hat{p}^2 \psi(x) dxp^2=2d2dx2\hat{p}^2=-\hbar^2\frac{d^2}{dx^2}
Source
import numpy as np
import matplotlib.pyplot as plt
from math import erf, sqrt

# ----- Parameters -----
sigma = 1.0  # width of the Gaussian (harmonic oscillator ground state)
x0, x1 = -1.0, 1.0  # interval to integrate over

# ----- Define |psi(x)|^2 for a normalized Gaussian -----
def prob_density(x, sigma):
    # |psi(x)|^2 = (1/(sqrt(2*pi)*sigma)) * exp(-x^2/(2*sigma^2))
    return (1.0/(np.sqrt(2*np.pi)*sigma)) * np.exp(-x**2/(2*sigma**2))

# Probability via the error function (analytic CDF of a normal distribution)
def interval_probability(a, b, sigma):
    return 0.5*(erf(b/(sqrt(2)*sigma)) - erf(a/(sqrt(2)*sigma)))

P = interval_probability(x0, x1, sigma)

# ----- Plot -----
xs = np.linspace(-4*sigma, 4*sigma, 800)
ys = prob_density(xs, sigma)

fig = plt.figure(figsize=(10, 5))

# Title with the integral expression
plt.title(r"$P_{x_0<x<x_1}=\int_{x_0}^{x_1}|\psi(x)|^2\,dx$" + 
          f"\nSelected interval: [{x0:.2f}, {x1:.2f}]",
          loc="left")

# Curve
plt.plot(xs, ys, linewidth=3)

# Shade between x0 and x1 under the curve
mask = (xs >= x0) & (xs <= x1)
plt.fill_between(xs[mask], ys[mask], 0, alpha=0.25)

# Mark the boundaries with vertical dashed lines
plt.axvline(x0, linestyle="--", linewidth=2)
plt.axvline(x1, linestyle="--", linewidth=2)

# Tick marks and labels
plt.xlabel("x")
plt.ylabel(r"$|\psi(x)|^2$")

# Annotate the probability
plt.text(0.02, 0.90, rf"$P_{{{x0:.2f}<x<{x1:.2f}}} = {P:.3f}$",
         transform=plt.gca().transAxes, fontsize=16)

plt.xlim(xs.min(), xs.max())
plt.ylim(bottom=0)
plt.grid(True, alpha=0.3)
plt.tight_layout()

plt.show()
<Figure size 1000x500 with 1 Axes>

Linearity and the Principle of Superposition

ψ(x,t)=ncnψn(x)fn(t)\psi(x,t) = \sum_n c_n \psi_n(x) f_n(t)

Eigenvalues and Eigenfunctions

eigval-func

Figure 5:Eigenvalue/Eigenfunction problem

Examples of using probabilistic calculations in QM

Example 1: Probability in a region (1D)

Take the normalized wavefunction on [0,1][0,1]: ψ(x)=3x\psi(x)=\sqrt{3}\,x. Then p(x)=ψ(x)2=3x2p(x)=|\psi(x)|^2=3x^2.

P(a<x<b)=ab3x2dx=[x3]ab=b3a3.P(a<x<b)=\int_a^b 3x^2\,dx= \left[x^3\right]_a^b=b^3-a^3.
P(0.3<x<0.6)=0.630.33=0.2160.027=0.189.P(0.3<x<0.6)=0.6^3-0.3^3=0.216-0.027=0.189.

Example 2: 3D slice probability (separable state)

Let ψ(x,y,z)=27xyz\psi(x,y,z)=\sqrt{27}\,xyz on the unit cube [0,1]3[0,1]^3 (this is normalized since ψ2=27x2y2z2|\psi|^2=27x^2y^2z^2 and 01x2dx=13\int_0^1 x^2dx=\tfrac13, so 27(13)3=127(\tfrac13)^3=1).

P=axbx ⁣ ⁣ayby ⁣ ⁣azbz27x2y2z2dzdydx=(bx3ax3)(by3ay3)(bz3az3).P=\int_{a_x}^{b_x}\!\!\int_{a_y}^{b_y}\!\!\int_{a_z}^{b_z}27x^2y^2z^2\,dz\,dy\,dx = \big(b_x^3-a_x^3\big)\big(b_y^3-a_y^3\big)\big(b_z^3-a_z^3\big).

Example 3: Averages and variance from a PDF

For ψ(x)=3x\psi(x)=\sqrt{3}\,x on [0,1][0,1] (so p(x)=3x2p(x)=3x^2):

x=01x3x2dx=301x3dx=34.\langle x\rangle=\int_0^1 x\,3x^2\,dx=3\int_0^1 x^3dx=\tfrac34.
x2=01x23x2dx=301x4dx=35.\langle x^2\rangle=\int_0^1 x^2\,3x^2\,dx=3\int_0^1 x^4dx=\tfrac35.
Var(x)=x2x2=35(34)2=380,σx=3800.1937.\mathrm{Var}(x)=\langle x^2\rangle-\langle x\rangle^2=\tfrac35-\Big(\tfrac34\Big)^2=\tfrac{3}{80},\qquad \sigma_x=\sqrt{\tfrac{3}{80}}\approx 0.1937.

Example 4: Operator expectations (momentum/energy in a box)

Operator rules:

Use the infinite square well on [0,1][0,1] with V(x)=0V(x)=0 inside and ψn(x)=2sin(nπx)\psi_n(x)=\sqrt{2}\sin(n\pi x), which is normalized.

p=01ψn(i)ψndx=0\langle p\rangle=\int_0^1\psi_n^*(-i\hbar)\psi_n'\,dx=0

(the integrand is odd over a full sine half-wave, or integrate by parts with vanishing boundary terms).

p2=01ψn(2)ψndx=(nπ)2.\langle p^2\rangle=\int_0^1\psi_n^*(-\hbar^2)\psi_n''\,dx =(n\pi\hbar)^2.
E=p22m=(nπ)22m.\langle E\rangle=\frac{\langle p^2\rangle}{2m}=\frac{(n\pi\hbar)^2}{2m}.

Problems

Problem 1

Confirm that the following wavefunctions are eigenfunctions of linear momentum and kinetic energy (or neither or both):

Problem 2: Taking the Square of an Operator

Consider the operator A^=xddx \hat{A} = x \frac{d}{dx} . Find A^2 \hat{A}^2 , i.e., A^(A^f(x)) \hat{A}(\hat{A}f(x)) , and apply it to an arbitrary function f(x) f(x) .

Problem 3: Verifying Eigenfunction and Eigenvalue

Consider the operator B^=iddx \hat{B} = -i\hbar \frac{d}{dx} (momentum operator). Verify that f(x)=eikx f(x) = e^{ikx} is an eigenfunction of B^ \hat{B} , and find the corresponding eigenvalue.

Problem 4: Testing for an Eigenfunction and Eigenvalue

Given the operator C^=d2dx2 \hat{C} = \frac{d^2}{dx^2} (second derivative operator), check if f(x)=eαx2 f(x) = e^{-\alpha x^2} is an eigenfunction of C^ \hat{C} , and find the eigenvalue if it is.

Problem 5: Linearity and Eigenfunction Testing

Consider the operator D^=x2ddx \hat{D} = x^2 \frac{d}{dx} . Show whether this operator is linear and check if f(x)=xn f(x) = x^n is an eigenfunction of D^ \hat{D} .

Problem 6: Normalize and locate

Normalize ψ(x)=cos(πx/2)\psi(x) = \cos(\pi x / 2) on the interval [1,1][-1, 1], then compute the probability of finding the particle in [0,12][0, \tfrac{1}{2}].

Problem 7: Symmetry does the integrals

For the particle-in-a-box state ψ2(x)=2sin(2πx)\psi_2(x) = \sqrt{2}\sin(2\pi x) on [0,1][0, 1], evaluate x\langle x \rangle and p\langle p \rangle, and explain both results using symmetry alone.