Welcome to the third lesson in our journey through thermodynamics.
In our previous session, we tackled a key mathematical challenge: defining the natural logarithm, , as an integral and establishing that . This was the missing piece of our calculus toolkit, specifically needed to calculate the work done when a gas expands at constant temperature. Today, we put that tool to use. We will introduce the cornerstone of energy conservation in thermodynamics, the First Law, which states that the change in a system's internal energy is equal to the heat added to it minus the work it performs. We will then apply this law, along with our integration knowledge, to calculate the work, heat, and internal energy change for three fundamental types of reversible processes: isochoric (constant volume), isobaric (constant pressure), and the one we prepared for, isothermal (constant temperature).
The First Law: Conservation of Energy
At its heart, the First Law of Thermodynamics is a statement of the conservation of energy. It asserts that energy cannot be created or destroyed, only transferred or converted from one form to another. To formalize this, we consider the internal energy of a system, denoted by .
Internal energy () is the sum of all energies within the system. For the gases we'll be studying, this is primarily the total kinetic energy of all the constituent particles (due to their random motion) and any potential energy associated with their interactions. As you'll recall from the first lesson, internal energy is a state function—its value depends only on the current state (P, V, T) of the system, not on how it got there.
The First Law states that any change in the internal energy of a system, , must be accounted for by energy crossing the system's boundary in the form of either heat () or work ().
First law of thermodynamics / internal energy | Thermodynamics | Physics | Khan Academy
To build a solid intuition for internal energy and the First Law, this Khan Academy video provides an excellent conceptual foundation. It begins by defining internal energy and then presents the mathematical formulation of the law.
First, watch the segment from this timestamp which explains what internal energy encompasses—from kinetic energy of molecules to potential energy in bonds. Then, continue from here to see how the First Law is expressed mathematically and to understand the crucial sign conventions for heat and work.
As the video explains, the mathematical statement of the First Law of Thermodynamics is:
It is vital to be precise about the sign conventions, as different fields sometimes use different standards. For this course, we will adhere to the convention common in physics and engineering:
- : The change in the internal energy of the system.
- : The net heat added to the system. If heat flows into the system, is positive. If heat flows out, is negative.
- : The net work done by the system on its surroundings. If the system expands and does work, is positive. If the surroundings do work on the system (compression), is negative.
This formulation, , is an elegant expression of energy balance: the change in the energy stored in the system () is equal to the energy put in as heat () minus the energy taken out as work ().
Calculating Work: The Integral
We know from our first lesson that work is a path function, represented by the area under a curve on a pressure-volume (P-V) diagram. Now, let's formalize its calculation.

For a gas in a piston, the infinitesimal work done by the gas as it expands by an infinitesimal volume against an external pressure is . To find the total work for a process, we integrate this expression between the initial and final volumes.
Work Done in Quasistatic (Reversible) Compression and Expansion of a Gas in a Piston (W = - P dV)
This video provides a clear derivation of the expression for work done in a quasi-static (reversible) process. A quick but important note on convention: The video derives the work done on the system, arriving at the formula dW = -P dV. We are interested in the work done by the system. By Newton's third law, the force exerted by the gas is equal and opposite to the force exerted on it, so the work done by the gas is simply the negative of their result.
Watch the derivation from this segment. Follow the logic from the basic definition of work (force times distance) to the final thermodynamic expression involving pressure and volume. Note how the areas cancel out. The key takeaway is that the magnitude of the infinitesimal work is P dV.
Based on the video's derivation and our chosen sign convention (work done by the system is positive), the formula for work is:
This integral is the engine we will use to analyze our three special processes.
Applying the First Law to Ideal Gas Processes
Let's now analyze three important reversible processes for an ideal gas. For an ideal gas, a crucial simplification exists: the internal energy depends only on its temperature . This means that for any process where the temperature does not change (i.e., an isothermal process). We will use this fact repeatedly.
The following reading provides a concise overview of these processes. We will work through each one in detail, referring back to this text.
5.8: Special Processes - Physics LibreTexts
This article from Physics LibreTexts systematically discusses isochoric, isobaric, and isothermal processes. It clearly lays out the conditions, the physical picture, and the resulting thermodynamic calculations for each.
Read the sections Isochoric Process, Isobaric Process, and Isothermal Process. For each one, focus on: The definition of the process (which quantity is held constant). The resulting calculation for work, W. The final relationship between Q, W, and \Delta U. Pay special attention to how the work integral is solved for the isothermal case, as this uses the math from our last lesson.
Let's consolidate what we've learned from the reading and our principles.

