How do you convert / factor the following sum:
$(1c_1 + c_2) + (2c_1 + c_2) + ... + (nc_1 + c_2)$
Into:
$\dfrac{c_1n(n+1)}{2} +nc_2$
How do you convert / factor the following sum:
$(1c_1 + c_2) + (2c_1 + c_2) + ... + (nc_1 + c_2)$
Into:
$\dfrac{c_1n(n+1)}{2} +nc_2$
On
rewrite the sum in the form $$c_1(1+2+...+n)+c_2(1+1+...+1)$$ using that $$\sum_{i=1}^ni=\frac{n(n+1)}{2}$$ and $$1+1+...+1=n\cdot 1$$ you will get the desired result.
It is time to use important properties: associativity (and commutativity) of the addition, and the distributivity of products over adds. One calls that "linearity".
Your sum is thus $c_1$ times $(1+2+3+\cdots+n)$ plus $c_2$, $n$ times. For the intuition behind $(1+2+3+\cdots+n)$ , I am fond of visual proofs:
The sum of the first $n$ integers is $n(n+1)/2$ (half the size of the rectangle on the right). Hence, the result is:
$$ c_1\frac{n(n+1)}{2}+c_2 n$$