How to code this formula in Mathematica to approximate $\pi$? Thanks for your help!
$$\frac4{\pi}=1+\cfrac{1^2}{2+\cfrac{3^2}{2+\cfrac{5^2}{2+\cfrac{7^2}{2+\cdots}}}}$$
|
How to code this formula in Mathematica to approximate $\pi$? Thanks for your help! $$\frac4{\pi}=1+\cfrac{1^2}{2+\cfrac{3^2}{2+\cfrac{5^2}{2+\cfrac{7^2}{2+\cdots}}}}$$ |
||||
|
|
Pick a termination point less than |
|||
|
|
|
||||
|
|
|
A quick hack :) (some one good in Mathematica can make this more functional )
Showing speed of convergence
|
||||
|
|
|
Michael's method of using
The other methods I mentioned in this answer can also be adapted to this case. |
|||
|
|
|
Lord Brouncker's Formula is the same as:
so for something simple in Mathematica
|
|||
|
|