How do I calculate $$\sum_{j=i}^{n}j?$$
WolframAlpha gave me $-\frac{1}{2}(i-n-1)(i+n)$ but I don't understand how it got there
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityHow do I calculate $$\sum_{j=i}^{n}j?$$
WolframAlpha gave me $-\frac{1}{2}(i-n-1)(i+n)$ but I don't understand how it got there
Therefor, we have
$$\sum_{j=i}^{n}j = \sum_{j=1}^{n}j - \sum_{j=1}^{i-1}j = \frac{n(n+1)}{2} - \frac{(i-1)i}{2} = -\frac{1}{2}(i-n-1)(i+n)$$
Alternatively: $$\sum_{j=i}^{n}j=i+(i+1)+(i+2)+\cdots +(\underbrace{i+k}_{n})=$$ $$i\cdot (k+1)+\frac{(k+1)k}{2}=\frac{(k+1)(2i+k)}{2}=$$ $$\frac{(n-i+1)(2i+n-i)}{2}=\frac{(n-i+1)(n+i)}{2}.$$
$$i+(i+1)+(i+2)+...+n=\\\underbrace{i}_{a_1}+\underbrace{i+1}_{a_2}+\underbrace{i+2}_{a_3}+...\\\text{ common-difference }=d=1$$ for arithmetic sum we have $$S_k=\frac{k(a_1+a_k)}{2}$$ number of terms $$=\frac{\text{the last}-\text{the first}}{d}+1\\=\frac{n-i}{1}+1=n-i+1$$ so $$\quad{\underbrace{i+(i+1)+(i+2)+...+n}_{(n-i+1) \text{ terms }}\\S_{n-i+1}=\frac{(n-i+1)(a_1+a_{n-i+1})}{2}=\\\frac{(n-i+1)(i+n)}{2}}$$