TITLE: How to integrate simple discrete function
QUESTION [6 upvotes]: Let $n\in\mathbb{Z}^+ $ I have a simple discrete function:
$$
\mathrm{acc}(n) = 8n
$$
The discrete integral (is that the right term?) of that is:
$$
\mathrm{vel}(n) = \sum_{i=0}^n  \mathrm{acc}(i)
$$
the formula for which is:
$$
\mathrm{vel}(n) = 4(n^2+n)
$$
Now my question. What's the discrete integral of $\mathrm{vel}(n)$
$$
\mathrm{pos}(n) = \sum_{i=0}^n  \mathrm{vel}(i)
$$
What is the formula for directly calculating $pos(n)$? The normal rules of integration I learned at school don't seem to apply here.

REPLY [4 votes]: There is a technique that would suffice as "discrete integration". It is described in this short paper.
Here is how you would solve this specific problem:
$$
\sum_{i=0}^{n} 4(i^2+i)
$$
First we need to transform the space of summation into the following form.
$$
\sum_{i: 0 \rightarrow n+1} 4(i^2+i)
$$
The reason for the n+1 is because the fundamental theorem of discrete calculus requires this (as shown in the paper: $\sum_{i=a}^{n} f(i) = \sum_{i: a\rightarrow n+1} f(i)$)
First isolate the constant, then transform the exponents of $n$ to falling powers:
$$
4\sum_{i: 0 \rightarrow n+1} (i^{\underline{2}}+2i^{\underline{1}})
$$
Where
$$
i^{\underline{2}} = i\cdot (i-1)
$$
$$
i^{\underline{1}} = i
$$
Observe that 
$$
i^{\underline{2}}+2i^{\underline{1}} = i^2-i+2i = i^2+i
$$
Now we just integrate like we normally would, and evaluate:
$$
\left.4(\frac{i^{\underline{3}}}{3}+\frac{2}{2}i^{\underline{2}}) \right|_{i=0}^{n+1}
$$
$$
\left.4(\frac{i (i-1)(i-2)}{3}+i(i-1)) \right|_{i=0}^{n+1}
$$
Factoring out:
$$
\left.4(\frac{(i-2)}{3}+1)i(i-1) \right|_{i=0}^{n+1}
$$
Finally evaluating:
$$
4(\frac{(n-1)}{3}+1)(n+1)(n) - 4(0)
$$
$$
\Rightarrow pos(n) = 4(\frac{(n-1)}{3}+1)(n+1)(n) = \frac{4}{3}n(n+1)(n+2)
$$