Density of States Derivation