ライプニッツの公式(ライプニッツのこうしき、英語: Leibniz formula)とは円周率の値を求めるための公式の一つである。以下の級数で表される。 1 − 1 3 + 1 5 − 1 7 + 1 9 − ⋯ = π 4 {\displaystyle 1-{\frac {1}{3}}+{\frac {1}{5}}-{\frac {1}{7}}+{\frac {1}{9}}-\cdots ={\frac {\pi }{4}}}
これは初項が 1 で各項が奇数の逆数である交項級数が π / 4 (= 0.785398…) に収束することを意味する。総和の記号を用いると以下のようになる。 ∑ n = 0 ∞ ( − 1 ) n 2 n + 1 = π 4 {\displaystyle \sum _{n=0}^{\infty }{\frac {(-1)^{n}}{2n+1}}={\frac {\pi }{4}}}
この公式を名付けたのはライプニッツであるが、これはすでに15世紀のインドの数学者マーダヴァがライプニッツより300年ほど前に発見していたものである。公式の発見がマーダヴァの功績であることを示すためにマーダヴァ-ライプニッツ級数と呼ばれることもある。 三角関数の一つ tan θ を θ について微分すると d d θ tan θ = 1 + tan 2 θ {\displaystyle {\frac {\mathrm {d} }{\mathrm {d} \theta }}\tan \theta =1+\tan ^{2}\theta } となる。ここで tan θ = x とおくと d x d θ = 1 + x 2 , d θ d x = 1 1 + x 2 ⋯ ( 1 ) {\displaystyle {\frac {\mathrm {d} x}{\mathrm {d} \theta }}=1+x^{2},\quad {\frac {\mathrm {d} \theta }{\mathrm {d} x}}={\frac {1}{1+x^{2}}}\quad \cdots (1)} が導かれる。 また以下の等比級数を考える。 1 − x 2 + x 4 − x 6 + x 8 − ⋯ = 1 1 + x 2 ( 。 x 。 < 1 ) ⋯ ( 2 ) {\displaystyle 1-x^{2}+x^{4}-x^{6}+x^{8}-\cdots ={\frac {1}{1+x^{2}}}\qquad (|x|<1)\quad \cdots (2)} 左辺は公比が ?x2 であり、|?x2| < 1 すなわち |x| < 1 のとき 1/(1 + x2) に収束する。(1), (2)式から d θ d x = 1 − x 2 + x 4 − x 6 + x 8 − ⋯ ( 。 x 。 < 1 ) {\displaystyle {\frac {\mathrm {d} \theta }{\mathrm {d} x}}=1-x^{2}+x^{4}-x^{6}+x^{8}-\cdots \qquad (|x|<1)} が得られる。この両辺を x について項別積分
証明
冪級数展開を用いる証明
となる(この時、左辺をarctan xと表すとグレゴリー級数のかたちとなる)。(x = 0のとき θ = 0 であるから定数項は 0 である。)tan θ = x としたので θ = .mw-parser-output .sfrac{white-space:nowrap}.mw-parser-output .sfrac.tion,.mw-parser-output .sfrac .tion{display:inline-block;vertical-align:-0.5em;font-size:85%;text-align:center}.mw-parser-output .sfrac .num,.mw-parser-output .sfrac .den{display:block;line-height:1em;margin:0 0.1em}.mw-parser-output .sfrac .den{border-top:1px solid}.mw-parser-output .sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}π/4 のとき x = 1 である。これを利用して(3)式に θ = π/4 と x = 1 を代入すると π 4 = 1 − 1 3 + 1 5 − 1 7 + 1 9 − ⋯ {\displaystyle {\frac {\pi }{4}}=1-{\frac {1}{3}}+{\frac {1}{5}}-{\frac {1}{7}}+{\frac {1}{9}}-\cdots }
という式が現れる。ただし x = 1 は |x| < 1 の条件に反するので(3)式に x = 1 を代入できるかどうかが問題になるが、この場合は代入してもよいことが分かっている(アーベルの連続性定理)。 方形波をフーリエ級数で表す証明法もある。方形波 f(x) を f ( x ) = { − 1 − π ≤ x < 0 1 0 ≤ x < π {\displaystyle f(x)={\begin{cases}-1&\quad -\pi \leq x<0\\1&\quad 0\leq x<\pi \end{cases}}} と定義する(これは区分的に滑らかな関数で [?π, π) 上可積分である)と、フーリエ係数 an はこの方形波が奇関数なので 0 であり、bn は以下の式で表す。 b n = 1 π ∫ − π π f ( x ) sin n x d x = 1 π { ∫ − π 0 ( − 1 ) sin n x d x + ∫ 0 π 1 ⋅ sin n x d x } {\displaystyle {\begin{aligned}b_{n}&={\frac {1}{\pi }}\int _{-\pi }^{\pi }f(x)\sin nx\,dx\\&={\frac {1}{\pi }}\left\{\int _{-\pi }^{0}(-1)\sin nx\,dx+\int _{0}^{\pi }1\cdot \sin nx\,dx\right\}\\\end{aligned}}} これを計算すると以下のようになる。 b n = { 4 n π n = 2 k + 1 ( k ∈ N ) 0 n = 2 k {\displaystyle b_{n}={\begin{cases}{\dfrac {4}{n\pi }}&\quad n=2k+1\quad (k\in \mathbb {N} )\\0&\quad n=2k\\\end{cases}}} したがって方形波のフーリエ級数は f ( x ) = 4 π ( sin x + 1 3 sin 3 x + 1 5 sin 5 x + ⋯ ) {\displaystyle f(x)={\frac {4}{\pi }}\left(\sin x+{\frac {1}{3}}\sin 3x+{\frac {1}{5}}\sin 5x+\dotsb \right)}
フーリエ級数を用いた証明