2 Summations expressed by single loop in programming is possible. Is that possible in Math to do so

notationprogrammingsummation

Suppose there are two summations.

1)$\sum_{i=1}^5a_i = a_1 + a_2 + a_3 + a_4 + a_5 = 2 + 2 + 2 + 2+ 2 = 10$

If $a$ is constant, has value 2.

2) $\sum_{i=1}^5b_i = b_1 + b_2 + b_3 + b_4 + b_5 = 3 + 3 + 3 + 3+ 3 = 15$

If $b$ is constant, has value 3.

Now in programming we can do this.

int a = 0;
int b = 0;
for (int i = 1; i <= 5; i++)
{
    a += 2;
    b += 3;
}

Then at the end of the loop $a = 10$ and $b = 15$. There is no need to write separate loop for both variables.

According my understanding summation behaves as loop. By keeping above programming loop in mind where we can use single loop for 2 different summations because looping condition is same, Is there any way we could do this to summation $\sum_{i=1}^5a_i$ and summation $\sum_{i=1}^5b_i$ by merging them into single summation based on condition. In other words describing 2 different summations by one summation because both summations have same condition.

Best Answer

Writing the sum $(a,b)$ as an ordered pair, you have

$(a,b)=\sum_{i=1}^5 (a_i,b_i)$

Related Question