# Summation by parts

In mathematics, summation by parts transforms the summation of products of sequences into other summations, often simplifying the computation or (especially) estimation of certain types of sums. It is also called Abel's lemma or Abel transformation, named after Niels Henrik Abel who introduced it in 1826.

## Statement

Suppose $\{f_{k}\}$ and $\{g_{k}\}$ are two sequences. Then,
    $\sum _{k=m}^{n}f_{k}(g_{k+1}-g_{k})=\left(f_{n+1}g_{n+1}-f_{m}g_{m}\right)-\sum _{k=m}^{n}g_{k+1}(f_{k+1}-f_{k}).$
Using the forward difference operator $\Delta$, it can be stated more succinctly as
    $\sum _{k=m}^{n}f_{k}\Delta g_{k}=\left(f_{n+1}g_{n+1}-f_{m}g_{m}\right)-\sum _{k=m}^{n}g_{k+1}\Delta f_{k},$
Summation by parts is an analogue to integration by parts:
    $\int f\,dg=fg-\int g\,df,$
or to Abel's summation formula:
    $\sum _{k=m+1}^{n}f(k)(g_{k}-g_{k-1})=\left(f(n)g_{n}-f(m)g_{m}\right)-\int _{m}^{n}g_{\lfloor t\rfloor }f'(t)dt.$
An alternative statement is
    $f_{n}g_{n}-f_{m}g_{m}=\sum _{k=m}^{n-1}f_{k}\Delta g_{k}+\sum _{k=m}^{n-1}g_{k}\Delta f_{k}+\sum _{k=m}^{n-1}\Delta f_{k}\Delta g_{k}$
which is analogous to the integration by parts formula for semimartingales.
Although applications almost always deal with convergence of sequences, the statement is purely algebraic and will work in any field. It will also work when one sequence is in a vector space, and the other is in the relevant field of scalars.

## Newton series

The formula is sometimes given in one of these - slightly different - forms
    ${\begin{aligned}\sum _{k=0}^{n}f_{k}g_{k}&=f_{0}\sum _{k=0}^{n}g_{k}+\sum _{j=0}^{n-1}(f_{j+1}-f_{j})\sum _{k=j+1}^{n}g_{k}\\&=f_{n}\sum _{k=0}^{n}g_{k}-\sum _{j=0}^{n-1}\left(f_{j+1}-f_{j}\right)\sum _{k=0}^{j}g_{k},\end{aligned}}$
which represent a special case ($M=1$) of the more general rule
    ${\begin{aligned}\sum _{k=0}^{n}f_{k}g_{k}&=\sum _{i=0}^{M-1}f_{0}^{(i)}G_{i}^{(i+1)}+\sum _{j=0}^{n-M}f_{j}^{(M)}G_{j+M}^{(M)}=\\&=\sum _{i=0}^{M-1}\left(-1\right)^{i}f_{n-i}^{(i)}{\tilde {G}}_{n-i}^{(i+1)}+\left(-1\right)^{M}\sum _{j=0}^{n-M}f_{j}^{(M)}{\tilde {G}}_{j}^{(M)};\end{aligned}}$
both result from iterated application of the initial formula. The auxiliary quantities are Newton series:
    $f_{j}^{(M)}:=\sum _{k=0}^{M}\left(-1\right)^{M-k}{M \choose k}f_{j+k}$
and
    $G_{j}^{(M)}:=\sum _{k=j}^{n}{k-j+M-1 \choose M-1}g_{k},$
    ${\tilde {G}}_{j}^{(M)}:=\sum _{k=0}^{j}{j-k+M-1 \choose M-1}g_{k}.$
A particular ($M=n+1$) result is the identity
    $\sum _{k=0}^{n}f_{k}g_{k}=\sum _{i=0}^{n}f_{0}^{(i)}G_{i}^{(i+1)}=\sum _{i=0}^{n}(-1)^{i}f_{n-i}^{(i)}{\tilde {G}}_{n-i}^{(i+1)}.$
Here, (n/k){\textstyle {n \choose k}} is the binomial coefficient.

## Method

