Source: http://physchileborgne.free.fr/cours2019/CH04_LDP.pdf