Respuesta :

The 1st Law of Thermodynamics is what you are looking for

Hope this helped :)