(** This is strange, I posted this in reply to a question, and it appears to have opened a new thread. Also, I cannot find the question in the community anymore. Not sure what happened. Sorry. The question was how to prove that Sum[2 i, {i, 1, n}] == n^2 + n **)
Hi there,
that looks very much like a standard homework problem. In fact Mathematica can do that in one step:
Simplify[Sum[2 i, {i, 1, n}] == n^2 + n]
evaluates to True, so it is correct. But you are probably asked to write the proof in a more standard form. So, for a proof by induction you need to check the statement for a starting value, here $n=1$.
Left hand side:
Sum[2 i, {i, 1, n}] /. n -> 1
gives 2.
Right hand side:
n^2 + n /. n -> 1
gives 2 as well.
Next you need to show that if statement is true for any $n$ then it must be true for $n+1$, too. So,
Simplify[Sum[2 i, {i, 1, n}] + 2 (n + 1)]
needs to equal
Simplify[(n^2 + n) /. n -> n + 1]
evaluating the two last commands gives both times $2+3 n + n^2$, so that they are equal. Note that this is mathematically speaking a bit dodgy because Mathematica already knows the result of the sum:
Expand[Sum[2 i, {i, 1, n}]]
Internally, Mathematica will probably not do the same steps of the argument that you would do on a sheet of paper. WRI are however very interested in automated theorem proving, which you can see in this blog entry.
http://blog.stephenwolfram.com/2014/08/computational-knowledge-and-the-future-of-pure-mathematics/
Cheers,
Marco