From charlesreid1

No edit summary
No edit summary
Line 11: Line 11:
Variables: number of terms, amount of time, and amount of accuracy.
Variables: number of terms, amount of time, and amount of accuracy.


Implement the following methods of calculating Pi using a for loop.
=Worksheet Questions=


For each method implemented, calculate Pi using 100, 1,000, and 10,000 terms in the series.
* Implement (2) methods of calculating pi using a for loop.


For each calculation, calculate the absolute error and calculate the amount of time the calculation took.
* For each method implemented, calculate pi using 100, 1k, and 10k terms in the series.
 
* Calculate the absolute error and clock time of each calculation.
 
* Create a plot of degree of accuracy versus number of terms. Use a log-log plot.
 
* Why does the plot from the previous question require log scales?


=References=
=References=

Revision as of 01:03, 11 May 2016

In this worksheet we study the convergence behavior of the series:

$ \sum_{i=1}^{\infty} \dfrac{1}{n^2} = \dfrac{\pi^2}{6} $

Explore a couple of methods of calculating pi, compare the results of a few methods, compare the computational cost. Push the limits.

Incorporate some kind of timing, I don't know.

Variables: number of terms, amount of time, and amount of accuracy.

Worksheet Questions

  • Implement (2) methods of calculating pi using a for loop.
  • For each method implemented, calculate pi using 100, 1k, and 10k terms in the series.
  • Calculate the absolute error and clock time of each calculation.
  • Create a plot of degree of accuracy versus number of terms. Use a log-log plot.
  • Why does the plot from the previous question require log scales?

References

Basel problem: https://en.wikipedia.org/wiki/Basel_problem

Proving the series converges (multiple ways): https://www.youtube.com/watch?v=9euTxoCC8Hk

Background on other convergent series: https://plus.maths.org/content/infinite-series-surprises

Ways of calculating pi: http://pi3.sites.sheffield.ac.uk/tutorials/week-7

Flag

Link to all worksheets idea list: Worksheets

Calc II:


Calc III: