Gas-Driven Piston Undergoing Simple Harmonic Oscillation

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

This Demonstration shows simple harmonic oscillation of an isothermal ideal gas in a piston being driven by a pressure gradient. The piston is assumed to be frictionless and thermal effects of successive expansion and compression of the gas are neglected. This idealized system is a perpetual motion machine!


With the spring portion of the cylinder held at vacuum and the remaining portion at some initial pressure ), the piston is displaced by an initial amplitude (α). The ideal gas in the cylinder is assumed to be isothermal by temperature equilibrating with the outside instantaneously as the piston oscillates. The initial displacement would cause the piston to undergo simle harmonic oscillation even without the presence of the ideal gas. The ideal gas, therefore, acts as a driving force for the simple harmonic oscillation. In the limit, when the inital volume of the ideal gas is much greater than the oscillation of the piston, only a component of the initial pressure of the ideal gas acts as the driving force, and the frequency of oscillation is amended from simple mass-spring behavior to include components of the pressure and volume from the ideal gas. Details of the derivation are given below.


Contributed by: T. Kirkpatrick (April 2014)
Open content licensed under CC BY-NC-SA



Givens for the problem: 1. Initial displacement of piston = α 2. Initial velocity of piston = β 3. Initial pressure of gas = 4. Initial (equilibrium) length of gas = 5. Mass of piston = 6. Spring constant = 7. Cross-sectional area of piston =

The sum of all forces acting on the piston are:

The pressure as a function of position is determined by the ideal gas law, under isothermal conditions


Therefore, the differential equation describing the oscillations of the piston is:


In the limit that , this can be accurately approximated as


The solution to this differential equation governs the motion of the piston, as shown in the graphics of this Demonstration.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.