Source: https://mms2.ensmp.fr/mat_paris/elaboration/exercices/Ch_5_6_Phases_TD.pdf