September 30, 2014 --- Class 11 --- Graphing options, Higher Order Algorithms,
Introduction to Mathematica
Activities:
Some graphing options
Axis has useful options to break lines, label lines and
add color to the plot. I demonstrated several of these
in the file ~sg/chap4/euler_energy.ax. This graph shows
how the energy grows when using the Euler algorithm and three
different step sizes. Students should make a similar graph but
for the Euler-Cromer algorithm. In that case, the energy
does not grow, it oscillates around the correct value.
The amplitude of oscillation decreases when the step size
decreases.
Higher order algorithms
We talked about several algorithms including leap frog,
Adams-Bashforth and Runge-Kutta. Euler-Richardson is
basically the 2nd order Runge-Kutta algorithm. We also
talked about the 4th order Runge-Kutta algorithm. Many of
these algorithms are presented in Appendix 3A of Chapter 3.,
starting on page 74. There are two typos in the book regarding
the 4th order R-K algorithm. In Eq. (3.61g), the right-hand-
side should be multiplied by Delta t. In Eq. (3.61h), k_3x
on the RHS should be k_3v. Corrections to the textbook can
be found at http://physics.clarku.edu/sip/3e/updates.html .
You may also find more about these algorithms in "Numerical
Analysis" by Burden and Faires, or "Numerical Recipes" by
Press et al.
My notes can be found at
http://www.physics.indiana.edu/~sg/p609/ode_algorithms.pdf
or on the cluster in ~sg/ode_algorithms.pdf .
We also looked briefly at the documentation for the GNU
Scientific Library and saw that a large number of algorithms
are available.
Introduction to Mathematica
A nine page handout on Mathematica is available at
~sg/mathematica_notes_sg_extended.pdf
Over the next several classes we will go through the notes
and the examples it contains.
It appears that not many class members are familiar with
Mathematica. We covered Secs. A to C and will continue
from there.