Consider $$\sum_{i=1}^j \sum_{j=1}^4 \left(2ij+1\right) $$
How can I calculate the second summation after the first one?
How can I calculate $\sum_{i=1}^j \sum_{j=1}^4 \left(2ij+1\right) $ by doing the second summation after the first one?
331 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
To avoid confusion where $j$ is both an upper limit of the outer summation and the indexing variable of the inner summation, I will refer to the $j$ on the outer summation instead as $J$.
Remember that nested summations are evaluated from the inside out. That is to say:
$$\sum\limits_{i=1}^J\sum\limits_{j=1}^4 2ij+1 = \sum\limits_{i=1}^J\left(\sum\limits_{j=1}^4(2ij+1)\right)$$
Now, let us evaluate the innermost summation. $$\sum\limits_{j=1}^4(2ij+1) = (2i+1)+(4i+1)+(6i+1)+(8i+1) = 20i+4$$
Notice, $j$ has disappeared from the result of the inner summation.
We have then $$\sum\limits_{i=1}^J\left(\sum\limits_{j=1}^4(2ij+1)\right) = \sum\limits_{i=1}^J\left(20i+4\right)$$
Notice, if it really bothers you that badly that I'm using $J$ instead of $j$, if you were to change $J$ back to $j$ you get effectively the same result so far... My point in changing $j$ to $J$ is to point out and really emphasize that the meaning and use of the $J$ on the outside is different and unrelated to the meaning and use of the $j$ on the inside.
Continuing, using the linearity of summation we have:
$$\sum\limits_{i=1}^J(20i+4) = 20\cdot \left(\sum\limits_{i=1}^J i\right) + 4\cdot \left(\sum\limits_{i=1}^J 1\right)$$
Both of these two summations should be well known. $\sum\limits_{i=1}^J i = T(J) = \dfrac{J(J+1)}{2}$ is the $J$'th triangle number. Search elsewhere on this site for a proof as to why the summation evaluates as it does. The second summation $\sum\limits_{i=1}^J 1 = J$ because you are simply adding $1$ to itself a total of $J$ times.
We get as a result:
$$20\cdot \left(\sum\limits_{i=1}^J i\right) + 4\cdot \left(\sum\limits_{i=1}^J 1\right) = 20\cdot \dfrac{J(J+1)}{2} + 4\cdot J = 10J^2+14J$$
Replacing $J$ back with $j$ so that it matches the original problem, we have:
$$\sum\limits_{i=1}^j\left(\sum\limits_{j=1}^4(2ij+1)\right) = 10j^2+14j$$
Notice that this summation relies on the value of $j$. It is bad practice to have a variable name be repeated as an indexing variable at the same time as it is in use elsewhere.
Compare this to where the summations were reversed. The sum $\sum\limits_{j=1}^4\sum\limits_{i=1}^j (2ij+1)$ evaluates to
$((2+1))+((4+1)+(8+1))+((6+1)+(12+1)+(18+1))+((8+1)+(16+1)+(24+1)+(32+1))=140$
On
We assume OP's double sum is not correctly written and we have to consider instead \begin{align*} \sum_{j=1}^4 \sum_{i=1}^j \left(2ij+1\right) \tag{1} \end{align*} The representation (1) is valid. The outer sum varies $j$ from $1$ to $4$ and for each $j$ we consider the inner sum varying $i$ from $1$ to $j$.
If we want to exchange inner and outer sum in (1) we can write \begin{align*} \sum_{j=1}^4 \sum_{i=1}^j \left(2ij+1\right) =\sum_{\color{blue}{1\leq i\leq j\leq 4}} \left(2ij+1\right) =\sum_{i=1}^4\sum_{j=i}^4\left(2ij+1\right) \end{align*}
Consider the series: \begin{align} S_{n} &= \sum_{j=1}^n \sum_{i=1}^{j}\left(2ij+1\right) \\ &= \sum_{j=1}^{n} \left( 2 \, j \, \binom{j+1}{2} + j \right) \\ &= \sum_{j=1}^{n} (j^3 + j^2 + j) \\ &= \frac{n^2 (n+1)^2}{4} + \frac{n (n+1) (2n+1)}{6} + \frac{n(n+1)}{2} \\ &= \frac{n (n+1)}{12} \, ( 3 (n^2 + n) + 2 (2n +1) + 6 ) \\ &= \frac{n (n+1) (3 n^2 + 7 n + 8)}{12} \end{align}
When $n = 4$ this sum reduces to 140.