On this page
Textbooks often call a piston in an engine an example of simple harmonic motion. It is close, but it is not SHM, and the difference is large enough to matter. In a small motorcycle-sized engine at 7,500 rpm, the piston's acceleration at the top of its stroke is almost twice what it is at the bottom, and the piston reaches the middle of the cylinder before the crank has turned a quarter of the way. The reason is the connecting rod, and you can work it all out with the geometry and differentiation you already use in Class 11 and 12.
Why is a piston not in simple harmonic motion?
SHM is the shadow of uniform circular motion on a straight line. If you take a point going round a circle of radius r at angular speed ω and look at its projection on a diameter, you get x = r cos ωt, with acceleration a = −ω²x. The SHM and reference circle post covers this picture in detail.
A real engine does not take a shadow. The crank pin goes round a circle, but it pushes the piston through a connecting rod of fixed length l. As the crank turns, the rod tilts. When the rod tilts, its vertical reach shrinks a little, so the piston sits slightly lower than the pure projection would put it. That small extra drop is what breaks the SHM.
The post on rectilinear, circular and oscillatory motion names the piston and crankshaft as a mix of motions. Here is how to work it.
What is the exact formula for piston position?
Put the crank axis at the origin and measure the crank angle θ from top dead centre (TDC), the position where the piston is farthest from the crank axis. The crank pin is at height r cos θ and sideways offset r sin θ. The rod joins the pin to the piston, so by Pythagoras its vertical length is √(l² − r² sin² θ). So the piston's distance from the crank axis is
x = r cos θ + √(l² − r² sin² θ)
Check the two ends. At θ = 0, x = r + l. At θ = 180°, x = l − r. The stroke is the difference, 2r. That part matches SHM.
If l were infinitely long, the square root would be a constant l and you would get pure SHM. A Scotch yoke, in which the crank pin slides in a slotted crosshead instead of pushing a rod, does exactly this: its motion is r cos θ with no error.
How do you get the acceleration?
Expand the square root for r much smaller than l: √(l² − r² sin² θ) ≈ l − (r²/2l) sin² θ. Using sin² θ = (1 − cos 2θ)/2 and differentiating twice with θ = ωt gives
a ≈ −rω²[cos θ + (r/l) cos 2θ]
The first term is the SHM you expected. The second is a new oscillation at twice the crank speed, with an amplitude r/l times as large. This is the standard result in machine-dynamics courses; the Penn State ME 481 notes on shaking force in a slider-crank use exactly s̈ = −Rω²(cos θ + (R/L) cos 2θ). The engineering names are primary (once per turn) and secondary (twice per turn).
At θ = 0 both terms add: a = rω²(1 + r/l). At θ = 180° they subtract: a = rω²(1 − r/l). Those two values happen to be exact, not just approximate, because sin θ = 0 there.
Worked example: a 58 mm stroke at 7,500 rpm
Take an illustrative single-cylinder engine (not a specific model): stroke 58 mm, so r = 29 mm, rod length l = 100 mm, running at 7,500 rpm.
Angular speed. ω = 2π × 7,500/60 = 785.4 rad/s.
SHM scale. rω² = 0.029 × 785.4² = 17,890 m/s². Pure SHM would give this at both ends.
Ratio. r/l = 0.29, so l/r = 3.45.
At TDC. a = 17,890 × 1.29 = 23,080 m/s², about 2,350 g, directed down toward the crank.
At BDC. a = 17,890 × 0.71 = 12,700 m/s², about 1,290 g, directed up toward the cylinder head.
Quarter turn. At θ = 90°, SHM puts the piston exactly at mid-stroke. The exact formula gives x = √(l² − r²) = 95.7 mm, compared with 129 mm at TDC, so the piston has moved 33.3 mm, which is 57% of the 58 mm stroke. It is already past the middle.
When is it at mid-stroke? Solve x(θ) = l for θ numerically: θ = 81.7°. So the piston spends 2 × 81.7 = 163° of each 360° turn in the top half of the cylinder, about 45% of the time, and 55% in the bottom half.
Peak speed. Differentiate x numerically: the top speed is 23.7 m/s at θ = 75°, a little above rω = 22.8 m/s, and earlier than the 90° that SHM predicts.
Force. For a piston and pin of 0.12 kg (illustrative), F = ma gives 2,770 N at TDC and 1,520 N at BDC, against 2,150 N at both ends for pure SHM.
Units check: rω² is m × (rad/s)² = m/s². Every number above was computed from the exact formula, not the two-term expansion; at the ends the two agree.
Why does this second harmonic shake engines?
The force on the crank from the piston has a part at the engine speed and a part at twice the engine speed. A counterweight on the crank turns once per revolution, so it can only fight the once-per-turn part. The twice-per-turn part is left over. That is why single-cylinder engines shake at twice the engine speed as well as at it, and why some engines add a balance shaft geared to spin at double speed. Shorter rods make r/l bigger and the secondary shake worse.
If you have also met a piston bouncing on a trapped gas spring, that is a different problem; see time period of a piston oscillating on gas in a cylinder.
How should you practise this for JEE?
This is a typical JEE Advanced-style set-up: a familiar mechanism, one line of geometry, then calculus. Practise three moves: write the position from the triangle, differentiate twice with the chain rule, and evaluate at special angles where the algebra collapses. The Fermi Problem Library has a step-by-step solver that explains the reasoning, which helps when your differentiation goes wrong halfway. For a full plan, Fermi Test Prep offers personalised preparation for JEE Main & Advanced with an AI tutor, live classes, adaptive mocks, mentorship and a study plan that updates based on mastery.
Checklist
x = r cos θ + √(l² − r² sin² θ); only an infinite rod or a Scotch yoke gives pure SHM.
a ≈ −rω²[cos θ + (r/l) cos 2θ]: SHM plus a twice-per-turn term.
At TDC a = rω²(1 + r/l); at BDC a = rω²(1 − r/l), both exact.
The piston is past mid-stroke before the crank reaches 90°.
Peak speed comes before 90° and is slightly above rω.
A crank counterweight cannot cancel the twice-per-turn force.