For two given sequences $(a_{n})$ and $(b_{n})$, with $n\in \mathbb {N}$, one wants to study the sum of the following series: $S_{N}=\sum _{n=0}^{N}a_{n}b_{n}$
If we define B$_n$=∑$_{k=0}$$^n$b$_k$, {\textstyle \displaystyle B_{n}=\sum _{k=0}^{n}b_{k}, } then for every $n>0,$ $b_{n}=B_{n}-B_{n-1}$ and $S_{N}=a_{0}b_{0}+\sum _{n=1}^{N}a_{n}(B_{n}-B_{n-1}),$ $S_{N}=a_{0}b_{0}-a_{1}B_{0}+a_{N}B_{N}+\sum _{n=1}^{N-1}B_{n}(a_{n}-a_{n+1}).$
Finally S$_N$=a$_N$B$_N$−∑$_{n=0}$$^{N−1}$B$_n$(a$_{n+1}$−a$_n$).{\textstyle \displaystyle S_{N}=a_{N}B_{N}-\sum _{n=0}^{N-1}B_{n}(a_{n+1}-a_{n}).}
This process, called an Abel transformation, can be used to prove several criteria of convergence for $S_{N}$.

## Similarity with an integration by parts

The formula for an integration by parts is ∫$_a$$^b$f(x)g$^′$(x)dx=[f(x)g(x)]$_a$$^b$−∫$_a$$^b$f$^′$(x)g(x)dx{\textstyle \displaystyle \int _{a}^{b}f(x)g'(x)\, dx=\left[f(x)g(x)\right]_{a}^{b}-\int _{a}^{b}f'(x)g(x)\, dx}.
Beside the boundary conditions, we notice that the first integral contains two multiplied functions, one which is integrated in the final integral ($g'$ becomes $g$) and one which is differentiated ($f$ becomes $f'$).
The process of the Abel transformation is similar, since one of the two initial sequences is summed ($b_{n}$ becomes $B_{n}$) and the other one is differenced ($a_{n}$ becomes $a_{n+1}-a_{n}$).

## Applications

* It is used to prove Kronecker's lemma, which in turn, is used to prove a version of the strong law of large numbers under variance constraints.
* It may be used to prove Nicomachus's theorem that the sum of the first $n$ cubes equals the square of the sum of the first $n$ positive integers.
* Summation by parts is frequently used to prove Abel's theorem and Dirichlet's test.
* One can also use this technique to prove Abel's test: If ∑$_n$b$_n${\textstyle \sum _{n}b_{n}} is a convergent series, and $a_{n}$ a bounded monotone sequence, then S$_N$=∑$_{n=0}$$^N$a$_n$b$_n${\textstyle S_{N}=\sum _{n=0}^{N}a_{n}b_{n}} converges.
Proof of Abel's test. Summation by parts gives ${\begin{aligned}S_{M}-S_{N}&=a_{M}B_{M}-a_{N}B_{N}-\sum _{n=N}^{M-1}B_{n}(a_{n+1}-a_{n})\\&=(a_{M}-a)B_{M}-(a_{N}-a)B_{N}+a(B_{M}-B_{N})-\sum _{n=N}^{M-1}B_{n}(a_{n+1}-a_{n}),\end{aligned}}$ where a is the limit of $a_{n}$. As ∑$_n$b$_n${\textstyle \sum _{n}b_{n}} is convergent, $B_{N}$ is bounded independently of $N$, say by $B$. As $a_{n}-a$ go to zero, so go the first two terms. The third term goes to zero by the Cauchy criterion for ∑$_n$b$_n${\textstyle \sum _{n}b_{n}}. The remaining sum is bounded by $\sum _{n=N}^{M-1}|B_{n}||a_{n+1}-a_{n}|\leq B\sum _{n=N}^{M-1}|a_{n+1}-a_{n}|=B|a_{N}-a_{M}|$ by the monotonicity of $a_{n}$, and also goes to zero as $N\to \infty$.
Using the same proof as above, one can show that if
* the partial sums $B_{N}$ form a bounded sequence independently of $N$;
* $\sum _{n=0}^{\infty }|a_{n+1}-a_{n}|<\infty$ (so that the sum $\sum _{n=N}^{M-1}|a_{n+1}-a_{n}|$ goes to zero as $N$ goes to infinity)
* $\lim a_{n}=0$
then S$_N$=∑$_{n=0}$$^N$a$_n$b$_n${\textstyle S_{N}=\sum _{n=0}^{N}a_{n}b_{n}} converges.
In both cases, the sum of the series satisfies:$|S|=\left|\sum _{n=0}^{\infty }a_{n}b_{n}\right|\leq B\sum _{n=0}^{\infty }|a_{n+1}-a_{n}|.$

## Summation-by-parts operators for high order finite difference methods

A summation-by-parts (SBP) finite difference operator conventionally consists of a centered difference interior scheme and specific boundary stencils that mimics behaviors of the corresponding integration-by-parts formulation. The boundary conditions are usually imposed by the Simultaneous-Approximation-Term (SAT) technique. The combination of SBP-SAT is a powerful framework for boundary treatment. The method is preferred for well-proven stability for long-time simulation, and high order of accuracy.