Talk:Introduction-TADM2E

From Algorithm Wiki
Revision as of 05:53, 9 October 2015 by Parth (talk | contribs) (Solution for 1-10)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

TADM2E 1.10

First we'll verify the base case for $ n = 1 $ :

$ \sum_{i=1}^1 i = \frac{1(1+1)}{2} = 1 $

Now, we'll assume given statement is true up to $ n - 1 $.

So,

$ \sum_{i=1}^{n-1} i = \frac{(n-1)(n-1+1)}{2} = \frac{(n-1)n}{2} $

To prove for the general case $ n $,

$ \sum_{i=1}^n i = \sum_{i=1}^{n-1} i + n = \frac{(n-1)n}{2} + n = \frac{n^2 - n + 2n}{2} = \frac{n^2 + n}{2} = \frac{n(n+1)}{2} $