Example problem: Conservation of energy