Skip to content
Various examples of calculating pi via numerical integration
Jupyter Notebook
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
figures
.gitignore
LICENSE
Numerical Integration for Pi.ipynb
README.md

README.md

Numerical Integration for Pi

Author: Jonah Miller (jonah.maxwell.miller@gmail.com)

Description

This is a Jupyter notebook that shows several ways to compute the number pi via numerical integration. This was inspired by discussion on several posts on reddit's DataIsBeautiful subreddit.

Here's a summary of the results:

summary plot

The area under the curve on the left is pi. The plot on the right compares errors in various estimates of that area.

Reading

Just click on integration-for-pi.ipynb in the repository.

Playing with it yourself:

If you have python3, Jupyter, and the scientific python stack installed, just run:

git clone https://github.com/Yurlungur/numerical-integration-for-pi.git
cd numerical integration-for-pi
jupyter notebook
You can’t perform that action at this time.