More generally, the equipartition theorem states that any degree of freedom x which appears in the total energy H only as a simple quadratic term Ax, where A is a constant, has an average energy of 1 ⁄ 2 k B T in thermal equilibrium. In this case the equipartition theorem may be derived from the partition function Z (β), where β = 1/(k B T) is the canonical inverse temperature. Integration over the variable x yields a factor