  We analytically calculate the work distribution of a quantum harmonic
oscillator with arbitrary time-dependent angular frequency. We provide detailed
expressions for the work probability density for adiabatic and nonadiabatic
processes, in the limit of low and high temperature. We further verify the
validity of the quantum Jarzynski equality
