Quasi-harmonic theory of thermal expansion