How can I simplfiy this summation? $$ \sum_{i = 0}^{n}(a_i * \sum_{j = i}^{n} a_j) + \sum_{k = 0}^{n} a_k $$ with $a \in \mathbb{R}$
-
What are $a_i...?$ – Archis Welankar Jan 08 '16 at 15:18
-
You can write it as $\sum_{i=0}^n \left(a_i\left(1+\sum_{j=i}^n a_j\right)\right)$. I don't know if that's considered "simpler" or not. – kccu Jan 08 '16 at 15:19
-
@kccu Shouldn't the lower limit in your inner sum be $j=i$? – πr8 Jan 08 '16 at 15:19
-
@πr8 Yes, thank you. $1$'s and $i$'s look so similar... – kccu Jan 08 '16 at 15:20
2 Answers
The first sum can be written as:
$$\sum_{i=0}^n\sum_{j=i}^na_ia_j$$
We can view this as a sum over pairs $(i,j)$ where $0\leq i \leq j \leq n$, so we can rewrite our sum in the more concise form:
$$\sum_{0\leq i \leq j \leq n}a_ia_j$$
If we'd like, we can use this observation to exchange the order of summation, and make $i$ the inner variable, viz:
$$\sum_{j=0}^n\sum_{i=0}^ja_ia_j$$
As for the second sum, there's no particular way of making it more concise. It's also unlikely to be something we can neatly integrate with the first sum, as it contains linear terms in the $a_i$, whereas the first has quadratic terms (e.g. $a_0a_1$).
It's worth noting that if the original sum is altered slightly to be:
$$2\sum_{i=0}^na_i\sum_{j=i}^na_j+\sum_{i=0}^na_i^2$$
then we can realise it as a square, and it collapses nicely to:
$$(\sum_{i=0}^na_i)^2$$
- 10,800
Let $S_1=\sum_{k=0}^na_k$.
If you develop $S_1^2$, you will have $n+1$ terms $a_k^2$, and $n(n+1)$ terms $2a_ia_j$, with $0\le i<j\le n$.
So $$\sum_{i = 0}^{n}\left(a_i\cdot\sum_{j = i}^{n} a_j\right) $$ has the same terms, except for the factor $2$, and equals $$\frac12(S_1^2+S_2)$$ where $S_2=\sum_{k=0}^na_k^2$.
Hence the global expression,
$$\frac12(S_1^2+S_2)+S_1.$$
The double summation is gone.