How can I know the sum of k^2 from knowing the sum of k?

The Student

Junior Member
Joined
Apr 25, 2012
Messages
241
[Here's the question] The formula 1^2 + ... + n^2 may be derived as follows. We begin with the formula (k + 1)^3 - k^3 = 3*k^2 + 3*k + 1. Writing this formula for k = 1, ... , n and adding, we obtain [The question actually has the following equations in rows with each equation positioned under the next. (I do not know how to put anything in rows in this post.)] ( 2^3 - 1^3 = 3*1^2 + 3*1 +1) + (3^3 - 2^3 = 3*2^2 + 3*2 + 1) ... (n + 1)^3 - n^3 = 3*n^2 + 3*n + 1 [And then there's a horizontal line under these rows, and under the horizontal line there's this next equation] (n + 1)^3 - 1 = 3[1^2 + ... + n^2] + 3*[1 + ... + n] + n . In this very last equation, I don't know how the 1 replaces -n^3. I also don't know how n^2 became the sum of 1^2 to n^2 or how the n became the sum of 1 to n. Also, is the original equation just arbitrary or is there a reason why they picked it? The end of the question says: Thus we can find the sum of k^2, from 1 to n, by knowing the sum of k, from 1 to n. I understand that I can isolate the 1^2 + ... + n^2 and get the proper formula for the sum of n^2, but I just don't know how they got there. I am so sorry for this mess. There is something wrong with the functions on this website.
 
[Here's the question] The formula 1^2 + ... + n^2 may be derived as follows. We begin with the formula (k + 1)^3 - k^3 = 3*k^2 + 3*k + 1. Writing this formula for k = 1, ... , n and adding, we obtain [The question actually has the following equations in rows with each equation positioned under the next. (I do not know how to put anything in rows in this post.)] ( 2^3 - 1^3 = 3*1^2 + 3*1 +1) + (3^3 - 2^3 = 3*2^2 + 3*2 + 1) ... (n + 1)^3 - n^3 = 3*n^2 + 3*n + 1 [And then there's a horizontal line under these rows, and under the horizontal line there's this next equation] (n + 1)^3 - 1 = 3[1^2 + ... + n^2] + 3*[1 + ... + n] + n . In this very last equation, I don't know how the 1 replaces -n^3. I also don't know how n^2 became the sum of 1^2 to n^2 or how the n became the sum of 1 to n. Also, is the original equation just arbitrary or is there a reason why they picked it? The end of the question says: Thus we can find the sum of k^2, from 1 to n, by knowing the sum of k, from 1 to n. I understand that I can isolate the 1^2 + ... + n^2 and get the proper formula for the sum of n^2, but I just don't know how they got there. I am so sorry for this mess. There is something wrong with the functions on this website.
\(\displaystyle (a + 1)^3 = a^3 + 3a^2 + 3a + 1 \implies (a + 1)^3 - a^3 = 3a^2 + 3a + 1 \implies\)

\(\displaystyle \displaystyle \left(\sum_{i = 1}^n\{i + 1\}^3 - i^3\right) = \left(\sum_{i = 1}^n3i^2 + 3i + 1\right) \implies\)

\(\displaystyle \displaystyle \left(\sum_{i = 2}^{n + 1}i^3\right) - \left(\sum_{i=1}^ni^3\right) = \left(\sum_{i = 1}^n3i^2 + 3i + 1\right) \implies\)

\(\displaystyle \displaystyle (n + 1)^3 + \left(\sum_{i = 2}^ni^3\right) - \left(\sum_{i=2}^ni^3\right) - 1^3 = \left(\sum_{i = 1}^n3i^2 + 3i + 1\right) \implies\)

\(\displaystyle \displaystyle (n + 1)^3 - 1^3 = n^3 + 3n^2 + 3n + 1 - 1 = n^3 + 3n^2 + 3n = \left(\sum_{i = 1}^n3i^2 + 3i + 1\right) \implies\)

\(\displaystyle \displaystyle n^3 + 3n^2 + 3n = 3\left(\sum_{i = 1}^ni^2\right) + 3\left(\sum_{i=1}^ni\right) + \left(\sum_{i=1}^n1\right) = 3\left(\sum_{i = 1}^ni^2\right) + 3 * \dfrac{n(n + 1)}{2} + n \implies\)

\(\displaystyle \displaystyle 3 * \sum_{i = 1}^ni^2= n^3 + 3n^2 + 3n - \dfrac{3n(n + 1)}{2} - n = \dfrac{2n^3 + 6n^2 + 6n - 3n^2 - 3n - 2n}{2} = \dfrac{2n^3 + 3n^2 + n}{2} \implies\)

\(\displaystyle \displaystyle \sum_{i = 1}^ni^2= \dfrac{2n^3 + 3n^2 + n}{3 * 2} = \dfrac{n(2n^2 + 3n + 1)}{6} = \dfrac{n(n + 1)(2n + 1)}{6}.\)
 
Last edited:
[Here's the question] The formula 1^2 + ... + n^2 may be derived as follows. We begin with the formula (k + 1)^3 - k^3 = 3*k^2 + 3*k + 1. Writing this formula for k = 1, ... , n and adding, we obtain [The question actually has the following equations in rows with each equation positioned under the next. (I do not know how to put anything in rows in this post.)]

( 2^3 - 1^3 = 3*1^2 + 3*1 +1) +
(3^3 - 2^3 = 3*2^2 + 3*2 + 1) +

(4^3 - 3^3 = 3*3^2 + 3*3 + 1) +..

(n + 1)^3 - n^3 = 3*n^2 + 3*n + 1
_______________________________.....................Summing Left-hand-sides(LHSs) and RHSs we get
(n + 1)^3 - 1 = 3[1^2 + ... + n^2] + 3*[1 + ... + n] +n

Notice on the LHS the First term of a line gets cancelled by the second term of the line below
(upon addition).

Thus

(23)in 1st line gets cancelled by (-23)of the 2nd line (upon addition)

(33)in 2nd line gets cancelled by (-33)of the 3rd line (and so on)

- leaving us with (-13) from first line and (n+1)3 from the last line.


[And then there's a horizontal line under these rows, and under the horizontal line there's this next equation]
(n + 1)^3 - 1 = 3[1^2 + ... + n^2] + 3*[1 + ... + n] + n . In this very last equation, I don't know how the 1 replaces -n^3. I also don't know how n^2 became the sum of 1^2 to n^2 or how the n became the sum of 1 to n. Also, is the original equation just arbitrary or is there a reason why they picked it? The end of the question says: Thus we can find the sum of k^2, from 1 to n, by knowing the sum of k, from 1 to n. I understand that I can isolate the 1^2 + ... + n^2 and get the proper formula for the sum of n^2, but I just don't know how they got there. I am so sorry for this mess. There is something wrong with the functions on this website.
.
 
Last edited by a moderator:
Hello, The Student!

Here's the derivation I saw years ago . . .


We know that: .\(\displaystyle \displaystyle \sum^n_{k=1}k \:=\:\frac{n(n+1)}{2}\)


Consider: \(\displaystyle k^3 - (k-1)^3 \:=\:3k^2 - 3k + 1\)

Now let \(\displaystyle k\:=\: n,n\!-\!1,n\!-\!2,\text{ . . . }3,2,1\)
. . and "stack" the equations.

\(\displaystyle \begin{array}{ccccc} n^3-(n-1)^3 &=& 3n^2 - 3n + 1 \\
(n-1)^3-(n-1)^3 &=& 3(n-1)^2-3(n-1)+1 \\
(n-2)^3 - (n-2)^3 &=& 3(n-2)^2-3(n-2)+1 \\
\vdots && \vdots \\
3^3 - 2^3 &=& 3\cdot3^2 - 3\cdot 3 + 1 \\
2^3 - 1^3 &=& 3\cdot 2^2 - 3\cdot 2 + 1 \\
1^3 - 0^3 &=& 3\cdot 1^2 - 3\cdot 1 + 1 \\ \hline \end{array}\)


Add the equations.

The left side reduces to \(\displaystyle n^3.\)

The right side is:
. . \(\displaystyle 3(1^2 + 2^2 + 3^2 + \cdots + n^2) -3(1+2+3+\cdots+n) + (1+1+1+\cdots+1)\)

. . \(\displaystyle \displaystyle = \;3\sum^n_{k=1} k^2 - 3\sum^n_{k=1} k + n \;=\;3\sum^n_{k=1}k^2 - 3\!\cdot\!\frac{n(n+1)}{2} + n\)


We have: .\(\displaystyle \displaystyle n^3 \;=\;3\sum^n_{k=1} - \tfrac{3}{2}n(n+1) + n\)

. . . .\(\displaystyle \displaystyle 3\sum^n_{k=1}k^2 \;=\;n^3 + \tfrac{3}{2}n(n+1) - n \;=\;\dfrac{2n^3 + 3n^2 + 3n - 2n}{2}\)

. . . . . . . . . . \(\displaystyle =\;\dfrac{2n^3 + 3n^2 + n}{2} \;=\;\dfrac{n(2n^2 + 3n + 1)}{2}\)

. . . .\(\displaystyle \displaystyle 3\sum^n_{k=1}k^2 \;=\; \frac{n(n+1)(2n+1)}{2}\)


Therefore: .\(\displaystyle \displaystyle \sum^n_{k=1}k^2 \;=\;\frac{n(n+1)(2n+1)}{6}\)
 
Top