  We investigate the stochastic motion of a Brownian particle in the harmonic
potential with a time-dependent force constant. It may describe the motion of a
colloidal particle in an optical trap where the potential well is formed by a
time-dependent field. We use the path integral formalism to solve the Langevin
equation and the associated Fokker-Planck (Kramers) equation. Rigorous
relations are derived to generate the probability density function for the
time-dependent nonequilibrium work production beyond the overdamped limit. We
find that the work distribution exhibits an exponential tail with a power-law
prefactor, accompanied by an interesting oscillatory feature (multiple pseudo
locking-unlocking transitions) due to the inertial effect. Some exactly
solvable cases are also discussed in the overdamped limit.
