# First Law of Thermodynamics

Suppose that we’ve put in some gas into a container with a piston on top of container. If we put this container on top of a heater (like a simple burner) then slowly heat energy will be transferred from burner to gas inside container.

This new energy transferred to gas inside container can move the piston outwards meaning gas is doing work on piston, but if piston doesn’t move or we stop it from moving outwards somehow. Then all of energy transferred from heat burner will be contained inside the gas thus increasing internal energy of gas.

Suppose in this process, an amount ΔQ of heat is given to gas (from burner) and an amount ΔW of work is done by it (work done by gas on piston). Thus total energy of gas must increase by ΔQ – ΔW.

As a result of transfer of energy from burner to gas inside container, the entire gas together with its container may start moving or internal energy of the gas may increase. If the energy does not appear as a systematic motion of gas then this net energy ΔQ – ΔW must go in form of its internal energy.

If we denote change in internal energy of gas by ΔU then
ΔU = ΔQ – ΔW
or
ΔQ = ΔU + ΔW

Equation ΔQ = ΔU + ΔW is known as First Law of Thermodynamics. Thus we can say that first law of thermodynamics states that total energy given to a gas is equal to sum of it’s internal energy and work done by gas.

Below is an example problem related to first law of thermodynamics.

First law of thermodynamics states that ΔQ = ΔU + ΔW
This equation can be further simplified because we can easily find out what’s work done.
Let’s simplify this equation.

Work done by a gas
Suppose that a gas contained in a cylinder of cross-sectional area A fitted with a movable piston. Let pressure of the gas be p. The force exerted by the gas on piston is pA in outward direction.

Suppose the gas expands a little and the piston is pushed out by a small distance Δx.
Thus work done by gas on piston is
ΔW = Force × Area = pA × Δx = p(AΔx)

AΔx can be written as ΔV change in volume of gas as piston is moving.

For a finite change of volume from V1 to V2 the pressure may not be constant. We can divide the whole process of expansion of piston into smaller steps and add the work done in each step.

Thus total work done by gas in this process is given by

\begin{equation} W=\int_{V_{1}}^{V_{2}} p d V \end{equation}

Moreover this expansion of gas from volume V1 to V2 can be depicted in a graph as following.

Thus first law of thermodynamics equation ΔQ = ΔU + ΔW can be rewritten as

\begin{equation} ΔQ = ΔU + \int_{V_{1}}^{V_{2}} p d V \end{equation}

Let’s now have a look at a problem related to work done by a gas.

So far we’ve talked about first law of thermodynamics equation and have also discussed work done by gas and have concluded following equation from all of above discussion.

\begin{equation} ΔQ = ΔU + \int_{V_{1}}^{V_{2}} p d V \end{equation}

This equation can be further simplified depending upon whether whether temperature or pressure or volume is constant.
Let’s now discuss these different scenarios and see what equation of first law of thermodynamics will look like for these different scenarios.

Work done in an Isothermal process on an Ideal Gas
Isothermal Process means temperature is constant.

Suppose an ideal gas has initial pressure, volume and temperature as p1, V1 and T respectively. In a process, temperature is kept constant and its pressure, volume are changed from p1, V1 to p2, V2

Then work done by Gas will be

\begin{equation} W = \int_{V_{1}}^{V_{2}} p d V \end{equation}

As for an ideal gas, pV = nRT
Where
p = Pressure of ideal gas
V = Volume of ideal gas
n = Number of moles of ideal gas
R = Gas Constant
T = Temperature of ideal gas

pV = nRT ⇒ p = nRT/V

\begin{equation} W = \int_{V_{1}}^{V_{2}} p d V \\ \implies W = \int_{V_{1}}^{V_{2}} \frac{nRT}{V} d V \\ \end{equation}

Simplifying this integration

\begin{equation} W = nRT \int_{V_{1}}^{V_{2}} \frac{dV}{V} \\ W = nRT ln(\frac{V_{2}}{V_{1}}) \end{equation}

Replacing this value in first law of thermodynamics equation ΔQ = ΔU + ΔW

\begin{equation} ΔQ = ΔU + nRT ln(\frac{V_{2}}{V_{1}}) \end{equation}

This is equation of first law of thermodynamics for an ideal gas which is going from volume V1 to V2 under constant temperature.

Work done in an Isobaric Process
Isobaric Process means pressure is kept constant as gas volume is changing from V1 to V2

Thus work done by a gas equation can be written as

\begin{equation} W = \int_{V_{1}}^{V_{2}} p d V \\ \text{As pressure is constant} \\ \implies W = p \int_{V_{1}}^{V_{2}} d V \\ = p (V_{2} – V_{1}) \end{equation}

Thus work done by a gas under constant pressure is W = p(V2 – V1)

Putting this value in first law of thermodynamics equation ΔQ = ΔU + ΔW

\begin{equation} ΔQ = ΔU + ΔW \\ ΔQ = ΔU + p(V_{2} – V_{1}) \end{equation}

Thus if a gas is going from volume V1 to V2 under constant pressure then first law of thermodynamics equation will be ΔQ = ΔU + p(V2 – V1)

Work done in an Isochoric Process
Isochoric Process means volume is kept constant.

As volume is kept constant thus work done will be zero. ⇒ ΔW = 0
So for an Isochoric Process first law of thermodynamics equation ΔQ = ΔU + ΔW
is ΔQ = ΔU

## Summary

If
• ΔQ = Heat supplied to system by surroundings
• ΔW = Work done by system on the surroundings
• ΔU = Change in internal energy of system
Then
ΔQ = ΔU + ΔW is First Law of Thermodynamics