It is important to consider the consequence of modeling the algebraic condition for the acceleration ¨ g instead of the position g: only the relative acceleration ¨ g is zero. Approximations during the numerical integration may cause deviations in g and ˙ g. Also, initial values not satisfying the conditions g = 0 and ˙ g = 0 will cause a violation of the algebraic condition. The following shows the necessary modifications to the code based on the initial example.