What is the mathematical statement of the first law of thermodynamics

In other words energy is conserved.

The mathematical statement of the first law of thermodynamics is:

ΔU = Q - W
where ΔU is the change in internal energy of a system, Q is the heat added to the system, and W is the work done by the system. This equation states that the change in the internal energy of a system is the sum of the heat added to the system and the work done by the system.