Relative error
This activity belongs to the GeoGebra book The Domain of the Time.
As we saw in the previous activity, at a time t, the position of M in a vertical fall should theoretically displace by a distance h = |g|/2 t2.
However, in the animation, when M goes from rest (point P), to free fall, in a time interval dt, it displaces |g| dt2. In the next interval dt, the distance that separates M from P is 3 |g| dt2. In the following one, it’s 6 |g| dt2. After n intervals dt, the distance traveled is n(n+1) |g|/2 dt2. If a total time t has passed, then dt=t/n. Thus, the distance traveled in the animation is (n+1)/n |g|/2 t2.
This distance in the animation is slightly greater than the theoretical distance. The difference between the two is h/n. Therefore, the relative error (per unit) in the animation is 1/n, which equates to a percentage of 100/n.
Thus, the position M shifts slightly faster in the animation than in reality. If the initial position P is very close to the ground, the animation will be very brief, so n will be small, and the relative error will be large. The longer the fall lasts, the greater the value of n and the smaller the relative error.
In the table to the right of the following animation, the difference between M position in the animation and the theoretical position is shown in centimeters. The table also includes the value of n and the relative error percentage.
It is very easy to modify the script of the animation slider so that the position M' of a point coincides at all times with the theoretical position (thus eliminating the error). Simply change the instructions:
SetValue(v, v + dt g)
SetValue(M, M + dt v)
to:
SetValue(M', M' + dt (v +dt g/2))
SetValue(v, v + dt g)
This is what we have done with the orange point. So why don't we apply this same change to all the other constructions in this GeoGebra book? Well, because they would no longer work properly. The reason is that other movements, such as simple harmonic or pendular, cannot be adjusted as easily. Therefore, we have chosen to prioritize simplicity over precision, so that we can tackle more complex experiments with very simple tools.
GUION DEL DESLIZADOR anima
# Calculate the elapsed seconds dt; add one second if t1(1) < tt
SetValue(tt, t1(1))
SetValue(t1, First(GetTime(), 3))
SetValue(dt, (t1(1) < tt) + (t1(1) - tt)/1000)
# Register passing through an integer number of seconds and the corresponding height
SetValue(last, reg(1))
SetValue(reg, If(floor(t)>last, Append(floor(t), reg), reg))
SetValue(mark, If(floor(t)>last, Append(y(M), mark), mark))
# Move M and M' and control the endpoint
SetValue(M', M' + dt (v + dt g/2))
SetValue(v, v + dt g)
SetValue(M, M + dt v)
SetValue(N, N + 1)
SetValue(regD, Append(regD, y(M' - M)))
SetValue(regN, Append(regN, N))
StartAnimation(anima, y(M) > 0)
Author of the activity and GeoGebra construction: Rafael Losada.