Added energy conservation to the double_pendulum file