I need help evaluating this:
$$\sum_{k=0}^{100} k^2 + k$$
I'm not sure how to solve this without writing the equation 100 times. and then adding them up.
I need help evaluating this:
$$\sum_{k=0}^{100} k^2 + k$$
I'm not sure how to solve this without writing the equation 100 times. and then adding them up.
Since $(k+1)-k=1$ and $(k+1)^3-k^3=3k^2+3k+1$, we can write a telescoping sum: $$ \begin{align} \sum_{k=0}^n\left(k^2+k\right) &=\sum_{k=0}^n\left[\frac13\left(3k^2+3k+1\right)-\frac13(1)\right]\\ &=\sum_{k=0}^n\left[\frac13\left((k+1)^3-k^3\right)-\frac13\left((k+1)-k\right)\right]\\ &=\frac13(n+1)^3-\frac13(n+1) \end{align} $$
Hint: What does $(k+1)^3 -k^3$ equal and what happens when you add this up as $k$ varies between one and one hundred?
It is known that:
$$\sum_{k=0}^{n} k=[(n^2 + n) / 2]$$
and
$$\sum_{k=0}^{n} k^2=[\frac{1}{6}n(n+1)(2n+1)]$$
Adding:
$$\sum_{k=0}^{n} k^2 + k$$
$$=[\frac{1}{6}n(n+1)(2n+1)] + [(n^2 + n) / 2]$$
In your case, $n=100$, so substitute to get:
$$((1/6)100(101)(201))+(1/2)(10000+100)=343400$$.
The solution provided by @robjohn is much more elegant of course!
If you are into sum history and some neat mathematical logic about sums, you may like this:Young Gauss and the sum of the first n positive integers.
Yet another approach is to apply the Euler-Mclaurin Sum Fromula.
To that end, let $f(x)=x^2+x$. Then, $f'(x)=2x+1$, $f''(x)=2$, and all higher-order derivatives are zero.
Therefore, we can write
$$\begin{align} \sum_{k=1}^nf(n)&=\int_0^nf(x)\,dx+\frac12(f(n)-f(0))+\frac{1}{12}(f'(n)-f'(0))\\\\ &=\frac{n^3}{3}+\frac{n^2}{2}+\frac12(n^2+n)+\frac16 n\\\\ &=\bbox[5px,border:2px solid #C0A000]{\frac13 n(n+1)(n+2)} \end{align}$$
as expected!
$$\sum_{k=0}^{100} k^2+k=2\sum_{k=0}^{100}\binom {k+1}2=2\binom {102}3 =\frac{102\cdot 101\cdot 100}3\qquad\blacksquare$$