Prove by induction that $\sum_{k=0}^{n}(-1)^{n+k} k^{2} = \frac{n(n+1)}{2}$

56 Views Asked by At

Prove by mathematical induction that

$\forall n \in \mathbb{N}:~~~~ \sum_{k=0}^{n}(-1)^{n+k} k^{2} = \frac{n(n+1)}{2}$

Step 1: Show true for $n = 1$:

LHS: $(-1)^{(1+0)} \cdot 0^{2} + (-1)^{(1+1)} \cdot 1^{2} = 1$

RHS: $\frac{0(0+1)}{2} + \frac{1(1+1)}{2} = 1$

Step 2: Show "if true for $n = p$, then true for $n = p + 1$":

So we start by the LHS of $n = p + 1$ and try to get to the RHS of it, by using the equality for $n = p$.

The first step involves breaking out the highest term in the sum.

$\sum_{k=0}^{p+1}(-1)^{(p+1+k)} k^{2} = (-1)^{(2p+2)} (p+1)^{2} + \sum_{k=0}^{p}(-1)^{(p+k)} k^{2} $

Replacing the last term with the equality for $n = p$.

$(-1)^{2p+2} (p+1)^{2} + \sum_{k=0}^{n}(-1)^{p+k} k^{2} = (-1)^{2p+2} (p+1)^{2} + \frac{p(p+1)}{2}$

Since 2p+2 is an even number, the -1 becomes a 1:

$(-1)^{2p+2} (p+1)^{2} + \frac{p(p+1)}{2} = (p+1)^{2} + \frac{p(p+1)}{2}$

All that is required now is to show that this equals to $\frac{(p+1)(p+2)}{2}$, but there seems to be a $(p+1)$ too many in the first term for it to work.

Question 1: Where have I gone wrong in the above attempt?

Question 2: Is it more productive to attempt to prove

$\forall n \in \mathbb{N}:~~~~ \sum_{k=0}^{n}(-1)^{n+k} k^{2} = \sum_{k=1}^{n} k$

instead?

1

There are 1 best solutions below

0
On BEST ANSWER

In this step you have made an error: $$\sum_{k=0}^{p+1}(-1)^{(p+1+k)} k^{2} = (-1)^{(2p+2)} (p+1)^{2} + \sum_{k=0}^{p}(-1)^{(p+k)} k^{2}$$ This should be $$\sum_{k=0}^{p+1}(-1)^{(p+1+k)} k^{2} = (-1)^{(2p+2)} (p+1)^{2} + \sum_{k=0}^{p}(-1)^{(p+1+k)} k^{2}.$$Notice the extra $+1$ in the exponent of $(-1)$ in the last sum. We can remove it by factoring out a $-1$ to get $$\sum_{k=0}^{p+1}(-1)^{(p+1+k)} k^{2} = (p+1)^{2} - \sum_{k=0}^{p}(-1)^{(p+k)} k^{2}.$$ By the assumption this is $$\sum_{k=0}^{p+1}(-1)^{(p+1+k)} k^{2} = (p+1)^{2} -\frac{p(p+1)}{2}.$$ Now we can easily work it out: $$(p+1)^2 - \frac{p(p+1)}{2} = (p+1)(-\frac{p}{2} + p +1)= (p+1)\frac{p+2}{2}$$ as desired.