First Law of Thermodynamics: Q, W, and ΔU
Problem
For each of the four canonical processes (isochoric, isobaric, isothermal, adiabatic), show how heat Q, work W, and internal energy change ΔU distribute via bar charts, and verify the first law ΔU = Q − W in each case.
Explanation
The first law of thermodynamics is the universe's most fundamental bookkeeping rule applied to gas systems: energy is conserved. If you put energy into a gas — either by heating it or by compressing it — that energy has to go somewhere. It either becomes more internal energy (the gas heats up) or becomes work done on the environment (the gas pushes a piston out). The first law makes this precise:
where:
- is the change in internal energy of the gas
- is the heat added to the gas (positive = in, negative = out)
- is the work done by the gas on its surroundings (positive = expansion, negative = compression)
Every thermodynamic process obeys this equation. No exceptions. It's the first commandment of thermodynamics, as rigid as conservation of momentum in mechanics.
What is "internal energy"?
For an ideal gas, internal energy is pure kinetic + rotational energy of the molecules. No potential energy (ideal-gas molecules don't interact with each other), no stored chemical bonds, no electromagnetic energy. Just the thermal motion.
The famous result for ideal gases is: internal energy depends only on temperature, not on volume or pressure. Specifically:
where is the molar heat capacity at constant volume. Its value depends on how many degrees of freedom the molecules have:
- Monoatomic gases (He, Ne, Ar) — only translation in 3 directions. .
- Diatomic gases (H₂, N₂, O₂, including air) — 3 translations + 2 rotations about the molecular axis (vibrations are "frozen out" at room temperature). .
- Polyatomic gases (CO₂, CH₄, H₂O vapor) — more rotations and possibly vibrations. and up.
So for any process that changes the temperature of an ideal gas by , the change in internal energy is always — regardless of how you got there. This is a surprisingly useful fact. Even if the process is weird and non-standard, if you know the start and end temperatures, you know .
Sign conventions — the biggest trap
Physicists and chemists often disagree about sign conventions. Let me state the physics convention used here, which is what most physics textbooks use:
- → heat flows into the gas (gas is being heated)
- → heat flows out of the gas (gas is cooling)
- → gas does work on the surroundings (gas is expanding, piston moves out)
- → surroundings do work on the gas (gas is being compressed, piston pushed in)
With these conventions, the first law reads .
Chemists often use with being work done on the gas instead of by it. Same physics, flipped sign. Be careful which textbook you're reading; never mix the conventions within one problem or you'll get nonsense.
The four canonical processes
There are infinitely many ways to change a gas's state, but four specific cases are so common in textbooks and engines that they get names:
-
Isochoric ("iso-choros" = "same volume"): the volume is held fixed while temperature and pressure change. Think of gas sealed in a rigid steel container being heated on a stove. The gas can't expand or compress, so no mechanical work is done ().
-
Isobaric ("iso-baros" = "same pressure"): the pressure is held constant while the gas expands or compresses. Think of a piston with a fixed weight on top — the gas can expand against the fixed load, but the pressure underneath the piston is always exactly .
-
Isothermal ("iso-thermos" = "same temperature"): the temperature is held constant, which requires thermal contact with a heat reservoir large enough to keep from drifting. Because only depends on for an ideal gas, throughout an isothermal process.
-
Adiabatic ("a-dia-batos" = "not passable"): no heat exchange whatsoever. because the gas is perfectly insulated. All energy changes come from work alone.
These four don't cover every real process. In the real world, most processes are some combination — a car engine's compression stroke is nearly adiabatic but not quite (some heat leaks through the cylinder walls). But the four idealized cases give you the "pure flavors" of what the first law looks like when one of Q, W, T, or V is locked down.
Method 1: Isochoric Process (constant volume)
Let's take 1 mole of monoatomic ideal gas starting at in a rigid 25-liter container. We heat it on a stove until the temperature reaches .
Step 1: Compute and .
Step 2: Compute .
Work is . Since everywhere (volume doesn't change), the integral is zero:
Step 3: Compute from the first law.
Interpretation: All 1247 J of heat you added went directly into raising the internal energy. The gas got hotter, but it didn't do any work because it couldn't expand. Every single joule stays trapped in the gas.
In the bar chart: is a tall positive bar at J, is zero (no bar), is a tall positive bar matching . The three-bar chart shows the first law geometrically: equals when is zero.
Method 2: Isobaric Process (constant pressure)
Same starting state (1 mol monoatomic, ), but now the gas is in a cylinder with a movable piston held at constant pressure by atmospheric pressure plus a small weight. As the gas heats from 300 K to 400 K, the piston rises to maintain the fixed pressure.
Step 1: Compute and .
The internal energy change is exactly the same as for the isochoric case — because of an ideal gas depends only on , and is the same.
Step 2: Compute .
For a constant-pressure process, . We can use the ideal gas law to find :
So:
The gas expanded, did positive work on the surroundings (the piston moved up against the atmospheric load), and that work has a specific value: . Notice this result is independent of what the pressure actually is — as long as it's held constant.
Step 3: Compute .
Step 4: Verify using .
There's a cleaner formula for isobaric heat: , where is the molar heat capacity at constant pressure. For a monoatomic ideal gas, .
(Rounding error in the last digit — the numbers match.)
Interpretation: You need more heat for the isobaric process (2079 J) than for the isochoric process (1247 J) to produce the same 100 K temperature rise. The extra 831.4 J paid for the work done as the gas expanded. This explains Mayer's relation: . The constant-pressure specific heat exceeds the constant-volume one by exactly because of the expansion work you have to pay for.
Method 3: Isothermal Process (constant temperature)
Same gas (1 mol monoatomic), but we hold the temperature at by putting the container in contact with a large heat reservoir. The gas expands from to (doubling).
Step 1: Compute .
Since is constant, , and for an ideal gas this means:
Step 2: Compute .
For an isothermal expansion:
The integrand has a because pressure drops as volume increases (Boyle's law, which is the isothermal form of ). Integrating gives the natural log.
Step 3: Compute .
Interpretation: The gas absorbs 1729 J of heat from the reservoir, and every single joule of that heat is converted to work. Temperature doesn't change because heat flows in exactly as fast as work flows out. No internal energy change at all.
This is the most efficient possible conversion of heat into work — 100% conversion, zero change in . It also requires the process to be quasi-static (infinitely slow) and reversible. Real processes have some irreversibility and fall short of this ideal.
In the bar chart: and are equal positive bars at J. is zero (no bar). Visually, the first law says the top of the bar is the same height as the top of the bar, with nothing between them.
Method 4: Adiabatic Process (no heat exchange)
Same gas, but now it's perfectly insulated — no heat can flow in or out. We compress the gas from some volume down to a smaller volume, doing work on it, and its temperature rises from 300 K to 400 K purely because of the compression.
Step 1: Compute .
By definition of adiabatic:
Step 2: Compute .
The temperature went up, so is positive and equal to . (Same formula as the isochoric and isobaric cases, because only depends on .)
Step 3: Find from the first law.
Interpretation: Negative means the gas had work done on it (the piston was pushed in), not by it. Every joule of that work went directly into raising the internal energy. No heat flowed — the gas heated up purely through compression. This is exactly what makes a bicycle pump warm up as you use it: you're doing work on the air inside the pump, fast enough that no heat escapes through the cylinder walls in the brief compression time.
The alternate adiabatic case: expansion. If instead the gas were expanding adiabatically (say from to with ), it would cool down. The gas would do positive work () but have negative (cooling), and they'd be equal in magnitude. That's why aerosol spray cans feel cold when you use them — the propellant is adiabatically expanding, doing positive work against the atmosphere, and losing internal energy (= cooling down).
The summary (as a list, since tables don't render here)
For 1 mole of monoatomic ideal gas, starting at 300 K:
- Isochoric (fixed , K): , J, J. All heat becomes internal energy.
- Isobaric (fixed , K): J, J, J. Heat splits: 60% becomes , 40% becomes expansion work.
- Isothermal (fixed K, doubling ): J, J, . All heat becomes work; nothing sticks.
- Adiabatic compression (, K): J, , J. All work done on the gas becomes internal energy.
Each row obeys . That's the first law written four different ways.
Why : Mayer's relation visually
One of the most elegant consequences of the first law is Mayer's relation:
This falls out of the comparison between Method 1 (isochoric) and Method 2 (isobaric). Heating a mole of gas by 1 K at constant volume takes joules. Heating it at constant pressure by the same 1 K takes joules — which is for the internal energy plus exactly more for the expansion work. So the difference between the two specific heats is exactly , the universal gas constant.
For monoatomic: , . Difference: . ✓ For diatomic: , . Difference: . ✓
It holds for any ideal gas regardless of its complexity. It's one of those relations that looks trivial once you see it but took centuries of physics to nail down.
Real-world applications
- Internal combustion engines. The Otto cycle (gasoline engines) is approximately: adiabatic compression → isochoric combustion → adiabatic expansion → isochoric exhaust. Every stroke is one of our four canonical processes. Designers calculate cycle efficiency by summing , , over each stroke using the first law.
- Refrigeration cycles. A fridge compresses refrigerant adiabatically (it heats up), dumps heat to the kitchen isobarically through the condenser coils, expands adiabatically through an expansion valve (it cools way down), then absorbs heat from the fridge interior isobarically. Four processes stitched together into a closed cycle.
- Hot air balloons. When you fire the burner, you add heat to the air inside the envelope isobarically (the envelope is open at the bottom so air pressure equals atmospheric). That heat goes partly into raising the internal energy (= temperature) and partly into expansion work, which pushes some air out of the envelope and reduces the overall air mass — making the balloon lighter and buoyant.
- Atmospheric meteorology. A rising parcel of air cools adiabatically (because it expands against the lower surrounding pressure as it rises). The "dry adiabatic lapse rate" — about 9.8 K per kilometer of altitude — is derived directly from the adiabatic form of the first law. When the rising air cools enough for water vapor to condense, clouds form.
- Human breathing. Inhalation is approximately isobaric at atmospheric pressure: the diaphragm descends, expanding your lung volume, and air flows in to maintain the constant pressure. The amount of oxygen you get per breath is governed by the first law applied to your lungs as an isobaric system.
Common mistakes
- Confusing sign conventions. The single biggest source of errors. Always state upfront which sign convention you're using ( done BY gas vs done ON gas). Stick with it for the whole problem.
- Using for non-isochoric processes. This only holds when , which is only true for isochoric. For any other process, some of the heat goes into work.
- Confusing with or with . is the change in internal energy; it's a joule quantity. is heat flow; also a joule quantity. is temperature. These are three different things, and the first law relates them.
- Using the wrong specific heat. For isobaric: . For isochoric: . Mixing them gives answers off by the factor , which can be substantial.
- Forgetting that applies to ANY ideal-gas process, not just isochoric. The formula looks like it should belong only to "constant-volume," but it works for all processes because is a function of alone.
- Assuming isothermal means . That's adiabatic! Isothermal means , which is the opposite situation — in isothermal, is typically very large (all of it becomes work).
- Thinking the first law is optional or approximate. It's exact. Energy conservation applies to every process in the universe. The first law is just a bookkeeping of that conservation for gas systems specifically.
Try it
- Pick each process type in the dropdown and watch the bar chart transform. Notice how the three bars always satisfy — that's the first law enforcing itself visually.
- Slide up and down for the isochoric, isobaric, and adiabatic cases. The bars scale linearly with . At they all collapse to zero.
- Switch to "Compare all four" mode to see the four processes side by side, all starting from the same state and with the same K. The pattern becomes vivid: the isothermal case has a zero bar, the adiabatic case has a zero bar, and the other two are intermediate.
- Switch between monoatomic and diatomic gas. All the bars grow for diatomic because and are larger. The isobaric grows more than the isochoric , because scaled up more than .
- Try extreme temperature changes — K. Everything scales linearly, which shows you how enormous real-world gas-law heats can be. A modest car engine cycle moves thousands of joules per gram of fuel per cycle, and the first law tracks every one of them.
- Cross-check Mayer's relation yourself: at K, subtract the isochoric from the isobaric . You should get exactly J. That's Mayer's relation made numerical.
Interactive Visualization
Parameters
Got your own math or physics problem?
Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.