Simultaneous X-ray diffraction and differential scanning calorimetry in the study of phase transitions