prove sum(x)=n(n+1)/2 from x=1 to x=n
what you have is
1+2+3+...+n
let S(n) = 1+2+3+...+ (n-2) + (n-1) + n
writing this in reverse order
S(n) = n + (n-1) + (n-2)+ ... + 3+2+1
add them
2S(n) = (1+n) + (2+n-1) + (3+n-2) +...+(3+n-2) + (2+n-1) + (n+1)
= (n/2)(n+1)
or
= n(n+1)/2 , as required
thank you Reiny
To prove that the sum of consecutive integers from 1 to n is equal to n(n+1)/2, we can use mathematical induction.
Step 1: Base Case
First, we need to prove that the formula holds true for the smallest possible value of n. Let's consider the case when n = 1.
When n = 1:
The sum of consecutive integers from 1 to 1 is simply 1.
Using the formula: n(n+1)/2,
substituting n = 1, we get:
1(1+1)/2 = 2/2 = 1
Therefore, the formula holds true for n = 1.
Step 2: Inductive Hypothesis
Assume that the formula holds true for some positive integer k, meaning that the sum of the consecutive integers from 1 to k is k(k+1)/2.
Step 3: Inductive Step
We now need to prove that if the formula holds true for k, then it also holds true for k+1.
When n = k+1:
The sum of the consecutive integers from 1 to k+1 can be written as the sum of the consecutive integers from 1 to k, plus the term k+1.
Using the formula for the sum of consecutive integers:
1 + 2 + 3 + ... + k + (k+1) = k(k+1)/2 + (k+1)
Factoring out (k+1) from the first term:
(k+1)(k/2 + 1) = (k+1)(k+2)/2
Thus, the sum of consecutive integers from 1 to k+1 is indeed equal to (k+1)(k+2)/2.
Step 4: Conclusion
By establishing the base case and proving that if the formula holds true for k, it also holds true for k+1, we have proven by mathematical induction that the sum of consecutive integers from 1 to n is equal to n(n+1)/2.
Therefore, the formula sum(x) = n(n+1)/2, from x=1 to x=n is proven.