In mathematics , the Leibniz formula for π , named after Gottfried Wilhelm Leibniz , states that π 4 = 1 − 1 3 + 1 5 − 1 7 + 1 9 − ⋯ = ∑ k = 0 ∞ ( − 1 ) k 2 k + 1 , {\displaystyle {\frac {\pi }{4}}=1-{\frac {1}{3}}+{\frac {1}{5}}-{\frac {1}{7}}+{\frac {1}{9}}-\cdots =\sum _{k=0}^{\infty }{\frac {(-1)^{k}}{2k+1}},}
42-515: An alternating series . It is sometimes called the Madhava–Leibniz series as it was first discovered by the Indian mathematician Madhava of Sangamagrama or his followers in the 14th–15th century (see Madhava series ), and was later independently rediscovered by James Gregory in 1671 and Leibniz in 1673. The Taylor series for the inverse tangent function, often called Gregory's series ,
84-392: A 20000 {\displaystyle a_{20000}} is enough, but in fact this is twice as many terms as needed. Indeed, the error after summing first 9999 elements is 0.0000500025, and so taking the partial sum up through a 10000 {\displaystyle a_{10000}} is sufficient. This series happens to have the property that constructing a new series with
126-434: A k − ∑ k = 0 m ( − 1 ) k a k | ≤ | a m + 1 | . {\displaystyle \left|\sum _{k=0}^{\infty }(-1)^{k}\,a_{k}\,-\,\sum _{k=0}^{m}\,(-1)^{k}\,a_{k}\right|\leq |a_{m+1}|.} That does not mean that this estimate always finds the very first element after which error
168-403: A k − ∑ k = 0 m ( − 1 ) k a k = ∑ k = m + 1 n ( − 1 ) k a k = a m + 1 − a m + 2 + a m + 3 −
210-564: A m ≤ S n − S m {\displaystyle -a_{m}\leq S_{n}-S_{m}} . Since a m {\displaystyle a_{m}} converges to 0 {\displaystyle 0} , the partial sums S m {\displaystyle S_{m}} form a Cauchy sequence (i.e., the series satisfies the Cauchy criterion ) and therefore they converge. The argument for m {\displaystyle m} even
252-412: A m . {\displaystyle {\begin{aligned}S_{n}-S_{m}&=\sum _{k=0}^{n}(-1)^{k}\,a_{k}\,-\,\sum _{k=0}^{m}\,(-1)^{k}\,a_{k}\ =\sum _{k=m+1}^{n}\,(-1)^{k}\,a_{k}\\&=a_{m+1}-a_{m+2}+a_{m+3}-a_{m+4}+\cdots +a_{n}\\&=a_{m+1}-(a_{m+2}-a_{m+3})-(a_{m+4}-a_{m+5})-\cdots -a_{n}\leq a_{m+1}\leq a_{m}.\end{aligned}}} Since a n {\displaystyle a_{n}}
294-404: A m + 4 + ⋯ + a n = a m + 1 − ( a m + 2 − a m + 3 ) − ( a m + 4 − a m + 5 ) − ⋯ − a n ≤ a m + 1 ≤
336-400: A n {\textstyle \sum a_{n}} is absolutely convergent. Then, ∑ | a n | {\textstyle \sum |a_{n}|} is convergent and it follows that ∑ 2 | a n | {\textstyle \sum 2|a_{n}|} converges as well. Since 0 ≤ a n + |
378-436: A n | ≤ 2 | a n | {\textstyle 0\leq a_{n}+|a_{n}|\leq 2|a_{n}|} , the series ∑ ( a n + | a n | ) {\textstyle \sum (a_{n}+|a_{n}|)} converges by the comparison test . Therefore, the series ∑ a n {\textstyle \sum a_{n}} converges as
420-581: A n − a n + 1 {\displaystyle a_{n}-a_{n+1}} also gives an alternating series where the Leibniz test applies and thus makes this simple error bound not optimal. This was improved by the Calabrese bound, discovered in 1962, that says that this property allows for a result 2 times less than with the Leibniz error bound. In fact this is also not optimal for series where this property applies 2 or more times, which
462-600: A n > 0 for all n . Like any series, an alternating series is a convergent series if and only if the sequence of partial sums of the series converges to a limit . The alternating series test guarantees that an alternating series is convergent if the terms a n converge to 0 monotonically , but this condition is not necessary for convergence. The geometric series 1 / 2 − 1 / 4 + 1 / 8 − 1 / 16 + ⋯ sums to 1 / 3 . The alternating harmonic series has
SECTION 10
#1732793908989504-506: A finite sum but the harmonic series does not. The series 1 − 1 3 + 1 5 − … = ∑ n = 0 ∞ ( − 1 ) n 2 n + 1 {\displaystyle 1-{\frac {1}{3}}+{\frac {1}{5}}-\ldots =\sum _{n=0}^{\infty }{\frac {(-1)^{n}}{2n+1}}} converges to π 4 {\displaystyle {\frac {\pi }{4}}} , but
546-923: A small number of terms using Richardson extrapolation or the Euler–Maclaurin formula . This series can also be transformed into an integral by means of the Abel–Plana formula and evaluated using techniques for numerical integration . If the series is truncated at the right time, the decimal expansion of the approximation will agree with that of π for many more digits, except for isolated digits or digit groups. For example, taking five million terms yields 3.141592 4 _ 5358979323846 4 _ 643383279502 7 _ 841971693993 873 _ 058... {\displaystyle 3.141592{\underline {4}}5358979323846{\underline {4}}643383279502{\underline {7}}841971693993{\underline {873}}058...} where
588-547: Is arctan x = x − x 3 3 + x 5 5 − x 7 7 + ⋯ = ∑ k = 0 ∞ ( − 1 ) k x 2 k + 1 2 k + 1 . {\displaystyle \arctan x=x-{\frac {x^{3}}{3}}+{\frac {x^{5}}{5}}-{\frac {x^{7}}{7}}+\cdots =\sum _{k=0}^{\infty }{\frac {(-1)^{k}x^{2k+1}}{2k+1}}.} The Leibniz formula
630-420: Is a superparticular ratio , each numerator is an odd prime number, and each denominator is the nearest multiple of 4 to the numerator. The product is conditionally convergent; its terms must be taken in order of increasing p . Alternating series In mathematics , an alternating series is an infinite series of terms that alternate between positive and negative signs. In capital-sigma notation this
672-519: Is an integer divisible by 4. If N is chosen to be a power of ten, each term in the right sum becomes a finite decimal fraction. The formula is a special case of the Euler–Boole summation formula for alternating series, providing yet another example of a convergence acceleration technique that can be applied to the Leibniz series. In 1992, Jonathan Borwein and Mark Limber used the first thousand Euler numbers to calculate π to 5,263 decimal places with
714-550: Is continuous and converges uniformly, the proof is complete, where, the series ∑ n = 0 ∞ ( − 1 ) n 2 n + 1 {\displaystyle \sum _{n=0}^{\infty }{\frac {(-1)^{n}}{2n+1}}} to be converges by the Leibniz's test , and also, f ( z ) {\displaystyle f(z)} approaches f ( 1 ) {\displaystyle f(1)} from within
756-461: Is described by Johnsonbaugh error bound. If one can apply the property an infinite number of times, Euler's transform applies. A series ∑ a n {\textstyle \sum a_{n}} converges absolutely if the series ∑ | a n | {\textstyle \sum |a_{n}|} converges. Theorem: Absolutely convergent series are convergent. Proof: Suppose ∑
798-403: Is expressed ∑ n = 0 ∞ ( − 1 ) n a n {\displaystyle \sum _{n=0}^{\infty }(-1)^{n}a_{n}} or ∑ n = 0 ∞ ( − 1 ) n + 1 a n {\displaystyle \sum _{n=0}^{\infty }(-1)^{n+1}a_{n}} with
840-402: Is less than the modulus of the next term in the series. Indeed if you take 1 − 1 / 2 + 1 / 3 − 1 / 4 + . . . = ln 2 {\displaystyle 1-1/2+1/3-1/4+...=\ln 2} and try to find the term after which error is at most 0.00005, the inequality above shows that the partial sum up through
882-420: Is monotonically decreasing, the terms − ( a m − a m + 1 ) {\displaystyle -(a_{m}-a_{m+1})} are negative. Thus, we have the final inequality: S n − S m ≤ a m {\displaystyle S_{n}-S_{m}\leq a_{m}} . Similarly, it can be shown that −
SECTION 20
#1732793908989924-637: Is not absolutely convergent. The Mercator series provides an analytic power series expression of the natural logarithm , given by ∑ n = 1 ∞ ( − 1 ) n + 1 n x n = ln ( 1 + x ) , | x | ≤ 1 , x ≠ − 1. {\displaystyle \sum _{n=1}^{\infty }{\frac {(-1)^{n+1}}{n}}x^{n}=\ln(1+x),\;\;\;|x|\leq 1,x\neq -1.} The functions sine and cosine used in trigonometry and introduced in elementary algebra as
966-429: Is odd and m < n {\displaystyle m<n} , we obtain the estimate S n − S m ≤ a m {\displaystyle S_{n}-S_{m}\leq a_{m}} via the following calculation: S n − S m = ∑ k = 0 n ( − 1 ) k
1008-394: Is similar. The estimate above does not depend on n {\displaystyle n} . So, if a n {\displaystyle a_{n}} is approaching 0 monotonically, the estimate provides an error bound for approximating infinite sums by partial sums: | ∑ k = 0 ∞ ( − 1 ) k
1050-664: Is that addition of infinite sums is only commutative for absolutely convergent series. For example, one false proof that 1=0 exploits the failure of associativity for infinite sums. As another example, by Mercator series ln ( 2 ) = ∑ n = 1 ∞ ( − 1 ) n + 1 n = 1 − 1 2 + 1 3 − 1 4 + ⋯ . {\displaystyle \ln(2)=\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}}{n}}=1-{\frac {1}{2}}+{\frac {1}{3}}-{\frac {1}{4}}+\cdots .} But, since
1092-711: Is the gamma function . If s is a complex number , the Dirichlet eta function is formed as an alternating series η ( s ) = ∑ n = 1 ∞ ( − 1 ) n − 1 n s = 1 1 s − 1 2 s + 1 3 s − 1 4 s + ⋯ {\displaystyle \eta (s)=\sum _{n=1}^{\infty }{(-1)^{n-1} \over n^{s}}={\frac {1}{1^{s}}}-{\frac {1}{2^{s}}}+{\frac {1}{3^{s}}}-{\frac {1}{4^{s}}}+\cdots } that
1134-1758: Is the special case arctan 1 = 1 4 π . {\textstyle \arctan 1={\tfrac {1}{4}}\pi .} It also is the Dirichlet L -series of the non-principal Dirichlet character of modulus 4 evaluated at s = 1 , {\displaystyle s=1,} and therefore the value β (1) of the Dirichlet beta function . π 4 = arctan ( 1 ) = ∫ 0 1 1 1 + x 2 d x = ∫ 0 1 ( ∑ k = 0 n ( − 1 ) k x 2 k + ( − 1 ) n + 1 x 2 n + 2 1 + x 2 ) d x = ( ∑ k = 0 n ( − 1 ) k 2 k + 1 ) + ( − 1 ) n + 1 ( ∫ 0 1 x 2 n + 2 1 + x 2 d x ) {\displaystyle {\begin{aligned}{\frac {\pi }{4}}&=\arctan(1)\\&=\int _{0}^{1}{\frac {1}{1+x^{2}}}\,dx\\[8pt]&=\int _{0}^{1}\left(\sum _{k=0}^{n}(-1)^{k}x^{2k}+{\frac {(-1)^{n+1}\,x^{2n+2}}{1+x^{2}}}\right)\,dx\\[8pt]&=\left(\sum _{k=0}^{n}{\frac {(-1)^{k}}{2k+1}}\right)+(-1)^{n+1}\left(\int _{0}^{1}{\frac {x^{2n+2}}{1+x^{2}}}\,dx\right)\end{aligned}}} Considering only
1176-394: Is used in analytic number theory . The theorem known as the "Leibniz Test" or the alternating series test states that an alternating series will converge if the terms a n converge to 0 monotonically . Proof: Suppose the sequence a n {\displaystyle a_{n}} converges to zero and is monotone decreasing. If m {\displaystyle m}
1218-607: The alternating series test . For any series, we can create a new series by rearranging the order of summation. A series is unconditionally convergent if any rearrangement creates a series with the same convergence as the original series. Absolutely convergent series are unconditionally convergent . But the Riemann series theorem states that conditionally convergent series can be rearranged to create arbitrary convergence. Agnew's theorem describes rearrangements that preserve convergence for all convergent series. The general principle
1260-435: The harmonic series ∑ n = 1 ∞ 1 n , {\displaystyle \sum _{n=1}^{\infty }{\frac {1}{n}},} diverges, while the alternating version ∑ n = 1 ∞ ( − 1 ) n + 1 n , {\displaystyle \sum _{n=1}^{\infty }{\frac {(-1)^{n+1}}{n}},} converges by
1302-719: The squeeze theorem , as n → ∞ , we are left with the Leibniz series: π 4 = ∑ k = 0 ∞ ( − 1 ) k 2 k + 1 {\displaystyle {\frac {\pi }{4}}=\sum _{k=0}^{\infty }{\frac {(-1)^{k}}{2k+1}}} Let f ( z ) = ∑ n = 0 ∞ ( − 1 ) n 2 n + 1 z 2 n + 1 {\displaystyle f(z)=\sum _{n=0}^{\infty }{\frac {(-1)^{n}}{2n+1}}z^{2n+1}} , when | z | < 1 {\displaystyle |z|<1} ,
Leibniz formula for π - Misplaced Pages Continue
1344-457: The Leibniz formula can be used to calculate π to high precision (hundreds of digits or more) using various convergence acceleration techniques. For example, the Shanks transformation , Euler transform or Van Wijngaarden transformation , which are general methods for alternating series, can be applied effectively to the partial sums of the Leibniz series. Further, combining terms pairwise gives
1386-1502: The Leibniz formula. The Leibniz formula can be interpreted as a Dirichlet series using the unique non-principal Dirichlet character modulo 4. As with other Dirichlet series, this allows the infinite sum to be converted to an infinite product with one term for each prime number . Such a product is called an Euler product . It is: π 4 = ( ∏ p ≡ 1 ( mod 4 ) p p − 1 ) ( ∏ p ≡ 3 ( mod 4 ) p p + 1 ) = 3 4 ⋅ 5 4 ⋅ 7 8 ⋅ 11 12 ⋅ 13 12 ⋅ 17 16 ⋅ 19 20 ⋅ 23 24 ⋅ 29 28 ⋯ {\displaystyle {\begin{aligned}{\frac {\pi }{4}}&={\biggl (}\prod _{p\,\equiv \,1\ ({\text{mod}}\ 4)}{\frac {p}{p-1}}{\biggr )}{\biggl (}\prod _{p\,\equiv \,3\ ({\text{mod}}\ 4)}{\frac {p}{p+1}}{\biggr )}\\[7mu]&={\frac {3}{4}}\cdot {\frac {5}{4}}\cdot {\frac {7}{8}}\cdot {\frac {11}{12}}\cdot {\frac {13}{12}}\cdot {\frac {17}{16}}\cdot {\frac {19}{20}}\cdot {\frac {23}{24}}\cdot {\frac {29}{28}}\cdots \end{aligned}}} In this product, each term
1428-620: The Stolz angle, so from Abel's theorem this is correct. Leibniz's formula converges extremely slowly: it exhibits sublinear convergence . Calculating π to 10 correct decimal places using direct summation of the series requires precisely five billion terms because 4 / 2 k + 1 < 10 for k > 2 × 10 − 1 / 2 (one needs to apply Calabrese error bound ). To get 4 correct decimal places (error of 0.00005) one needs 5000 terms. Even better than Calabrese or Johnsonbaugh error bounds are available. However,
1470-785: The alternating factor (–1) is removed from these series one obtains the hyperbolic functions sinh and cosh used in calculus and statistics. For integer or positive index α the Bessel function of the first kind may be defined with the alternating series J α ( x ) = ∑ m = 0 ∞ ( − 1 ) m m ! Γ ( m + α + 1 ) ( x 2 ) 2 m + α {\displaystyle J_{\alpha }(x)=\sum _{m=0}^{\infty }{\frac {(-1)^{m}}{m!\,\Gamma (m+\alpha +1)}}{\left({\frac {x}{2}}\right)}^{2m+\alpha }} where Γ( z )
1512-407: The difference of two convergent series ∑ a n = ∑ ( a n + | a n | ) − ∑ | a n | {\textstyle \sum a_{n}=\sum (a_{n}+|a_{n}|)-\sum |a_{n}|} . A series is conditionally convergent if it converges but does not converge absolutely. For example,
1554-592: The integral in the last term, we have: 0 ≤ ∫ 0 1 x 2 n + 2 1 + x 2 d x ≤ ∫ 0 1 x 2 n + 2 d x = 1 2 n + 3 → 0 as n → ∞ . {\displaystyle 0\leq \int _{0}^{1}{\frac {x^{2n+2}}{1+x^{2}}}\,dx\leq \int _{0}^{1}x^{2n+2}\,dx={\frac {1}{2n+3}}\;\rightarrow 0{\text{ as }}n\rightarrow \infty .} Therefore, by
1596-571: The non-alternating series π 4 = ∑ n = 0 ∞ ( 1 4 n + 1 − 1 4 n + 3 ) = ∑ n = 0 ∞ 2 ( 4 n + 1 ) ( 4 n + 3 ) {\displaystyle {\frac {\pi }{4}}=\sum _{n=0}^{\infty }\left({\frac {1}{4n+1}}-{\frac {1}{4n+3}}\right)=\sum _{n=0}^{\infty }{\frac {2}{(4n+1)(4n+3)}}} which can be evaluated to high precision from
1638-698: The ratio of sides of a right triangle can also be defined as alternating series in calculus . sin x = ∑ n = 0 ∞ ( − 1 ) n x 2 n + 1 ( 2 n + 1 ) ! {\displaystyle \sin x=\sum _{n=0}^{\infty }(-1)^{n}{\frac {x^{2n+1}}{(2n+1)!}}} and cos x = ∑ n = 0 ∞ ( − 1 ) n x 2 n ( 2 n ) ! . {\displaystyle \cos x=\sum _{n=0}^{\infty }(-1)^{n}{\frac {x^{2n}}{(2n)!}}.} When
1680-939: The series ∑ k = 0 ∞ ( − 1 ) k z 2 k {\displaystyle \sum _{k=0}^{\infty }(-1)^{k}z^{2k}} converges uniformly, then arctan ( z ) = ∫ 0 z 1 1 + t 2 d t = ∑ n = 0 ∞ ( − 1 ) n 2 n + 1 z 2 n + 1 = f ( z ) ( | z | < 1 ) . {\displaystyle \arctan(z)=\int _{0}^{z}{\frac {1}{1+t^{2}}}dt=\sum _{n=0}^{\infty }{\frac {(-1)^{n}}{2n+1}}z^{2n+1}=f(z)\ (|z|<1).} Therefore, if f ( z ) {\displaystyle f(z)} approaches f ( 1 ) {\displaystyle f(1)} so that it
1722-1540: The series does not converge absolutely, we can rearrange the terms to obtain a series for 1 2 ln ( 2 ) {\textstyle {\tfrac {1}{2}}\ln(2)} : ( 1 − 1 2 ) − 1 4 + ( 1 3 − 1 6 ) − 1 8 + ( 1 5 − 1 10 ) − 1 12 + ⋯ = 1 2 − 1 4 + 1 6 − 1 8 + 1 10 − 1 12 + ⋯ = 1 2 ( 1 − 1 2 + 1 3 − 1 4 + 1 5 − 1 6 + ⋯ ) = 1 2 ln ( 2 ) . {\displaystyle {\begin{aligned}&{}\quad \left(1-{\frac {1}{2}}\right)-{\frac {1}{4}}+\left({\frac {1}{3}}-{\frac {1}{6}}\right)-{\frac {1}{8}}+\left({\frac {1}{5}}-{\frac {1}{10}}\right)-{\frac {1}{12}}+\cdots \\[8pt]&={\frac {1}{2}}-{\frac {1}{4}}+{\frac {1}{6}}-{\frac {1}{8}}+{\frac {1}{10}}-{\frac {1}{12}}+\cdots \\[8pt]&={\frac {1}{2}}\left(1-{\frac {1}{2}}+{\frac {1}{3}}-{\frac {1}{4}}+{\frac {1}{5}}-{\frac {1}{6}}+\cdots \right)={\frac {1}{2}}\ln(2).\end{aligned}}} In practice,
Leibniz formula for π - Misplaced Pages Continue
1764-712: The underlined digits are wrong. The errors can in fact be predicted; they are generated by the Euler numbers E n according to the asymptotic formula π 2 − 2 ∑ k = 1 N / 2 ( − 1 ) k − 1 2 k − 1 ∼ ∑ m = 0 ∞ E 2 m N 2 m + 1 {\displaystyle {\frac {\pi }{2}}-2\sum _{k=1}^{N/2}{\frac {(-1)^{k-1}}{2k-1}}\sim \sum _{m=0}^{\infty }{\frac {E_{2m}}{N^{2m+1}}}} where N
#988011