-- www.eigenmath.org/dirac-equation.txt -- Verify solutions to the Dirac equation. gamma0 = ((1,0,0,0),(0,1,0,0),(0,0,-1,0),(0,0,0,-1)) gamma1 = ((0,0,0,1),(0,0,1,0),(0,-1,0,0),(-1,0,0,0)) gamma2 = ((0,0,0,-i),(0,0,i,0),(0,i,0,0),(-i,0,0,0)) gamma3 = ((0,0,1,0),(0,0,0,-1),(-1,0,0,0),(0,1,0,0)) omega = sqrt(kx^2 + ky^2 + kz^2 + m^2) psi1 = (omega + m, 0, kz, kx + i ky) exp(i (kx x + ky y + kz z - omega t)) psi2 = (0, omega + m, kx - i ky, -kz) exp(i (kx x + ky y + kz z - omega t)) psi3 = (kz, kx + i ky, omega - m, 0) exp(i (kx x + ky y + kz z - omega t)) psi4 = (kx - i ky, -kz, 0, omega - m) exp(i (kx x + ky y + kz z - omega t)) psi5 = (omega - m, 0, kz, kx + i ky) exp(-i (kx x + ky y + kz z - omega t)) psi6 = (0, omega - m, kx - i ky, -kz) exp(-i (kx x + ky y + kz z - omega t)) psi7 = (kz, kx + i ky, omega + m, 0) exp(-i (kx x + ky y + kz z - omega t)) psi8 = (kx - i ky, -kz, 0, omega + m) exp(-i (kx x + ky y + kz z - omega t)) D(psi) = dot(gamma0,d(psi,t)) + dot(gamma1,d(psi,x)) + dot(gamma2,d(psi,y)) + dot(gamma3,d(psi,z)) "checking wave functions (1=ok)" i D(psi1) == m psi1 i D(psi2) == m psi2 i D(psi3) == m psi3 i D(psi4) == m psi4 i D(psi5) == m psi5 i D(psi6) == m psi6 i D(psi7) == m psi7 i D(psi8) == m psi8