psi(n) = 1 / sqrt(2^n n!) (m omega / (pi hbar))^(1/4) * H(n, x sqrt(m omega / hbar)) * exp(-m omega x^2 / (2 hbar) - i (n + 1/2) omega t) -- Hermite polynomial (z is a local variable) H(n,y,z) = (-1)^n exp(y^2) eval(d(exp(-z^2),z,n),z,y) "Wave function" psi1 = eval(psi(1), x, xa, t, 0) psi1 -- propagator K = sqrt(m omega / (2 pi i hbar sin(omega t))) * exp(i m omega / (2 hbar sin(omega t)) * ((xb^2 + xa^2) cos(omega t) - 2 xb xa)) -- decomposition of K psi1 A = -i m omega exp(i omega t) / (2 hbar sin(omega t)) B = -i m omega xb / (hbar sin(omega t)) C = i m omega xb^2 cos(omega t) / (2 hbar sin(omega t)) D = sqrt(2) (m^3 omega^3 / (pi hbar^3))^(1/4) * sqrt(m omega / (2 pi i hbar sin(omega t))) -- check decomposition check(K psi1 == D xa exp(-A xa^2 + B xa + C)) "Path integral" I = D sqrt(pi) / 2 B A^(-3/2) exp(simplify(B^2 / (4 A) + C)) I "Verify result" check(I == eval(psi(1), x, xb)) "ok"
Run