Earn in Dollars

PaidVerts


solution


Denoting S(n) the sum of the first n cubes, S(n) must be a polynomial of the fourth degree in n, let
S(n) = an^4+bn³+cn²+dn.
This is because
1) S(0)= 0, so there is no independent term,
2) When computing S(n)-S(n-1), which must equal , you get a polynomial of the third degree, by cancellation of the quartic term:
S(n)-S(n-1) = a(n^4-(n-1)^4)+b(n³-(n-1)³)+c(n²-(n-1)²)+d(n-(n-1)).
Developing and simplifying,
a(4n³-6n²+4n-1)+b(3n²-3n+1)+c(2n-1)+d = n³. 
Let us identify the coefficients:
n³:  4a        =1 
n²: -6a+3b     =0 
n:   4a-3b+2c  =0 
1:   -a +b -c+d=0
Solving this triangular system is straigthforward:
a=1/4 
b=1/2 
c=1/4 
d=0.


 
Top