{'fraction_non_alphanumeric': 0.023076923076923078, 'fraction_numerical': 0.002797202797202797, 'mean_word_length': 5.75, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Mitigating the integration error in numerical simulations of Newtonian systems

We introduce a method for mitigating the numerical integration errors of linear, second‐order initial value problems. We propose a methodology for constructing an optimal state‐space representation that gives minimum numerical truncation error, and in this sense, is the optimal state‐space representation for modelling given phase‐space dynamics. To that end, we utilize a simple transformation of the state‐space equations into their variational form. This process introduces an inherent freedom, similar to the gauge freedom in electromagnetism. We then utilize the gauge function to reduce the numerical integration error. We show that by choosing an appropriate gauge function the numerical integration error dramatically decreases and one can achieve much better accuracy compared to the standard state variables for a given time‐step. Moreover, we derive general expressions yielding the optimal gauge functions given a Newtonian one degree‐of‐freedom ODE. For the n degrees‐of‐freedom case we describe MATLAB® code capable of finding the optimal gauge functions and integrating the given system using the gauge‐optimized integration algorithm. In all of our illustrating examples, the gauge‐optimized integration outperforms the integration using standard state variables by a few orders of magnitude. Copyright © 2006 John Wiley & Sons, Ltd.