Post Reply 
Yet another π formula
01-05-2021, 10:50 PM
Post: #4
RE: Yet another π formula
(01-04-2021 08:41 PM)Gerson W. Barbosa Wrote:  The alternate sum of the factors of the Wallis product tends to \(\pi\)/4 - 1/2 as \(n\) tends to infinity:

\(\lim_{n\rightarrow \infty } \left [ \frac{1}{1\cdot 3}-\frac{1}{3\cdot 5}+\frac{1}{5\cdot 7}-\frac{1}{7\cdot 9}+\frac{1}{9\cdot 11}-\frac{1}{11\cdot 13}+\frac{1}{13\cdot 15}-\frac{1}{15 \cdot 17}\pm \cdots +\frac{(-1)^{n-1}}{4n^{2}-1}\right ]=\frac{\pi }{4}-\frac{1}{2}\)

This converges to the constant significantly faster than the Wallis Product.
For 12 correct digits of \(\pi\) it requires \(\sqrt{10^{12}}\) terms instead of the \(10^{12}\) terms required by Wallis.

Where does this limit comes from ?

CAS can get pi/4 - 1/2, but the "proof" felt cheating.

Cas> expand(sum(1/((4*k-3)*(4*k-1))-1/((4*k-1)*(4*k+1)),k = (1 .. ∞)))      → 1/4*π-1/2

---

I find this remarkable formula for approximating the sum of alternating series.

Example: above pi formula, for 1000 terms

To reduce errors, do the sum in pairs, and backwards.

lua> s = 0
lua> for k=500,1,-1 do c=4*k-1; s=s+4/(c*(c*c-4)) end
lua> (s + 0.5) * 4
3.141592154089668

Add correction, from next 3 terms:

lua> function term(k) return (-1)^(k-1)/(4*k*k-1) end
lua> f1, f2, f3 = term(1001), term(1002), term(1003)
lua> s = s + (7*f1 - f2 - 2*f3)/12 -- alternate series correction

lua> (s + 0.5) * 4
3.141592653588056
lua> pi
3.141592653589793
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Yet another π formula - Gerson W. Barbosa - 01-04-2021, 08:41 PM
RE: Yet another π formula - Albert Chan - 01-05-2021 10:50 PM
RE: Yet another π formula - Albert Chan - 01-06-2021, 01:32 AM
RE: Yet another π formula - Albert Chan - 01-07-2021, 09:56 PM
RE: Yet another π formula - toml_12953 - 01-06-2021, 02:10 AM
RE: Yet another π formula - ttw - 01-06-2021, 03:44 AM
RE: Yet another π formula - Albert Chan - 01-09-2021, 09:22 PM
RE: Yet another π formula - Albert Chan - 11-06-2021, 06:28 PM



User(s) browsing this thread: 1 Guest(s)