Simple gravity pendulum

[color=#0000ff][i][color=#0000ff][i][color=#999999]This activity belongs to the GeoGebra book [url=https://www.geogebra.org/m/mes4bgft]The Domain of the Time[/url].[/color][/i][/color][/i][/color][br][br]This animation simulates the motion of a simple pendulum in [b]real time[/b], disregarding the weight of the rod and friction. The animation [b]does not use formulas[/b] (neither trigonometry, nor equations, nor differential calculus), but only performs the necessary variations in the vectors that direct the movement.[br][br]A mass, represented by the blue point, is located at the end of the rod, whose initial position you can place anywhere on the left side of the circle, up to an amplitude of 175º. (The [i]angular amplitude[/i] is the maximum angle that the pendulum reaches concerning its vertical position.)[br][br]The animation varies at each moment both the velocity vector [b][color=#cc0000]v[/color][/b] (in red) and the position [color=#0000ff]M[/color] of the mass, due to the action of gravity, whose constant acceleration is represented by the vector [b][color=#6aa84f]g[/color][/b] (in dashed green line). This vector can be decomposed into two components: one perpendicular to the rod (in green, [color=#6aa84f][b]gt[/b][/color]​) and another in the direction of the rod, which does not affect the movement because its effect is canceled out by the rigidity of the rod or, in the case of a string, by the tension in the string ([i]principle of action and reaction, Newton's third law[/i]).[br][br]We adapt the slider animation script:[br][br] SetValue([b][color=#cc0000]v[/color][/b], [b][color=#cc0000]vt[/color][/b] + [i]dt[/i] [color=#6aa84f][b]gt[/b][/color])[br][br]That is, each time a very small amount of time [i]dt[/i] passes, by definition of acceleration, the velocity increases by [i]dt [/i][color=#6aa84f][b]gt[/b][/color].[br][list][*][color=#999999]Note: [/color][b][color=#cc0000]vt[/color][/b][color=#999999] is a vector with the same magnitude as [/color][b][color=#cc0000]v[/color][/b][color=#999999], but always retains the same direction perpendicular to the rod; it is necessary to change [/color][b][color=#cc0000]v[/color][/b][color=#999999] to [/color][color=#cc0000][b]vt[/b][/color][color=#999999] since if we directly added [/color][b][color=#cc0000]v[/color][/b][color=#999999] with [/color][i]dt[/i][b] [/b][color=#6aa84f][b]gt[/b][/color][color=#999999], the vector [/color][b][color=#cc0000]v[/color][/b][color=#999999] would gradually lose that perpendicularity, as the direction of [/color][b][color=#cc0000]v[/color][/b][color=#999999] a moment before is no longer perpendicular to the rod a moment [/color][i]dt[/i][color=#999999] later.[/color][/*][/list]Observe that for small amplitudes (less than approximately 10º), the period [i]T[/i] is practically constant and equal to the period [i]T[sub]0[/sub][/i]​ of simple harmonic motion (SHM), as the next activity ("Simple pendulum and SHM") will show.[br][br]The result fits quite well with reality, even for large angular amplitudes, for which the approximation of pendular motion to that of SHM is not good, as you can verify. Beyond 130º, the calculation of the theoretical period involves working with excessively large numbers, which makes it impossible for GeoGebra to calculate it with sufficient precision, while the period of the animation continues to fit quite well with the ideal model. For amplitudes greater than 175º, the period would continue to increase and tends to infinity as the amplitude approaches 180º.
[b]SCRIPT FOR SLIDER anima[/b][br][br][color=#cc0000][color=#cc0000]# Calculate the elapsed seconds dt; add one second if t1(1) < tt[/color][/color][br][color=#999999]SetValue(tt, t1(1))[br]SetValue(t1, First(GetTime(), 3))[br]SetValue(dt, (t1(1) < tt) + (t1(1) − tt)/1000)[/color][br][br][color=#cc0000]# Move M [/color][br][color=#999999][color=#999999]SetValue[/color](aux, vt)[/color][br][color=#0000ff]SetValue(v, vt + dt gt)[/color][br][color=#999999][color=#999999]SetValue[/color](M, M + dt v)[/color][br][br][color=#cc0000]# Record the period time and the number of complete oscillations[/color][br][color=#0000ff][color=#0000ff]SetValue[/color](reg, If(x(aux) < 0 ∧ x(vt) > 0, Append(t, reg), reg))[br][color=#0000ff]SetValue[/color](osci, If(x(aux) < 0 ∧ x(vt) > 0, osci + 1, osci))[br][br][br][br][br][br][color=#999999][color=#999999][color=#0000ff][color=#0000ff][color=#999999][color=#999999]Author of the activity and GeoGebra construction: [/color][/color][/color][color=#0000ff][color=#999999][color=#999999][url=https://www.geogebra.org/u/rafael]Rafael Losada[/url].[/color][/color][/color][/color][/color][/color][/color]

Information: Simple gravity pendulum