Exercise 2:
The file ending with “Version2” contains the same code as the file ending with “Version1” except that a few lines have been added in order to also calculate and plot the non-relativistic energy. Locate the line where the non-relativistic energy is calculated. (The same line appears both inside the loop and before the loop.) Explain why this line is correct. You will need to be very careful with the units and the factors of . Write down the equation for non-relativistic energy (including both rest energy and non-relativistic kinetic energy), and carefully argue why this line of code is correct.
Execute this code, and look at the plot of energy versus time. Why does this plot have the shape that it has? How large is the kinetic energy compared to the rest energy after the proton has been accelerating for 1 second?