Answer
$1-4+9-16+\cdots+(-1)^{n+1}n^2=(-1)^{n+1}(1+2+3+4+\cdots+n)=(-1)^{n+1}(\frac{n(n+1)}{2})$
Work Step by Step
Based on the existing pattern, we can write a general formula as:
$1-4+9-16+\cdots+(-1)^{n+1}n^2=(-1)^{n+1}(1+2+3+4+\cdots+n)=(-1)^{n+1}(\frac{n(n+1)}{2})$
Proof: Let $P(n)$ be the above statement.
1. For $n=1$, we have $LHS=(-1)^21=1$ and $RHS=(-1)^2(\frac{1(1+1}{2})=1=LHS$, thus it is true for $P(1)$.
2. Assume it is true for $P(k)$, that is:
$1-4+9-16+\cdots+(-1)^{k+1}k^2=(-1)^{k+1}(1+2+3+4+\cdots+k)=(-1)^{k+1}(\frac{k(k+1)}{2})$
3. For $n=k+1$, we have:
$LHS=1-4+9-16+\cdots+(-1)^{k+1}k^2+(-1)^{k+2}(k+1)^2\\
=(-1)^{k+1}(1+2+3+4+\cdots+k)+(-1)^{k+2}(k+1)^2\\
=(-1)^{k+1}(\frac{k(k+1)}{2})+(-1)^{k+2}(k+1)^2\\
=(-1)^{k+2}(2k^2+4k+2-k^2-k)\frac{1}{2}
=(-1)^{k+2}(\frac{k^2+3k+2}{2})
=(-1)^{k+2}\frac{(k+1)(k+2)}{2}=RHS$
4. Thus $P(k+1)$ is also true and we proved the statement by mathematical induction.