A = (xb - xa cos(omega T)) / sin(omega T) B = xa x = A sin(omega t) + B cos(omega t) v = d(x,t) f = m / 2 (v^2 - omega^2 x^2) S = defint(f, t, 0, T) "Verify equation (3)" check(x == (xb - xa cos(omega T)) / sin(omega T) sin(omega t) + xa cos(omega t)) "ok" "Verify equation (4)" check(v == (xb - xa cos(omega T)) / sin(omega T) omega cos(omega t) - xa omega sin(omega t)) "ok" "Verify equation (5)" x0 = eval(x,t,0) v0 = eval(v,t,0) xT = eval(x,t,T) vT = eval(v,t,T) check(S == m / 2 (vT xT - v0 x0)) "ok" "Verify equation (6)" check(v0 == omega (xb - xa cos(omega T)) / sin(omega T)) "ok" "Verify equation (7)" check(vT == omega (xb cos(omega T) - xa) / sin(omega T)) "ok" "Verify equation (8)" check(S == m / 2 omega ((xb^2 + xa^2) cos(omega T) - 2 xb xa) / sin(omega T)) "ok"
Run