22.05.2014 Views

Topic 2: The pendulum

Topic 2: The pendulum

Topic 2: The pendulum

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PHY321F — cp 2005 26<br />

of two coupled first order equations:<br />

dω<br />

dt = −Ω2 sin θ (5)<br />

dθ<br />

dt = ω (6)<br />

where ω is the angular velocity and θ is the angular position.<br />

<strong>The</strong>se equations can now be integrated using the Euler method.<br />

Suppose we know the position and velocity at a time t = i∆t. <strong>The</strong>n the<br />

above pair of coupled equations can be rewritten as<br />

ω i+1 = ω i − ∆t Ω 2 sin θ i (7)<br />

θ i+1 = θ i + ∆t ω i (8)<br />

(Note that this method can obviously be generalised to solve an arbitrary<br />

system of equations<br />

dy i<br />

dt = f i(y 1 , y 2 , . . . , y N , t)<br />

i = 1, . . . , N<br />

which can be written in a vector notation<br />

dy<br />

dt<br />

= f(y, t)<br />

This is the equation typically solved by a real ODE integrator.)<br />

Write a program (see example) to solve equations (3) and (4), and check that<br />

the result for small initial angular displacement is what you expect.<br />

This solution suffers from a defect: the computed solution does not conserve<br />

the energy E = 1 2 mL2 ω 2 +mgL(1−cos θ). Change your program to calculate<br />

the energy and show this.<br />

A slight modification, however, gives a system which does conserve energy.<br />

ω i+1 = ω i − ∆t Ω 2 sin θ i (9)<br />

θ i+1 = θ i + ∆t ω i+1 (10)<br />

This Euler-Cromer method is a first order area-preserving mapping. Such<br />

mappings exploit the symplectic structure of Hamilton’s equations — they<br />

preserve the canonical structure of these equations.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!