Series Summation — Approximating Infinite Series
Series are a very practical branch of mathematics, and the summation of series is one of the core topics in the study of series. Many problems can be expressed as a sum or a product of a series, that is, operations of the type $\sum_{i=1}^n f(i)$ or $\prod_{i=1}^n f(i)$. Here $\ln(\prod_{i=1}^n f(i))=\sum_{i=1}^n \ln(f(i))=k$, and therefore $\prod_{i=1}^n f(i)=e^k$, which means that computing a series product can also be reduced to computing a series sum. In other words, we can focus our attention on series summation.
To tackle the general problem of series summation, let us consider the solution of the following equation:
$$f(x+\epsilon)-f(x)=g(x)\tag{1}$$where g(x) is a known function of the variable x, $\epsilon $ are constants, and the initial condition is $f(k)=b$; we are asked to find the expression for f(x). more
Expanding $f(x+\epsilon )$ as a Taylor series gives
$$f(x+\epsilon )=f(x)+f'(x)\epsilon +1/2 f''(x)\epsilon^2+1/6 f'''(x)\epsilon^3+...$$
Substituting this into the original equation gives
$$f'(x)\epsilon +1/2 f''(x)\epsilon^2+1/6 f'''(x)\epsilon^3+...=g(x)\tag{2}$$Integrating term by term gives
$$f(x)\epsilon +1/2 f'(x)\epsilon^2+1/6 f''(x)\epsilon^3+1/24 f'''(x)\epsilon^4+...=\int g(x)dx$$
which rearranges to
$$f(x)\epsilon =\int g(x)dx-(1/2 f'(x)\epsilon^2+1/6 f''(x)\epsilon^3+1/24 f'''(x)\epsilon^4+...)\tag{3}$$
Differentiating each term of (1), we obtain
$$f'(x+\epsilon)-f'(x)=g'(x)\tag{4}$$From formula (2) we can obtain
$$f'(x)\epsilon =\int g'(x)dx-(1/2 f''(x)\epsilon^2+1/6 f'''(x)\epsilon^3+1/24 f^{(4)}(x)\epsilon^4+...)\tag{5}$$Substituting (5) into (3) gives
$$\begin{aligned}f(x)\epsilon = \int g(x)dx-{1/2 [g(x)-(1/2 f''(x)\epsilon^2+1/6 f'''(x)\epsilon^3+1/24 f^{(4)}(x)\epsilon^4+...)]\epsilon^2 \\ +1/6 f''(x)\epsilon^3+1/24 f'''(x)\epsilon^4+..} \\ = \int g(x)dx-1/2 g(x)+\sum_{i=2}^{\infty}(1/2\cdot 1/{i!}\epsilon^{i+2}-1/{(i+1)!}\epsilon^{i+1}) f^{(i)}(x)\end{aligned}\tag{6}$$
The above derivation gives us some inspiration: we can see that the solution to the equation
$$f(x+\epsilon)-f(x)=g(x)$$
can be written as the series
$$\epsilon f(x)=C+a_0\int g(x)dx+a_1 g(x)+a_2 g'(x)+a_3 g''(x)...\tag{7}$$
where C and a are both constants depending only on $\epsilon$. Substituting this solution into (2) gives
$$\begin{aligned}a_0 g(x)+a_1 g'(x)+a_2 g''(x)+a_3 g'''(x)...+ \\ 1/2\cdot (a_0 g'(x)+a_1 g''(x)+a_2 g'''(x)+a_3 g^{(4)}(x)...)\epsilon \\ +1/6\cdot (a_0 g''(x)+a_1 g'''(x)+a_2 g^{(4)}(x)+a_3 g^{(5)}(x)...)\epsilon^2+...=g(x)\end{aligned}$$
which rearranges to
$$\begin{aligned}a_0 g(x)+(a_1+1/2 a_0 \epsilon) g'(x)+(a_2+1/2 a_1 \epsilon+1/6 a_0 \epsilon^2) g''(x)+ \\ (a_3+1/2 a_2 \epsilon+1/6 a_1 \epsilon^2+1/{24} a_0 \epsilon^2) g'''(x)+...=g(x)\end{aligned}$$
By the principle of equating coefficients in a series, we require
$$a_0=1,\sum_{i=0}^n(a_i \epsilon^{n-i}\cdot \frac{1}{(n+1-i)!})=0$$
or, written differently,
$$a_0=1,a_n=-\sum_{i=0}^{n-1}(a_i \epsilon^{n-i}\cdot \frac{1}{(n+1-i)!})\tag{8}$$
At this point we have already found the general solution of equation $f(x+\epsilon)-f(x)=g(x)$. And using the initial condition, we can obtain the unique solution, namely
$$\epsilon f(x)=b\epsilon +[a_0\int g(x)dx+a_1 g(x)+a_2 g'(x)+a_3 g''(x)...]_k^x$$
Having discussed all this at length, some readers may feel a bit lost: what does this have to do with series? It has everything to do with them — for instance:
Suppose $S(n)=\sum\limits_{i=1}^n f(i)$, then $S(n+1)-S(n)=f(n+1)$.
Now you see it: if the general term formula is known, then summing a series is equivalent to the case in equation (1) where $\epsilon=1$! For convenience of application, let us list the coefficients of $\epsilon=1$ in formula (8):
$a_0=1$
$$\begin{aligned}a_1=-1/2,a_2=1/12 \\ a_3=0,a_4=-1/720 \\ a_5=0,a_6=1/30240 \\ a_7=0,a_8=-1/1209600 \\ a_9=0,a_10=1/47900160 \\ a_11=0,a_12=-691/1307674368000\end{aligned}$$
......
As you can see, convergence is rapid. This method of summation is the famous "Euler–Maclaurin summation formula." Building on the above results, let us try to derive some summation formulas, such as $\sum_{x=1}^n x^3$, following these steps:
$$\begin{aligned}s(n+1)-s(n)=(n+1)^3,S(1)=1 \\ \int (n+1)^3=1/4 (n+1)^4 \\ \frac{d(n+1)^3}{dn}=3(n+1)^2 \\ \frac{d^2(n+1)^3}{dn^2}=6(n+1) \\ \frac{d^3(n+1)^3}{dn^3}=6\end{aligned}$$
Hence
$$\begin{aligned}\sum_{x=1}^n x^3=&\,S(n) \\ =&\, 1+[1/4 (n+1)^4+(n+1)^3\cdot (-1/2)+3(n+1)^2\cdot (1/12)+6\cdot (-1/720)]_1^n \\ =&\,{n^4}/4+{n^3}/2+{n^2}/4\end{aligned}$$
Similarly, we can try to find an approximation formula for n!. $\ln(n!)=\sum_{x=1}^n \ln x$, that is, solving $s(x+1)-s(x)=\ln(x+1)$. Since $\int \ln (x+1) dx=(x+1) \ln(x+1) -(x+1)+Const$, the natural first-order approximation is $n!\approx e^{(x+1) \ln(x+1) -(x+1)+2(1-\ln2)}$, and we can continue to write:
$$\begin{aligned}\sum_{x=1}^n \ln x=C_0+[(x+1) \ln(x+1) -(x+1)-1/2 \ln(x+1)+ \\ 1/{12(x+1)}-1/{360(x+1)^3}+1/{1260(x+1)^5}-1/{1680(x+1)^7}..]_k^n\end{aligned}$$
where $C_0=\sum_{x=1}^k \ln x$. As we can see, this formula converges.
Translated automatically with claude-sonnet-5; all equations are reproduced verbatim from the source. Copyright remains with the original author.