時間序列︰生成函數‧漸近展開︰歐拉的天空《奇門》

若已熟悉白努利周期函數之性質︰

{\tilde{B}}_{n}^{'} (x) = n \cdot {\tilde{B}}_{n-1},  \ n \ge1

\int_{k}^{k+1} {\tilde{B}}_n (x) dx = 0, \ n \ge 1

{\tilde{B}}_{2n} (k+1) = {\tilde{B}}_{2n} (1) = {\tilde{B}}_{2n} (0) = B_{2n}, \ n \ge 1

{\tilde{B}}_{2n+1} (k+1) = {\tilde{B}}_{2n+1} (1) = - {\tilde{B}}_{2n+1} (0) = B_{2n+1} = 0, \ n \ge 1

果真知 B_0 (x) \equiv 1 ,白努利數唯一奇 B_1 \neq 0

既得白努利數之生成函數 G(t) = \frac{t}{e^t -1} 且先探其奇偶性乎?

……

關係一現機鋒出 G(-t) - G(t) = e^t G(t) - G(t) = t 。原來這個白努利數唯一奇 B_1- B_1 - B_1 = 1 ,不假它求數自知 B_1 = -\frac{1}{2} 。遞迴關係無覓處

(m+1) B_m = - \sum \limits_{k=0}^{m-1} \left( \begin{array}{ccc}   m+1 \\ k \end{array} \right) B_k

。恰恰此中得

t = \sum \limits_{m=0}^{\infty} B_m \frac{t^m}{m !} \cdot (e^t -1)

── 摘自《時間序列︰生成函數‧漸近展開︰白努利 □○《六》

 

那麼一招一式之推導

\int_{k}^{k+1} f(x) dx = \int_{k}^{k+1}  B_0 (x)  f(x) dx = \int_{k}^{k+1} \frac{d {\tilde{B}}_1 (x)}{dx} f(x) dx

= {\tilde{B}}_1 (x) f(x) |_{k^{+}}^{k+1{-}} - \int_{k}^{k+1} {\tilde{B}}_1 (x) f^{'} (x) dx

= {\tilde{B}}_1 (k+1^{-}) f(k+1) - {\tilde{B}}_1 (k^{+}) f(k) - \int_{k}^{k+1} {\tilde{B}}_1 (x) f^{'} (x) dx

= \frac{1}{2} \left[ f(k) + f(k+1) \right] - \int_{k}^{k+1} {\tilde{B}}_1 (x) f^{'} (x) dx

能入『求和』 vs. 『求積』關聯之門也。

\therefore \frac{1}{2} \left[ f(k) + f(k+1) \right] = \int_{k}^{k+1} f(x) dx + \int_{k}^{k+1} {\tilde{B}}_1 (x) f^{'} (x) dx

亦能曉

\frac{1}{2} \left[ f(0) + f(1) \right] = \int_{0}^{1} f(x) dx + \int_{0}^{1} {\tilde{B}}_1 (x) f^{'} (x) dx

\frac{1}{2} \left[ f(1) + f(2) \right] = \int_{1}^{2} f(x) dx + \int_{1}^{2} {\tilde{B}}_1 (x) f^{'} (x) dx

……

\frac{1}{2} \left[ f(k) + f(k+1) \right] = \int_{k}^{k+1} f(x) dx + \int_{k}^{k+1} {\tilde{B}}_1 (x) f^{'} (x) dx

……

\frac{1}{2} \left[ f(n-1) + f(n) \right] = \int_{n-1}^{n} f(x) dx + \int_{n-1}^{n} {\tilde{B}}_1 (x) f^{'} (x) dx

加之得

\sum \limits_{k=0}^{n} f(k) - \frac{1}{2} \left[ f(n)+f(0) \right] = \int_{0}^{n} f(x) dx + \int_{0}^{n} {\tilde{B}}_1 (x) f^{'} (x) dx

\sum \limits_{k=1}^{n} f(k) - \frac{1}{2} \left[ f(n)-f(0) \right] = \int_{0}^{n} f(x) dx + \int_{0}^{n} {\tilde{B}}_1 (x) f^{'} (x) dx

『取其便』之理矣。

如是者豈不會閱讀

證明

證明使用數學歸納法以及黎曼-斯蒂爾傑斯積分,下文中假設 {\begin{smallmatrix}f(x)\end{smallmatrix}}的可微次數足夠大,  {\begin{smallmatrix}a,b\in {\mathbb {Z}}\end{smallmatrix}}
為了方便,將原式的各項用不同顏色表示:
\sum _{{a<n\leq b}}f(n)={\color {red}\int _{{a}}^{{b}}f(t)\,{\mathrm {d}}t}+{\color {OliveGreen}\sum _{{r=0}}^{{k}}{\frac {(-1)^{{r+1}}B_{{r+1}}}{(r+1)!}}\cdot (f^{{(r)}}(b)-f^{{(r)}}(a))}+{\color {blue}{\frac {(-1)^{k}}{(k+1)!}}\int _{{a}}^{{b}}{\bar {B}}_{{k+1}}(t)f^{{(k+1)}}(t)}

  {\begin{smallmatrix}k=0\end{smallmatrix}}的情形

容易算出
{\bar {B}}_{1}(t)={\color {Purple}\left\langle t\right\rangle -{\frac {1}{2}}}
{\begin{aligned}\sum _{{a<n\leq b}}f(n)&=\int _{{a}}^{{b}}f(t)\,{\mathrm {d}}\left\lfloor t\right\rfloor \\&={\color {red}\int _{{a}}^{{b}}f(t)\,{\mathrm {d}}t}-\int _{{a}}^{{b}}f(t)\,{\mathrm {d}}\left\langle t\right\rangle \\&={\color {red}\int _{{a}}^{{b}}f(t)\,{\mathrm {d}}t}-\int _{{a}}^{{b}}f(t)\,{\mathrm {d}}({\color {Purple}\left\langle t\right\rangle -{\frac {1}{2}}})\\&={\color {red}\int _{{a}}^{{b}}f(t)\,{\mathrm {d}}t}-{\color {BurntOrange}\int _{{a}}^{{b}}f(t)\,{\mathrm {d}}{\bar {B_{1}}}(t)}\\\end{aligned}}
其中橙色的項通過分部積分可化為
{\begin{aligned}{\color {BurntOrange}\int _{{a}}^{{b}}f(t)\,{\mathrm {d}}{\bar {B_{1}}}(t)}&=(f(t){\bar {B_{1}}}(t))|_{{t=a}}^{{t=b}}-\int _{{a}}^{{b}}{\bar {B_{1}}}(t)\,{\mathrm {d}}f(t)\\&=f(b)B_{1}(\left\langle b\right\rangle )-f(a)B_{1}(\left\langle a\right\rangle )-{\color {blue}\int _{{a}}^{{b}}{\bar {B_{1}}}(t)f'(t)\,{\mathrm {d}}t}\\&={\color {OliveGreen}B_{1}\cdot (f(b)-f(a))}-{\color {blue}\int _{{a}}^{{b}}{\bar {B_{1}}}(t)f'(t)\,{\mathrm {d}}t}\\\end{aligned}}

假設  {\begin{smallmatrix}k=n-1\end{smallmatrix}}時原式成立

  \sum _{{a<n\leq b}}f(n)={\color {red}\int _{{a}}^{{b}}f(t)\,{\mathrm {d}}t}+{\color {OliveGreen}\sum _{{r=0}}^{{n-1}}{\frac {(-1)^{{r+1}}B_{{r+1}}}{(r+1)!}}\cdot (f^{{(r)}}(b)-f^{{(r)}}(a))}+{\color {blue}{\frac {(-1)^{{n-1}}}{n!}}\int _{{a}}^{{b}}{\bar {B}}_{{n}}(t)f^{{(n)}}(t)\,{\mathrm {d}}t}

處理積分(藍色項)

  {\begin{aligned}{\color {blue}{\frac {(-1)^{{n-1}}}{n!}}\int _{{a}}^{{b}}{\bar {B}}_{{n}}(t)f^{{(n)}}(t)\,{\mathrm {d}}t}&={\frac {(-1)^{{n-1}}}{n!}}\int _{{a}}^{{b}}{\frac {{\bar {B'}}_{{n+1}}(t)}{n+1}}f^{{(n)}}(t)\,{\mathrm {d}}t\\&={\frac {(-1)^{{n-1}}}{(n+1)!}}\int _{{a}}^{{b}}{\bar {B'}}_{{n+1}}(t)f^{{(n)}}(t)\,{\mathrm {d}}t\\&={\frac {(-1)^{{n-1}}}{(n+1)!}}\int _{{a}}^{{b}}f^{{(n)}}(t)\,{\mathrm {d}}{\bar {B}}_{{n+1}}(t)\\&={\frac {(-1)^{{n-1}}}{(n+1)!}}((f^{{(n)}}(t){\bar {B_{{n+1}}}}(t))|_{{t=a}}^{{t=b}}-\int _{{a}}^{{b}}{\bar {B}}_{{n+1}}(t)\,{\mathrm {d}}f^{{(n)}}(t))\\&={\frac {(-1)^{{n-1}}}{(n+1)!}}(f^{{(n)}}(b)B_{{n+1}}(\left\langle b\right\rangle )-f^{{(n)}}(a)B_{{n+1}}(\left\langle a\right\rangle )-\int _{{a}}^{{b}}{\bar {B}}_{{n+1}}(t)f^{{(n+1)}}(t)\,{\mathrm {d}}t)\\&={\frac {(-1)^{{n-1}}B_{{n+1}}}{(n+1)!}}\cdot (f^{{(n)}}(b)-f^{{(n)}}(a))-{\frac {(-1)^{{n-1}}}{(n+1)!}}\int _{{a}}^{{b}}{\bar {B}}_{{n+1}}(t)f^{{(n+1)}}(t)\,{\mathrm {d}}t)\\&={\color {OliveGreen}{\frac {(-1)^{{n+1}}B_{{n+1}}}{(n+1)!}}\cdot (f^{{(n)}}(b)-f^{{(n)}}(a))}+{\color {blue}{\frac {(-1)^{{n}}}{(n+1)!}}\int _{{a}}^{{b}}{\bar {B}}_{{n+1}}(t)f^{{(n+1)}}(t)\,{\mathrm {d}}t)}\\\end{aligned}}

將處理後的積分代入

  {\begin{aligned}\sum _{{a<n\leq b}}f(n)&={\color {red}\int _{{a}}^{{b}}f(t)\,{\mathrm {d}}t}+{\color {OliveGreen}\sum _{{r=0}}^{{n-1}}{\frac {(-1)^{{r+1}}B_{{r+1}}}{(r+1)!}}\cdot (f^{{(r)}}(b)-f^{{(r)}}(a))}+{\color {blue}{\frac {(-1)^{{n-1}}}{n!}}\int _{{a}}^{{b}}{\bar {B}}_{{n}}(t)f^{{(n)}}(t)\,{\mathrm {d}}t}\\&={\color {red}\int _{{a}}^{{b}}f(t)\,{\mathrm {d}}t}+{\color {OliveGreen}\sum _{{r=0}}^{{n-1}}{\frac {(-1)^{{r+1}}B_{{r+1}}}{(r+1)!}}\cdot (f^{{(r)}}(b)-f^{{(r)}}(a))}+{\color {OliveGreen}{\frac {(-1)^{{n+1}}B_{{n+1}}}{(n+1)!}}\cdot (f^{{(n)}}(b)-f^{{(n)}}(a))}+{\color {blue}{\frac {(-1)^{{n}}}{(n+1)!}}\int _{{a}}^{{b}}{\bar {B}}_{{n+1}}(t)f^{{(n+1)}}(t)\,{\mathrm {d}}t)}\\&={\color {red}\int _{{a}}^{{b}}f(t)\,{\mathrm {d}}t}+{\color {OliveGreen}\sum _{{r=0}}^{{n}}{\frac {(-1)^{{r+1}}B_{{r+1}}}{(r+1)!}}\cdot (f^{{(r)}}(b)-f^{{(r)}}(a))}+{\color {blue}{\frac {(-1)^{{(n)}}}{(n+1)!}}\int _{{a}}^{{b}}{\bar {B}}_{{n+1}}(t)f^{{(n+1)}}(t)\,{\mathrm {d}}t}\\\end{aligned}}

得到想要的結果。

 

,焉不能得出公式

The formula

If  m and  n are natural numbers and  f(x) is a complex or real valued continuous function for real numbers  x in the interval {\displaystyle [m,n],} then the integral

  I = \int_m^n f(x)\,dx

can be approximated by the sum (or vice versa)

  {\displaystyle S=f(m+1)+\cdots +f(n-1)+f(n)}

(see rectangle method). The Euler–Maclaurin formula provides expressions for the difference between the sum and the integral in terms of the higher derivatives  {\displaystyle f^{(k)}(x)} evaluated at the end points of the interval, that is to say when  {\displaystyle x=m} and {\displaystyle x=n.}

Explicitly, for a natural number  p and a function f(x) that is  p times continuously differentiable in the interval  {\displaystyle [m,n],} we have

{\displaystyle S-I=\sum _{k=1}^{p}{{\frac {B_{k}}{k!}}(f^{(k-1)}(n)-f^{(k-1)}(m))}+R}

where  B_{k} is the kth Bernoulli number (with  {\displaystyle B_{1}=1/2}) and  R is an error term which is normally small for suitable values of p and depends on  {\displaystyle n,m,p,} and  f.

The formula is often written with the subscript taking only even values, since the odd Bernoulli numbers are zero except for  {\displaystyle B_{1},} in which case we have[1][2]

{\displaystyle \sum _{i=m}^{n}f(i)=\int _{m}^{n}f(x)\,dx+{\frac {f(n)+f(m)}{2}}+\sum _{k=1}^{\lfloor p/2\rfloor }{\frac {B_{2k}}{(2k)!}}(f^{(2k-1)}(n)-f^{(2k-1)}(m))+R}

or alternatively

{\displaystyle \sum _{i=m+1}^{n}f(i)=\int _{m}^{n}f(x)\,dx+{\frac {f(n)-f(m)}{2}}+\sum _{k=1}^{\lfloor p/2\rfloor }{\frac {B_{2k}}{(2k)!}}(f^{(2k-1)}(n)-f^{(2k-1)}(m))+R.}

 

耶?!