*"The heat supplied to a system is equal to the change in internal energy of the system plus the work done by the system."*

First Law of Thermodynamics

Consider an upright gas cylinder with a piston. The pressure of the gas is denoted by p, and the cross-sectional area of the piston by A. If the piston moves up by a distance dx, the work done by the gas is given by dW=Fdx. The formula for pressure is p=F/A; pressure is measured in newtons per square metre (N/m²) or pascals (Pa), which are equal. Substituting for force in the work equation gives dW=pAdx. The change in volume of the gas is given by dV=Adx. Therefore, dW=pdV. The total work done by a system is given by W = ∫ p dV. It will be noticed that here, work transfer is considered positive if the system does work and negative if work is done on the system.

The rate at which work is done or energy is transferred is called the power (P). The SI unit of power is the watt (W). Dividing both sides of the work equation by time gives P=Fv.

Imagine that the pressure of the system is kept constant, and that heat is supplied to it until the temperature changes by an agreed amount; the heat supplied shall be denoted by Q_{1}. Then imagine that the volume is kept constant, and that heat is supplied until the temperature changes by a fixed amount; this time, the heat supplied shall be denoted by Q_{2}. Note that when heat is supplied to a system, either the pressure or the volume must change.

If the former transfer is done, followed by the latter, the total heat supplied shall be denoted by Q_{A}. If a system has the same start point and the same end point, as denoted on a pressure-volume graph, but the processes are carried out in the opposite order, the total heat supplied shall be denoted by Q_{B}. If a system is taken along a straight line on the graph, again with the same start and end points, the heat supplied shall be denoted by Q_{C}. The work done in these three cases shall be denoted by W_{A}, W_{B} and W_{C} respectively.

Combining equations for the three cases gives Q_{A}-W_{A}=Q_{B}-W_{B}=Q_{C}-W_{C}. In general, Q-W is constant between any pair of points. The formula δQ-δW has a well defined solution. This gives rise to the equation δQ-δW=dU, where U is the internal energy. This can be rearranged to give δQ=dU+δW. The change in internal energy is a function of state. Incidentally, the symbol δ denotes an infinitessimal change that is not well defined.

The quantity pV^{n}, where n is the polytropic index, has a constant value, denoted by K_{1}. Substituting into the equation for the total work done by the system gives ∫ K_{1}/V^{n} dV, or ∫ K_{1}V^{-n} dV. Integrating gives [K_{1}V^{-n+1}/(-n+1)]_{i}^{f}, where i and f denote the initial and final points respectively; this can be rewritten as (1-n)^{-1}[K_{1}V^{1-n}]_{i}^{f}.