I need to simplify this sum $$\sum_{i=1}^n(n+1-2i)^2.$$
My try: $(n+1)^2-2(n+1) +2^2+(n+1)^2-8(n+1) +4^2\dots +(n+1)^2-4n(n+1) +(2n)^n.$
How to simplify this, any easiest way?
I need to simplify this sum $$\sum_{i=1}^n(n+1-2i)^2.$$
My try: $(n+1)^2-2(n+1) +2^2+(n+1)^2-8(n+1) +4^2\dots +(n+1)^2-4n(n+1) +(2n)^n.$
How to simplify this, any easiest way?
As a standard way
$$\sum_{i=1}^n(n+1-2i)^2=$$
$$=(n+1)^2\sum_{i=1}^n1-4(n+1)\sum_{i=1}^n i+4\sum_{i=1}^n i^2=\frac{n(n^2-1)}3$$
As an alternative, since the term $(n+1-2i)^2$ goes from $(n-1)^2 $ to $(1-n)^2$, with constant difference of $2$, we have that
$$\sum_{i=1}^n(n+1-2i)^2=8\sum_{i=1}^{\frac{n-1}2}i^2$$
$$\sum_{i=1}^n(n+1-2i)^2=2\sum_{i=1}^{\frac{n}2}(2i-1)^2$$
or also
$$\sum_{i=1}^n(n+1-2i)^2=2\sum_{i=1}^{n-1}i^2-8\sum_{i=1}^{\frac {n-2}2}i^2$$
Alternative (inelegant) approach that generalizes well.
Let $~S(n,k)~$ denote $~\sum_{i=1}^n i^k.~$
There are easily derivable formulas for $~S(n,k),~$ as a polynomial in $~n,~$ for any $~k \in \Bbb{Z^+}.~$ See, for example this answer.
So, dispense with elegance and simply multiply everything out.
$$[(n+1) - 2i]^2 = (n+1)^2 - 4i(n+1) + 4i^2.$$
Since the summation is running from $~i=1,~$ to $~i = n,~$
the overall computation must be
$$[n \times (n+1)^2] - [ ~4(n+1)S(n,1) ~] + 4S(n,2). \tag1 $$
You then have the easily derivable formulas that
$$S(n,1) = \frac{n^2}{2} + \frac{n}{2} = \frac{n(n+1)}{2}. \tag2 $$
and
$$S(n,2) = \frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6} = \frac{n(n+1)(2n+1)}{6}. \tag3 $$
So, all that you have to do is take the formulas from (2) above and (3) above and plug them into the expression in (1) above. The result will be a polynomial in $~n.~$
Further, this approach generalizes to all such problems of this nature.
"My try
$(n+1)^2-2(n+1) +2^2+(n+1)^2-8(n+1) +4^2\dots +(n+1)^2-4n(n+1) +(2n)^n.$
I'm a big believer in letting a student continue and explore their one ideas. Note you have
$\color{blue}{(n+1)^2}-2(n+1) +2^2+\color{blue}{(n+1)^2}-8(n+1) +4^2\dots +\color{blue}{(n+1)^2}-4n(n+1) +(2n)^n$
A lot of of repetion of the same constant term. So combine them.
$\color{blue}{(n+1)^2}-2(n+1) +2^2+\color{blue}{(n+1)^2}-8(n+1) +4^2\dots +\color{blue}{(n+1)^2}-4n(n+1) +(2n)^n=$
$n\times \color{blue}{(n+1)^2}-2(n+1) + 2^2 -8(n+1) +4^2\dots -4n(n+1) +(2n)^n$
Do some more color higlights:
$n\times \color{blue}{(n+1)^2}-2\color{red}{(n+1)} + 2^2 -8\color{red}{(n+1)} +4^2\dots -4n\color{red}{(n+1)} +(2n)^n$
... and notice that you made a typo. When $i = 1$ then $(n+1-2)^2 = (n+1)^2 -!!!!4!!!!(n+1) + 2^2$....so fix that....
$n\times \color{blue}{(n+1)^2}-4\color{red}{(n+1)} + 2^2 -8\color{red}{(n+1)} +4^2\dots -4n\color{red}{(n+1)} +(2n)^n$
Again with the repetition of the constant term, so combine:
$n\times \color{blue}{(n+1)^2}-\color{red}{(n+1)}(4+8 +\dots +4n) + 2^2 +4^2\dots +(2n)^n$
We can write it as a sumation
$n\times \color{blue}{(n+1)^2}-\color{red}{(n+1)}\sum\limits_{i=1}^n 4i + 2^2 +4^2\dots +(2n)^n=$
$n\times \color{blue}{(n+1)^2}-4\color{red}{(n+1)}\sum\limits_{i=1}^n i + 2^2 +4^2\dots +(2n)^n=$
Note we are now left with a summation:
$n\times \color{blue}{(n+1)^2}-4\color{red}{(n+1)}\sum\limits_{i=1}^n i + \color{green}{2^2 + 4^2 + .... + (2n)^2}=$
$n\times \color{blue}{(n+1)^2}-4\color{red}{(n+1)}\sum\limits_{i=1}^n i + \color{green}{\sum\limits_{i=1}^n(2i)^2}=$
$n\times \color{blue}{(n+1)^2}-4\color{red}{(n+1)}\sum\limits_{i=1}^n i + \color{green}{\sum\limits_{i=1}^n4i^2}=$
$n\times \color{blue}{(n+1)^2}-4\color{red}{(n+1)}\sum\limits_{i=1}^n i + 4\color{green}{\sum\limits_{i=1}^ni^2}=$
... can you go on....