Bernoulli numbers generating function

Let's assume that $g(x)$ is given and we try to find out $f(n)$

$$ f(n)=\sum_{i=1}^n g(i) $$

$$ f(n+1)=\sum_{i=1}^{n+1}g(i) $$

$$ f(n+1)-f(n)=g(n+1) \tag 1$$

We know Taylor expansion

$$ f(x+h)=f(x)+hf'(x)+\frac{h^2 f''(x)}{2!}+\frac{h^3f'''(x)}{3!}+.... $$

Thus

$$ f(n+1)=f(n)+f'(n)+\frac{f''(n)}{2!}+\frac{f'''(n)}{3!}+.... $$

If we put $f(n+1)$ taylor expansion in Equation $1$

$$f(n+1)-f(n)=g(n+1)$$ $$ f(n)+f'(n)+\frac{f''(n)}{2!}+\frac{f'''(n)}{3!}+....-f(n)=g(n+1) $$

$$ f'(n)+\frac{f''(n)}{2!}+\frac{f'''(n)}{3!}+...=g(n+1) \tag 2$$

$$ f(n)+\frac{f'(n)}{2!}+\frac{f''(n)}{3!}+\frac{f'''(n)}{4!}+...=\int g(n+1) dn $$

We need $f(n)$ if so we need to cancel $f'(n)$ . So we need to

$$ -\frac{1}{2} ( f'(n)+\frac{f''(n)}{2!}+\frac{f'''(n)}{3!}+...)=-\frac{1}{2}g(n+1) $$

$$ f(n)+ (-\frac{1}{2.2} +\frac{1}{3!})f''(n)+(-\frac{1}{2.3!} +\frac{1}{4!})f'''(n)+...=\int g(n+1) dn-\frac{1}{2}g(n+1) $$

$$ f''(n)+\frac{f'''(n)}{2!}+\frac{f^{4}(n)}{3!}+...=\frac{d(g(n+1))}{dn} $$

If you continue in that way to cancel $f^{r}(n)$ terms step by step, you will get

$$ f(n)=\int g(n+1) dn-\frac{1}{2}g(n+1)+\frac{1}{12}\frac{d(g(n+1))}{dn}+a_4\frac{d^2(g(n+1))}{dn^2}+a_5\frac{d^3(g(n+1))}{dn^3}+... $$

This is Euler-Maclaurin formula. (Please see also the Applications of the Bernoulli numbers). I just wanted to show Bernoulli numbers seen in one of the very important formulas in mathematics .

Where $$a_n=  \frac{B_n}{n!}$$.

Because If you try to find out the coefficients of $\frac{t}{e^t-1}$ by polynomial division. You can get exactly same coefficients that seen in Euler-Maclaurin formula.

The Bernoulli numbers appear in Jacob Bernoulli's most original work "Ars Conjectandi" published in Basel in 1713 in a discussion of the exponential series.

You can also see that The Bernoulli numbers appears in the power series of $tan(x)$. https://en.wikipedia.org/wiki/Taylor_series (Check the List of Maclaurin series of some common functions)


Proof: $$\frac{t}{e^t-1}=\frac{t}{t+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}=1+\frac{(1-1)t-\frac{t^2}{2!}-\frac{t^3}{3!}-\frac{t^4}{4!}-...}{t+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}=1-\frac{+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}{t+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}$$

$$\frac{t}{e^t-1}=1-\frac{t}{2}+\frac{+(\frac{1}{2}-\frac{1}{2!})t^2+(\frac{1}{2.2!}-\frac{1}{3!})t^3+(\frac{1}{2.3!}-\frac{1}{4!})t^4+...}{t+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}=1-\frac{t}{2}+\frac{(\frac{1}{2.2!}-\frac{1}{3!})t^3+(\frac{1}{2.3!}-\frac{t^4}{4!})t^4+...}{t+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}$$

$$\frac{t}{e^t-1}=1-\frac{1}{2}t+\frac{\frac{1}{12}t^3+\frac{1}{24}t^4+...}{t+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}=1-\frac{1}{2}t+\frac{1}{12}t^2+\frac{(\frac{1}{24}-\frac{1}{2.12})t^4+...}{t+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}$$