1. Isochoric Process (Constant Volume)
In an isochoric process, the volume of the system is held constant (). Imagine heating a gas in a rigid, sealed container.
- Work (): Since throughout the process, the work integral is trivially zero. No work is done because there is no change in volume. This is represented by a vertical line on a P-V diagram.
- Internal Energy (): The internal energy changes only if the temperature changes. We can write this change as , where is the molar heat capacity at constant volume.
- Heat (): Applying the First Law: In a constant-volume process, any heat added goes directly into increasing the system's internal energy.
2. Isobaric Process (Constant Pressure)
In an isobaric process, the pressure is held constant (). Imagine heating a gas in a cylinder with a freely moving piston under a constant external pressure.
- Work (): Since is constant, it can be pulled out of the integral. The work done is simply the constant pressure times the change in volume.
- Internal Energy (): As before, . A change in volume at constant pressure implies a change in temperature via the ideal gas law ().
- Heat (): Applying the First Law: In a constant-pressure process, the added heat is split between doing work and increasing the internal energy.
3. Isothermal Process (Constant Temperature)
In an isothermal process, the temperature is held constant (). Imagine a gas expanding very slowly while in thermal contact with a large heat reservoir that keeps its temperature fixed.
- Internal Energy (): Since we are dealing with an ideal gas and the temperature is constant, the change in internal energy is zero.
- Heat () and Work (): Applying the First Law: All heat added to the system is converted into work done by the system.
- Work (): Now we must solve the integral. We cannot pull out, as it changes. We use the ideal gas law, , to express as a function of . Since , , and are constant, we pull them out: This is exactly the integral we prepared for! Solving it gives: This result beautifully connects the abstract mathematics of logarithms to the physical work done by an expanding gas.
A Worked Example
To see these calculations in action, let's look at a detailed example problem. The following resource works through a multi-step thermodynamic cycle. We will focus only on the calculations for individual segments that correspond to the processes we've just learned.
[PDF] Mat E 311 - L8 - Ideal Gas Part 2.key - Faculty
This document contains a comprehensive worked example of a thermodynamic cycle. We will examine three specific steps of this cycle. Don't worry about the overall cycle or quantities like enthalpy ($\Delta H$) and entropy ($\Delta S$) for now; just focus on the calculations of $Q$, $W$, and $\Delta U$.
Isometric (Isochoric) Process: Go to slide 14, titled "(i) Isometric Depressurization". Follow the calculations for Q, W, and $\Delta U$ across slides 14-16. Notice how W is immediately set to zero and how Q is found from $\Delta U$. Isobaric Process: Now, skip to slide 21, titled "(iii) Isobaric Expansion". Review the calculations on slides 21-23. See how work is calculated first using $P\Delta V$, then $\Delta U$ is found, and finally the First Law is used to get Q. Isothermal Process: Finally, go to slide 24, titled "(iv) Isothermal Compression". On slides 24-26, observe how $\Delta U$ is immediately set to zero. Then see the derivation of the work formula involving the natural logarithm that we just derived, and note that $Q=W$.
Conclusion
In this lesson, we have moved from abstract principles to concrete calculations, a significant step in our study of thermodynamics.
- We formally stated the First Law of Thermodynamics, , which is the principle of energy conservation applied to thermodynamic systems.
- We established the sign conventions: is positive for heat added to the system, and is positive for work done by the system.
- We confirmed that the work done by a gas is given by the integral .
- Finally, we applied these tools to calculate the change in internal energy , heat transferred , and work done for an ideal gas undergoing three key reversible processes:
- Isochoric (constant V): , so .
- Isobaric (constant P): , so .
- Isothermal (constant T): , so .
In our calculations today, we used the quantity , the molar heat capacity at constant volume. In the next lesson, we will formally define both and its counterpart at constant pressure, . This will allow us to analyze a fourth key process: the adiabatic process, where no heat is exchanged with the surroundings ().