Skip to content
Tutorials Center
My learning

Topics

Lesson 20 of 37 · Thermodynamics

The First Law of Thermodynamics

Learn the first law of thermodynamics, Q = ΔU + W, with sign rules, internal energy of an ideal gas and worked examples you can run in Python.

Energy is never created or destroyed; it only changes form or moves from place to place. The first law of thermodynamics applies this idea to heat, work and the energy stored inside a substance. It is the bookkeeping rule behind car engines, refrigerators, power stations and even the way a bicycle pump warms up.

In this lesson you will learn the three quantities involved, the sign rules that trip up many students, and how to use the law with an ideal gas.

Three quantities: Q, W and ΔU

Internal energy (U) is the total kinetic and potential energy of all the particles inside a system, measured in joules (J). You cannot see it directly, but a rise in temperature usually means a rise in U.

Heat (Q) is energy that flows into or out of a system because of a temperature difference.

Work (W) is energy transferred by a force moving through a distance. For a gas, the usual work is done by the gas when it expands and pushes a piston.

The first law says:

Text
Q = ΔU + W

In words: the heat you add to a system either raises its internal energy or is used by the system to do work.

Sign rules

This lesson uses the convention common in IGCSE, IB and most physics textbooks:

Quantity Positive when Negative when
Q heat flows into the system heat flows out of the system
W the system does work on the surroundings (expands) work is done on the system (compression)
ΔU internal energy rises internal energy falls

Some chemistry books write ΔU = Q + W, where W is work done on the system. The physics is identical; only the sign of W is flipped. Always check which convention your course uses.

Worked example 1: heating and expanding

A gas absorbs 500 J of heat and expands, doing 200 J of work on a piston. What is the change in its internal energy?

Text
Q = +500 J      (heat in)
W = +200 J      (work done by the gas)
ΔU = Q − W = 500 − 200 = 300 J

The internal energy rises by 300 J.

Worked example 2: compressing a gas

A student pushes the plunger of a sealed syringe, doing 60 J of work on the air inside. The air loses 15 J of heat to the walls. Find ΔU.

Text
W = −60 J      (work done on the gas)
Q = −15 J      (heat out)
ΔU = Q − W = −15 − (−60) = +45 J

The air gains 45 J of internal energy, so it warms up. That is why a bicycle pump feels warm.

Python First-law calculator

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Internal energy of an ideal gas

In an ideal gas the particles do not attract each other, so internal energy is purely kinetic and depends only on temperature. For a monatomic gas such as helium or neon:

Text
U = (3/2) n R T
ΔU = (3/2) n R ΔT

where n is the amount of gas in moles, R = 8.314 J/(mol·K) is the molar gas constant, and T is the temperature in kelvin. Notice that U does not depend on pressure or volume directly. If the temperature does not change, ΔU = 0 for an ideal gas.

For a diatomic gas such as nitrogen or oxygen at room temperature, U = (5/2) n R T, because the molecules can also rotate.

Worked example 3

Two moles of a monatomic ideal gas are heated from 300 K to 350 K. Find ΔU.

Text
ΔU = (3/2)(2)(8.314)(50) ≈ 1247 J
Python Internal energy of a monatomic gas

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Special cases to remember

  • Isolated system: Q = 0 and W = 0, so ΔU = 0.
  • Constant volume: the gas cannot move a piston, so W = 0 and Q = ΔU.
  • Complete cycle: the system returns to its starting state, so ΔU = 0 and the net heat equals the net work.
  • Free expansion into a vacuum: no force opposes the gas, W = 0; if the container is insulated, Q = 0 as well.

Learn the next lesson, Thermodynamic Processes, to see how each of these cases looks on a pressure-volume graph.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. A gas absorbs 800 J of heat and does 300 J of work on its surroundings. What is ΔU?

    ΔU = Q − W = 800 − 300 = 500 J. The gas keeps the energy that it did not spend on work.
  2. 2. Work of 40 J is done on a gas and no heat flows in or out. What happens to its internal energy?

    With Q = 0 and W = −40 J (done on the gas), ΔU = Q − W = +40 J. Compressing a gas without letting heat escape warms it.
  3. 3. What is ΔU for one complete cycle of an engine?

    After a full cycle the system is back in its original state, so its internal energy is unchanged: ΔU = 0.
  4. 4. For an ideal monatomic gas, which change leaves the internal energy unchanged?

    Internal energy of an ideal gas depends only on temperature. If T is constant, ΔU = 0, even when pressure and volume change.

Summary

  • The first law is Q = ΔU + W: heat added equals the rise in internal energy plus the work done by the system.
  • Q is positive for heat in; W is positive when the system does work on its surroundings.
  • For an ideal monatomic gas, ΔU = (3/2) n R ΔT; it depends only on temperature.
  • At constant volume W = 0; over a full cycle ΔU = 0; in an isolated system ΔU = 0.

Next: Thermodynamic Processes