Jane Lawrence Sumner
  • Home
  • Research
  • CV
  • Teaching
    • Delta-Epsilon Proofs
    • Understanding Derivatives
    • Mean Value Theorem and Rolle's Theorem
    • Visualizing Riemann Sums (Intro to Integration)
    • Central Limit Theorem
  • Tools
    • 2Randomize
    • Electoral Rules Simulation
    • The GBAT
    • Word Doge

Visualizing Riemann Sums in R (Or: What is Integration, Really? For People Who Can't Draw At All)

Some people find it easy to immediately grasp mathematical concepts. Some people find it easy to visualize things in their heads. Some people can draw. I am in neither of those groups. If you are in the same subset of the population I am, the code below is for you. The code was written to show first-year political science Ph.D. students the logic behind integration and Riemann sums and to provide some example code for writing in R. In the first part of the code, you can enter the function you wish to integrate (where it says "the function to integrate") as well as set the bounds of integration and well as the number of boxes to draw. 

Instructions: edit any part of the code you wish. Run line by line, or highlight all and press run. Plot will appear. You can resize the plot by dragging at the edges.
Proudly powered by Weebly