ToolPythonIntermediate solve_ivp from the ground up: the pendulum beyond small angles drift = np.max(np.abs(E - E[0])) / E[0]