  We present a unified and simple method for deriving work theorems for
classical and quantum Hamiltonian systems, both under equilibrium conditions
and in a steady state. Throughout the paper, we adopt the partitioning of the
total Hamiltonian into the system part, the bath part, and their coupling. We
rederive many equalities which are available in the literature and obtain a
number of new equalities for nonequilibrium classical and quantum systems. Our
results can be useful for determining partition functions and (generalized)
free energies through simulations and/or measurements performed on
nonequilibrium systems.
