Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/sage/RiemannSumSampler.sagews
Views: 972
The purpose of this worksheet is to help illustrate the concept of Riemann sum.
It allows you to compare, both numerically and graphically, namely the definite integral of any function over any interval and its left / right / middle Riemann sum with respect to the partition of into subintervals of equal width.
First draft
In the cell below:
Make your own choices for , , and .
Set if you want a left Riemann sum, for a right one, and for a middle one.
Evaluate and see the output.
Using the interactive capabilities of SageMath
Evaluating the following cell will do the same thing as above, with some of the user-friendly options provided by @interact. See http://wiki.sagemath.org/interact/ for more examples.
Sharing our interact with the help of SageMathCell
Entering the above code in SageMathCell allows us to share this interact easily. Here it is.