Chemical Forums
Specialty Chemistry Forums => Other Sciences Question Forum => Topic started by: xiankai on August 09, 2006, 07:26:59 PM
-
n
? r2 = ?
r=1
i can't figure this out, at least for now...
-
it equals (1/6)(n)(n+1)(2n+1), or (1/3)(n)(n+1/2)(n+1).
-
how do u get that? :o
-
how do u get that? :o
I got it from 'Concrete Mathematics, A foundation for computer science', by Graham,Knuth,Patashnik.
This is a really cool book that goes in great depths into this stuff. I wish I had taken a class in this to learn it better, but oh well.
Section 2.5 covers several different methods for evaluating this exact sum.
Method 0 : Look it up. This is the method I used in answering your question at first. :)
Method 1 : Guess the answer, then prove it. Not much more interesting.
Method 2 is clever and nifty, however:
Consider the sum of the *cubes* from 1 to N, which I'll call Cn since I'm too lazy to put in the subscript codes.
Cn = sum(k=1..n, k3) // note more laziness with notation
I'll also define
Sn = sum(k=1..n, k2) which is what you want to find.
Also note that sum(k=1..n, k) = (1/2)(n)(n+1), I assume you've already figured that one out.
then...
Cn+1 = Cn + (n+1)3 = sum(k=1..n+1, k3)
Next change variables on the sum, to l where l = k-1, and so
Cn + (n+1)3 = sum(l=0..n, (l+1)3)
= sum(l=0..n, l3 + 3*l2 + 3*l + 1)
= 1 + sum(l=1..n, l3 + 3*l2 + 3*l + 1)
= 1 + sum(l=1..n, l3) + 3 * sum(l=1..n, l2) + 3 * sum(l=1..n, l) + sum(l=1..n, 1)
= 1 + Cn + 3 * Sn + 3 * (1/2)(n)(n+1) + n
The Cn can be subtracted off both sides of this equation, thus removing it. This is convenient since we didn't actually care about it in the first place. :) Rearrange a bit, to solve for Sn which is what you want,
Sn = (1/3)*((n+1)3 - 1 - (3/2)(n)(n+1) - n)
a little more algebra then beats this into the final form
Sn = (1/6)(n)(n+1)(2n+1)
-
mm thats very innovative, of late more and more obscure problems that i encounter have their solutions in cubic equations :P
last thing; i want to clarify on how to replace k with l
method 1: by algebraic replacement
Replace k = k-1
n+1
? k3
k=1
n+1
? (k-1)3
k-1=1
n+1
? l3
l=1
n
? (l+1)3
l=0
method 2: by algebraic addition/subtraction
n+1
? k3
k=1
n+1-1
? (l+1)3
k-1=0
n
? (l+1)3
l=0
-
The way I think about it, is to replace the thing you are summing *and* the limits at the same time, the same way you do for definite integrals. So, for
sum (k=1..n+1, k^3)
I want to replace k by l+1, and the limit k=1 by l+1=1, or l=0, and k=n+1 by l+1=n+1, or l=n, giving:
sum (l=0..n, (l+1)^3)