Yet another π formula
|
11-25-2024, 10:01 PM
Post: #24
|
|||
|
|||
RE: Yet another π formula
Σ((-1)^k/(2k+1), k=0..inf) = atan(1) = pi/4
Σ((-1)^k/(2k+1)/(2k+3), k=0..inf) = (pi/4 - 0.5/(1)) / 1 = pi/4 - 1/2 Σ((-1)^k/(2k+1)/(2k+3)/(2k+5), k=0..inf) = ((pi/4 - 1/2) - 0.5/(1*3)) / 2 = pi/8 - 1/3 ... With this pattern, we can build formula for left hand side, S = pi / c1 - c2 lua> N = 40 -- number of consecutive odd numbers for LHS denominator lua> c1, c2, t = 4, 0, 1 -- start from atan(1) = pi/4 lua> for i=2,N do c1=c1*(i-1); c2=(c2+0.5/t)/(i-1); t=t*(2*i-1) end pi = c1*c2 + c1*S lua> c1*c2 -- close enough to pi, we only need tiny correction. 3.141592653588783 lua> c1*c2 + c1 * (1-1/(2*N+1))/t -- 2 terms for S 3.141592653589793 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)