#set document(title: "4.2 The Pendulum and Its Energy", author: "XYZ Homework") #set page(width: 8.5in, height: auto, margin: 1in) #import "@preview/cetz:0.5.2" #set text(font: ("STIX Two Text", "Libertinus Serif", "New Computer Modern"), size: 10.5pt, lang: "en") #show math.equation: set text(font: ("STIX Two Math", "New Computer Modern Math")) #set par(justify: true, leading: 0.62em, spacing: 0.9em) #set enum(spacing: 1.1em) // room between list items so tall inline fractions don't collide #set list(spacing: 1.1em) #set table(stroke: 0.5pt + rgb("#c7ccd3")) #let BLUE = rgb("#183B6F") // brand navy — section bars + example/solution labels (white on navy 11.09:1) #let ORANGE = rgb("#A94509") // brand primary-700 — AA-safe deep orange for TEXT (5.93:1 on white; raw brand #F37021 is 2.94:1 and must never carry text) #let RED = rgb("#DC2626") // brand error-600 #let GREEN = rgb("#059669") // brand success-600 (decoration only; small green text uses green-text #007942) #show heading.where(level: 1): it => block(width: 100%, above: 0pt, below: 16pt, fill: gradient.linear(BLUE, rgb("#2C5AA0")), inset: (x: 14pt, y: 12pt), radius: 3pt, text(fill: white, weight: "bold", size: 19pt, it.body)) #show heading.where(level: 2): it => block(width: 100%, above: 18pt, below: 10pt, fill: BLUE, inset: (x: 10pt, y: 6pt), radius: 2pt, text(fill: white, weight: "bold", size: 12pt, it.body)) #show heading.where(level: 3): it => text(fill: ORANGE, weight: "bold", size: 12.5pt, it.body) #show heading.where(level: 4): it => text(fill: BLUE, weight: "bold", size: 10.5pt, it.body) #let examplebox(label, title, body) = block(width: 100%, breakable: true, fill: rgb("#EFF1F5"), stroke: 0.5pt + rgb("#CFDDF0"), radius: 4pt, inset: 10pt, above: 12pt, below: 12pt)[ #block(below: 6pt)[#box(fill: BLUE, inset: (x: 6pt, y: 2pt), radius: 2pt, text(fill: white, weight: "bold", size: 8.5pt, label)) #h(0.4em) #strong[#title]] #body] // rail = decorative left rule (raw brand token); labelcolor = AA-safe label text shade #let notebox(label, rail, labelcolor, tint, body) = block(width: 100%, breakable: true, fill: tint, stroke: (left: 3pt + rail), inset: (left: 10pt, rest: 8pt), radius: (right: 4pt), above: 11pt, below: 11pt)[ #text(fill: labelcolor, weight: "bold", size: 7.5pt, tracking: 0.5pt)[#upper(label)] #linebreak() #body] #let solutionbox(body) = block(above: 4pt, below: 8pt)[ #text(fill: BLUE, weight: "bold", size: 8.5pt)[Solution] #linebreak() #body] #let figph(msg) = block(width: 100%, height: 60pt, fill: rgb("#f6f7f9"), stroke: (paint: rgb("#c7ccd3"), dash: "dashed"), radius: 4pt, inset: 10pt)[ #align(center + horizon, text(fill: rgb("#889"), style: "italic", size: 9pt, msg))] // Standardize inlined figure sizes: measure the natural CeTZ canvas, then scale to a // consistent envelope (aspect-aware; see build_typst.py FIG_* constants). Unlike the // print preamble, dimensions are FLOORED: in an editor a user can trim a figure to a // degenerate 1-D shape (a bare line), and w/h or tw/w would then divide by zero. #let _STD_W = 3.5 #let _WIDE_W = 5.6 #let _MAX_H = 3.4 #let _ASPECT_WIDE = 2.2 #let _UPSCALE_MAX = 1.15 #let stdfig(body) = context { let m = measure(body) let w = calc.max(m.width / 1in, 0.01) let h = calc.max(m.height / 1in, 0.01) let tw = if w / h > _ASPECT_WIDE { _WIDE_W } else { _STD_W } let s = calc.min(tw / w, _MAX_H / h, _UPSCALE_MAX) align(center, box(scale(x: s * 100%, y: s * 100%, reflow: true, body))) } #show figure: set block(breakable: false) #set figure(gap: 8pt) #show figure.caption: set text(size: 8.5pt, fill: rgb("#555")) == 4.2#h(0.6em)The Pendulum and Its Energy #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Objectives] - Convert the pendulum equation into a planar system and classify its two families of equilibria. - Show that the energy #math.equation(block: false, alt: "H open parenthesis x , y close parenthesis equals y squared / 2 minus cos x")[$H ( x , y ) = y^(2) / 2 − cos x$] is constant along solutions, so orbits are level curves of #math.equation(block: false, alt: "H")[$H$]. - Read swings, whirls, and the separatrix off the contour map, and explain the map by lifting it onto the energy surface. ] A pendulum — a mass on a rigid rod of length #math.equation(block: false, alt: "L")[$L$] — obeys #math.equation(block: false, alt: "θ double prime plus open parenthesis g / L close parenthesis sin θ equals 0")[$θ^(″) + ( g / L ) sin θ = 0$]. For small swings #math.equation(block: false, alt: "sin θ approximately equals θ")[$sin θ ≈ θ$], and this is Chapter 2's spring: oscillation at the natural frequency #math.equation(block: false, alt: "the square root of g / L")[$sqrt(g / L)$]. But a pendulum is not a spring. Push it hard enough and it goes #emph[over the top], something no linear equation ever does, so this section keeps the sine. Measuring time in units of #math.equation(block: false, alt: "the square root of L / g")[$sqrt(L / g)$] scrubs out the constants, leaving #math.equation(block: true, alt: "x double prime plus sin x equals 0 ,")[$x^(″) + sin x = 0 ,$] or, as a system, #math.equation(block: false, alt: "x prime equals y")[$x^(′) = y$], #math.equation(block: false, alt: "y prime equals minus sin x")[$y^(′) = − sin x$], where #math.equation(block: false, alt: "x")[$x$] is the angle from straight down and #math.equation(block: false, alt: "y")[$y$] the angular velocity. The system rests wherever #math.equation(block: false, alt: "y equals 0")[$y = 0$] and #math.equation(block: false, alt: "sin x equals 0")[$sin x = 0$]: the points #math.equation(block: false, alt: "open parenthesis n π , 0 close parenthesis")[$( n π , 0 )$]. At even multiples of #math.equation(block: false, alt: "π")[$π$] the pendulum hangs straight down; at odd multiples it balances upside down. Near the bottom, #math.equation(block: false, alt: "sin x approximately equals x")[$sin x ≈ x$] gives the center #math.equation(block: false, alt: "x double prime plus x equals 0")[$x^(″) + x = 0$] — closed loops, dimensionless period #math.equation(block: false, alt: "2 π")[$2 π$]. Near the top, setting #math.equation(block: false, alt: "u equals x minus π")[$u = x − π$] gives #math.equation(block: false, alt: "u double prime equals minus sin open parenthesis u plus π close parenthesis equals sin u approximately equals u")[$u^(″) = − sin ( u + π ) = sin u ≈ u$]: precisely the saddle in disguise from the last section, eigenvalues #math.equation(block: false, alt: "± 1")[$± 1$]. So the portrait must alternate — center, saddle, center, saddle — forever along the #math.equation(block: false, alt: "x")[$x$]-axis. What no linearization can say is how these local pictures knit together, and for that the pendulum volunteers a global gift. Multiply #math.equation(block: false, alt: "x double prime plus sin x equals 0")[$x^(″) + sin x = 0$] by #math.equation(block: false, alt: "x prime")[$x^(′)$] and recognize both terms as derivatives: #math.equation(block: false, alt: "the fraction d over d t open parenthesis the fraction 1 over 2 open parenthesis x prime close parenthesis squared minus cos x close parenthesis equals 0")[$frac(d, d t) ( frac(1, 2) ( x^(′) )^(2) − cos x ) = 0$]. The #emph[energy] {"functions":\["y","-sin(x)"\],"variables":\["x","y"\]} The linearization of #math.equation(block: false, alt: "x prime equals y")[$x^(′) = y$], #math.equation(block: false, alt: "y prime equals minus sin x")[$y^(′) = − sin x$] at any point, computed from the system itself. The alternation is visible in one entry: #math.equation(block: false, alt: "minus cos x")[$− cos x$] is #math.equation(block: false, alt: "minus 1")[$− 1$] at the hanging equilibria #math.equation(block: false, alt: "x equals 0 , ± 2 π")[$x = 0 , ± 2 π$] and #math.equation(block: false, alt: "plus 1")[$+ 1$] at the inverted ones #math.equation(block: false, alt: "x equals ± π")[$x = ± π$] — the sign flip that turns each center into a saddle and back. {"matrix":"\[\[-L,1\],\[1,-L\]\]"} (L-1)\*(L+1) At #math.equation(block: false, alt: "x equals π")[$x = π$] the Jacobian is #math.equation(block: false, alt: "[ 0, 1; 1, 0 ]")[$[ 0 & 1 \ 1 & 0 ]$], so #math.equation(block: false, alt: "det open parenthesis J minus λ I close parenthesis")[$det ( J − λ I )$] is the polynomial shown — whose roots are the eigenvalues #math.equation(block: false, alt: "± 1")[$± 1$] named above, one positive and one negative, which is exactly what a saddle is. (#math.equation(block: false, alt: "L")[$L$] stands for #math.equation(block: false, alt: "λ")[$λ$].) #math.equation(block: true, alt: "H open parenthesis x , y close parenthesis equals the fraction y squared over 2 minus cos x")[$H ( x , y ) = frac(y^(2), 2) − cos x$] — kinetic plus potential — is constant along every solution. That is a confession of imprisonment: each solution is confined for all time to a single level curve of #math.equation(block: false, alt: "H")[$H$]. To draw the complete phase portrait of an unsolvable nonlinear equation, no solving is required. Draw the contour map of #math.equation(block: false, alt: "H")[$H$]. {"camera":{"fov":50,"position":\[0,0,11\],"projection":"perspective","target":\[0,0,0\]},"grid":{"axisColors":{"x":"\#ef4444","y":"\#22c55e","z":"\#3b82f6"},"divisions":14,"gridColor":"\#e5e7eb","showAxes":true,"showLabels":true,"size":14,"visible":true},"id":"45826d8f-4d1b-4675-9819-cdf422062ebb","metadata":{"alt\_text":"A flat map of dark nested curves: small closed ovals ringing the points x = 0 and x = plus or minus 2 pi on the horizontal axis, a pair of curves crossing at x = plus or minus pi that form cat's-eye corners, and open wavy curves running left to right above and below everything. Each curve is one energy level of the pendulum, so each is one possible motion: back-and-forth swings inside the eyes, over-the-top spinning outside.","created\_at":"2026-08-01T00:00:00.000Z","description":"Fourteen level sets of the pendulum energy H(x, y) = y^2/2 - cos x on x in \[-6.5, 6.5\], y in \[-3, 3\], drawn at z = 0 and viewed face-on: the phase portrait of x'' + sin x = 0 as a contour plot, separatrix included.","tags":\["diffeq","phase-plane","pendulum","energy","contours"\],"updated\_at":"2026-08-01T00:00:00.000Z"},"objects":\[{"expression":"y\*y/2 - cos(x)","id":"a1fecd6d-6caf-4d72-aa63-3ed51a6a7ac2","kind":"contour-plot","label":{"text":"level sets of H = y^2/2 - cos x","visible":true},"levels":14,"style":{"color":"\#0f172a","dash":\[\],"lineWidth":2},"visible":true,"xDomain":\[-6.5,6.5\],"yDomain":\[-3,3\],"zOffset":0}\],"title":"Pendulum phase portrait as energy level sets","version":1} Fourteen level curves of the energy #math.equation(block: false, alt: "H open parenthesis x , y close parenthesis equals y squared / 2 minus cos x")[$H ( x , y ) = y^(2) / 2 − cos x$] on #math.equation(block: false, alt: "minus 6.5 less than or equal to x less than or equal to 6.5")[$− 6.5 ≤ x ≤ 6.5$], #math.equation(block: false, alt: "minus 3 less than or equal to y less than or equal to 3")[$− 3 ≤ y ≤ 3$], viewed face-on — the complete phase portrait of the pendulum. Closed ovals ring the resting equilibria at #math.equation(block: false, alt: "x equals 0")[$x = 0$] and #math.equation(block: false, alt: "x equals ± 2 π")[$x = ± 2 π$]; the self-crossing curve through #math.equation(block: false, alt: "open parenthesis ± π , 0 close parenthesis")[$( ± π , 0 )$] is the separatrix; the open wavy curves above and below it are over-the-top whirls. === Explore + #strong[Observe.] Three families of curves, three kinds of motion. The nested ovals around #math.equation(block: false, alt: "open parenthesis 0 , 0 close parenthesis")[$( 0 , 0 )$] and #math.equation(block: false, alt: "open parenthesis ± 2 π , 0 close parenthesis")[$( ± 2 π , 0 )$] are back-and-forth swings; the open curves running the full width of the window are whirls, over the top in the same direction forever; and the cat's-eye curve crossing itself at #math.equation(block: false, alt: "open parenthesis ± π , 0 close parenthesis approximately equals open parenthesis ± 3.14 , 0 close parenthesis")[$( ± π , 0 ) ≈ ( ± 3.14 , 0 )$] — the #emph[separatrix] — is the frontier between them. + #strong[Predict.] No arrows are drawn. Use #math.equation(block: false, alt: "x prime equals y")[$x^(′) = y$]: in the upper half-plane #math.equation(block: false, alt: "x")[$x$] must increase. Which way do the ovals circulate, and which way do the upper whirl curves run? Decide, then check that the lower half-plane tells a consistent story. + #strong[Verify.] The separatrix carries the energy of the balanced-upright state, #math.equation(block: false, alt: "H open parenthesis ± π , 0 close parenthesis equals 1")[$H ( ± π , 0 ) = 1$]. Setting #math.equation(block: false, alt: "x equals 0")[$x = 0$] in #math.equation(block: false, alt: "y squared / 2 minus cos x equals 1")[$y^(2) / 2 − cos x = 1$] gives #math.equation(block: false, alt: "y equals 2")[$y = 2$]: the cat's-eye should stand exactly #math.equation(block: false, alt: "2")[$2$] grid units above and below the origin. Check it against the grid. + #strong[Observe.] The whirl curves undulate: farthest from the axis over #math.equation(block: false, alt: "x equals 0")[$x = 0$] and #math.equation(block: false, alt: "x equals ± 2 π")[$x = ± 2 π$], closest over #math.equation(block: false, alt: "x equals ± π")[$x = ± π$]. A whirling pendulum is fastest through the bottom and slowest over the top — readable straight off the map. + #strong[Predict, then verify.] An oval reaching maximum angle #math.equation(block: false, alt: "x sub max")[$x_(max)$] has #math.equation(block: false, alt: "H equals minus cos x sub max")[$H = − cos x_(max)$], so it crosses the #math.equation(block: false, alt: "y")[$y$]-axis at height #math.equation(block: false, alt: "y equals the square root of 2 open parenthesis 1 minus cos x sub max close parenthesis equals 2 sin open parenthesis x sub max / 2 close parenthesis")[$y = sqrt(2 ( 1 − cos x_(max) )) = 2 sin ( x_(max) / 2 )$]. For the oval reaching out near #math.equation(block: false, alt: "x sub max approximately equals π / 2")[$x_(max) ≈ π / 2$], predict the height of its top — about #math.equation(block: false, alt: "1.4")[$1.4$] — then check. === The Lift Why should the level curves of a function #emph[be] the orbits of a system? The most convincing answer is to stop flattening. #math.equation(block: false, alt: "H")[$H$] is a function of two variables, so it is a landscape — a surface #math.equation(block: false, alt: "z equals H open parenthesis x , y close parenthesis")[$z = H ( x , y )$] standing over the phase plane — and a level curve is a horizontal slice of that landscape, dropped to the floor. The second figure performs the lift. {"camera":{"fov":50,"position":\[9,7,7\],"projection":"perspective","target":\[0,0,1.5\]},"grid":{"axisColors":{"x":"\#ef4444","y":"\#22c55e","z":"\#3b82f6"},"divisions":14,"gridColor":"\#e5e7eb","showAxes":true,"showLabels":true,"size":14,"visible":true},"id":"474f55e0-f7b3-4e9e-8a4d-5f3bfe79d0e3","metadata":{"alt\_text":"A half-transparent rolling surface shaped like an egg carton stretched along one direction - bowls at x = 0 and x = plus or minus 2 pi, saddle passes between them - floating above a flat sheet of dark curves at height zero. Every dark curve is a horizontal slice of the surface dropped to the floor, so the pendulum's phase portrait is revealed as the surface's contour map.","created\_at":"2026-08-01T00:00:00.000Z","description":"The pendulum energy H(x, y) = y^2/2 - cos x drawn twice in one scene: as a half-transparent explicit surface and as its own 14-level contour plot at z = 0, the contour-lift mechanism applied to a conservative system's phase portrait.","tags":\["diffeq","phase-plane","pendulum","energy","surface","contours"\],"updated\_at":"2026-08-01T00:00:00.000Z"},"objects":\[{"expression":"y\*y/2 - cos(x)","id":"ba14c2d0-692a-4e41-bd78-cdc7c045d62c","kind":"explicit-surface","label":{"text":"energy surface H(x, y) = y^2/2 - cos x","visible":true},"resolution":160,"style":{"colormap":"viridis","doubleSided":true,"opacity":0.5,"wireframe":false,"wireframeColor":"\#000000"},"visible":true,"xDomain":\[-6.5,6.5\],"yDomain":\[-3,3\]},{"expression":"y\*y/2 - cos(x)","id":"9f111d09-aadd-4bd0-924c-16adcb8e3961","kind":"contour-plot","label":{"text":"orbits = level sets of H","visible":true},"levels":14,"style":{"color":"\#0f172a","dash":\[\],"lineWidth":2},"visible":true,"xDomain":\[-6.5,6.5\],"yDomain":\[-3,3\],"zOffset":0}\],"title":"The energy surface above the pendulum phase portrait","version":1} The energy landscape #math.equation(block: false, alt: "z equals H open parenthesis x , y close parenthesis equals y squared / 2 minus cos x")[$z = H ( x , y ) = y^(2) / 2 − cos x$], half-transparent, floating above its own fourteen-level contour map in the plane #math.equation(block: false, alt: "z equals 0")[$z = 0$]. Bowls sit over the resting equilibria at #math.equation(block: false, alt: "x equals 0")[$x = 0$] and #math.equation(block: false, alt: "x equals ± 2 π")[$x = ± 2 π$]; mountain passes of height #math.equation(block: false, alt: "1")[$1$] sit over the saddle points #math.equation(block: false, alt: "open parenthesis ± π , 0 close parenthesis")[$( ± π , 0 )$]; every orbit on the floor is a horizontal slice of the surface overhead. + #strong[Observe.] The surface is an egg carton stretched along the #math.equation(block: false, alt: "x")[$x$]-direction — bowls at the hanging equilibria, passes between them — with walls climbing like #math.equation(block: false, alt: "y squared / 2")[$y^(2) / 2$] toward the front and back. Orbit the camera until you can see one floor curve and the surface slice directly above it at the same time. + #strong[Predict, then verify.] A horizontal slice below pass height (#math.equation(block: false, alt: "minus 1 less than H less than 1")[$− 1 < H < 1$]) is trapped inside one bowl; dropped to the floor it is a closed ring around a well — a swing. A slice above every pass (#math.equation(block: false, alt: "H greater than 1")[$H > 1$]) clears the whole range and runs unbroken from end to end — a whirl. Match each family on the floor to its slice height on the surface. + #strong[Observe.] The slice at exactly pass height, #math.equation(block: false, alt: "H equals 1")[$H = 1$], pinches onto the passes themselves: dropped down, it is the separatrix, crossing itself precisely at the saddle points. The frontier between swinging and whirling is the altitude of a mountain pass. === Connect One picture now settles questions that formulas struggle with. The bottom equilibrium is the floor of a bowl, and nearby slices are small closed rings: a pendulum nudged from rest swings near rest forever — stable, though not attracting, since nothing here dissipates. The top equilibrium is a mountain pass, terrain falling away on two sides, the slice through it crossing itself: the saddle instability of the last section, now with a topographic reason. Even timing is visible: ovals deep in a bowl are traversed with period near #math.equation(block: false, alt: "2 π")[$2 π$], ovals near the separatrix take longer and longer, and the separatrix itself takes forever — released ever closer to upside down, the pendulum hangs ever longer near the top before committing. The landscape also explains what conservation #emph[costs]. Add a little friction, #math.equation(block: false, alt: "x double prime plus c x prime plus sin x equals 0")[$x^(″) + c x^(′) + sin x = 0$], and the energy obeys #math.equation(block: false, alt: "the fraction d over d t H equals minus c y squared less than or equal to 0")[$frac(d, d t) H = − c y^(2) ≤ 0$]: the state can no longer hold its altitude and slides downhill across the level sets, every swing and every whirl eventually spiraling into some well. The contour map stops being the portrait, but the landscape still governs — now as terrain being descended. That is Chapter 2's inward spiral, seen from above. #examplebox("Example 1")[Over the top][ How fast must the pendulum move through its lowest point to go over the top? Launching from the bottom puts the state at #math.equation(block: false, alt: "open parenthesis 0 , y sub 0 close parenthesis")[$( 0 , y_(0) )$], with energy #math.equation(block: false, alt: "H equals y 0 2 / 2 minus cos 0 equals y 0 2 / 2 minus 1")[$H = y_(0)^(2) / 2 − cos 0 = y_(0)^(2) / 2 − 1$]. Clearing the top requires at least the energy of arriving there at rest, #math.equation(block: false, alt: "H open parenthesis ± π , 0 close parenthesis equals 1")[$H ( ± π , 0 ) = 1$]. So #math.equation(block: false, alt: "y 0 2 / 2 minus 1 greater than or equal to 1")[$y_(0)^(2) / 2 − 1 ≥ 1$], that is, #math.equation(block: false, alt: "y sub 0 greater than or equal to 2")[$y_(0) ≥ 2$]. The threshold case #math.equation(block: false, alt: "y sub 0 equals 2")[$y_(0) = 2$] launches exactly onto the separatrix — the pendulum creeps toward the balance point forever without arriving — and any #math.equation(block: false, alt: "y sub 0 greater than 2")[$y_(0) > 2$] lands on a whirl curve and goes over. Restoring units, the critical angular speed is #math.equation(block: false, alt: "2 the square root of g / L")[$2 sqrt(g / L)$]; for a one-meter pendulum with #math.equation(block: false, alt: "g equals 9.8")[$g = 9.8$], about #math.equation(block: false, alt: "6.3")[$6.3$] radians per second — almost exactly one full revolution per second. Check the threshold on the map: the separatrix meets the #math.equation(block: false, alt: "y")[$y$]-axis precisely at height #math.equation(block: false, alt: "2")[$2$]. ] #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ For a conservative system the phase portrait costs nothing: it is the contour map of the energy. Bowls make centers ringed by closed orbits, mountain passes make saddles, and the slice at pass height is the separatrix dividing swing from whirl. Lift the map onto the landscape, and every one of those sentences becomes something you can see. ]