Computational Physics with Maxima or R

Ch. 1   Numerical Differentiation, Quadrature, and Roots

Ted Woollett



            

A brief introduction to both R and Maxima is followed by examination of built-in and package tools for these three areas, with examples of use, and the design of homemade functions designed to employ the simplest numerical methods for these three areas of numerical work.

  1. --cp1.pdf : Ch. 1, Mar. 4, 2014, Maxima 5.28.0, R 3.0.1, 70 pages
  2. --cp1.tex : Ch. 1 Latex code file
  3. --cp1code.R : R code for Ch. 1, Mar. 4, 2014, R 3.0.1
  4. --cp1code.mac : Maxima code for Ch. 1 , Mar. 4, 2014, Maxima 5.28.0
  5. --cpnewton.mac : Maxima code for Ch. 1, Mar. 4, 2014, Maxima 5.28.0

Chapter 1 Topics

  1. Introduction to R and Maxima
  2. Numerical Derivative Functions in R
  3. Testing Simple Numerical Derivative Algorithms with R and Maxima
  4. Quadrature Functions in R and Maxima
  5. Testing Trapezoidal and Simpson's Rule Algorithms with R and Maxima
  6. Dealing with Unbounded Integrals and End Point Singularities
  7. Root Finding Functions in R and Maxima
  8. Simple Divide and Conquer Strategy
  9. Testing Newton-Raphson and Secant Methods with R and Maxima
  10. Testing Bigfloat Newton-Raphson with Maxima
  11. Margins and Outer Margin Area in R Plots
  12. Drawing Circles Using R


Example 1: Semiclassical Quantization of Molecular Vibrations

Examples of "bottom-up" programming in both R and Maxima for a physics problem which makes use of both quadrature and root finding.

  1. --example1.pdf : Example 1, Aug. 31, 2015, Maxima 5.28.0, R 3.0.1, 17 pages
  2. --example1.tex : Example 1 Latex code file
  3. --example1.R : R code for Example 1, Aug. 31, 2015, R 3.0.1
  4. --example1.mac : Maxima code for Example 1 , Aug. 31, 2015, Maxima 5.28.0
  5. --example1.zip : Example 1 zip file, Aug. 31, 2015
  6. --example1.tar.gz : Example 1 tar.gz file, Aug. 31, 2015


Project 1: Classical Rutherford Scattering in a Central Potential

Scattering theory notation, and plots of the effective potential, scattering trajectories, scattering angles, and differential scattering cross sections for the Rutherford potential (repulsive and attractive) and for the Lennard-Jones potential. Includes a brief introduction to Maxima's rk() function and R's ode() function, which are used for the scattering trajectory plots.

  1. --project1.zip : Project 1 zip file, Aug. 30, 2015
  2. --project1.tar.gz : Project 1 tar.gz file, Aug. 30, 2015
  3. --project1.pdf : Project 1, Aug. 30, 2015, Maxima 5.31.2, R 3.0.2, 56 pages
  4. --project1.tex : Project 1 Latex code file
  5. --cmass.R : R code for center of mass diagram, Aug. 30, 2015, R 3.0.2
  6. --coord.R : R code for coordinate diagram, Aug. 30, 2015, R 3.0.2
  7. --k1util.mac : Maxima utility functions, Aug. 30, 2015, Maxima 5.31.2
  8. --lennard_jones.mac : Aug. 30, 2015, Maxima 5.31.2
  9. --lennard_jones.R : Aug. 30, 2015, R 3.0.2
  10. --rutherford_attract.mac : Aug. 30, 2015, Maxima 5.31.2
  11. --rutherford_attract.R : Aug. 30, 2015, R 3.0.2
  12. --rutherford_repulse.mac : Aug. 30, 2015, Maxima 5.31.2
  13. --rutherford_repulse.R : Aug. 30, 2015, R 3.0.2
  14. --scatt.R :R code for scattering angle diagram, Aug. 30, 2015, R 3.0.2
  15. --sho1.R :R code for integration of simple harmonic oscillator, Aug. 30, 2015, R 3.0.2