# PendulumMotion

This is a simulation of the motion of a simple pendulum. The darker color is for the true, nonlinear motion, while the lighter color is for the usual simplification (linearization of the second-order differential equation) that leads to simple harmonic motion. The basic calculation implemented here is taken from the NSolveODE documentation. To set up a simulation run, set the "time" slider to zero, adjust the other parameter sliders as needed, then press the space bar. The time will advance and the two pendulum objects will move. To see a slo-mo version, after setting the time to zero, use the right-arrow key, holding it down. The graphs are for the angular displacement vs. time, and you can see what will happen to the motion before running it. That is, these graphs will modify according to the parameter settings as you adjust those; then run the motion and see how that motion relates to the graphs. Many combinations of parameters are of course possible; here are a few interesting ones. The notation is [initial angle, initial angular velocity, damping coefficient, pendulum length]. [0.9, -4.9, 0.3, 2]; [1.0, -3.8, 0, 2]; [1.1, 3.8, 0, 2] (this one goes around, so the nonlinear graph just increases offscale); [0.4, 0, 0, 2] (slowly diverges); [0, -4.4, 0, 2] (starts from rest at bottom, gets a big push, almost goes around). The initial angle is restricted to be in the fourth or first quadrants, and the initial angular velocity can be in either direction (so zero is in the center of the slider). The time slider is scaled to 0-1; the time base of the ODE solutions is 40 seconds. Note how for small initial angles and zero initial velocity the two motions are essentially identical; this is of course the basis of the usual linearization (since the sine of a small angle, in radians, is nearly equal to that angle, in radians).