1

I'm trying to prove that: $1^2 + 2^2 + 3^2 + ...+ n^2 = \frac{n(n+1)(2n+1)}{6}$

Defining the upper left side of the equation as $a_n$ I get:

$a_n - a_{n-1} = n^2$

Then, from the homogeneous eguation:

$a_n = C$

but while predicting the nonhomogeneous part as:

$a_n = xn^2 + yn + z$

and putting in into $a_n - a_{n-1} = n^2$ I get:

$2xn + y - 1 = n^2$

but it is not even close to giving me a right answer. What am I doing wrong?

Arnaud D.
  • 20,884
  • 1
    Why don't you prove it by induction on $n$? – user289143 Nov 08 '19 at 10:47
  • 2
    Try the ansatz $a_n=xn^3+yn^3+zn+w$ instead? – Hagen von Eitzen Nov 08 '19 at 10:47
  • 1
    I'm pretty sure this question has been already treated on this website. Did you try the search function? – Matti P. Nov 08 '19 at 10:48
  • Well, I misdefined the goal. I want to show that the right side is the mentioned sum withou having known the answer. – alladinsane Nov 08 '19 at 10:49
  • @TobyMak why is that? $a_n = 1 + ... + (n-1)^2 + n^2$

    $a_{n-1} = 1 + ... + (n-1)^2$

    – alladinsane Nov 08 '19 at 10:50
  • @TobyMak: I think $a_n$ is supposed to be the sum of the squares, not the squares themselves – Henry Nov 08 '19 at 10:50
  • Sorry, misread the question. You could redefine the question to only use recurrence relations to come up with this result, as this question has been asked plenty of times on this site before. – Toby Mak Nov 08 '19 at 10:51
  • @HagenvonEitzen why $an^3$? My nonhomogeneous part is $n^2$ so I should predict a polynomial of the same degree. – alladinsane Nov 08 '19 at 10:52
  • 1
    I've seen it, but I would like to do it only by using recursion, as I wrote. – alladinsane Nov 08 '19 at 10:55
  • Fair enough, but you should try to have a look at the answers (and also those of the linked questions) to see if someone has used a similar approach before. – Arnaud D. Nov 08 '19 at 10:57
  • I've checked it out, but still don't understand why a simple predicting method doesn't seem to work, in other words why there should be a cubic polymonial instead of quadratic. Surely I get it that the $n^2$ will disappear as it happened in my case, but the theory says that quadratic should be enough? – alladinsane Nov 08 '19 at 11:06
  • Ok, let me put it in this way: we have a cubic polynomial due to the Faulhaber's formula? So that a sum of $n^k$ for $n = 1,2,3,...,m$ is always of a $k+1$ degree? – alladinsane Nov 08 '19 at 11:23
  • 1
    @FilipWichrowski It's the same reason why in solving the differential equation $$y'-y=(t^2+3t+1)e^t$$ you look for a particular solution of the form $$y_p=t(At^2+Bt+C)e^t$$ instead of $$y_p=(At^2+Bt+C)e^t.$$ – bof Nov 08 '19 at 11:28
  • Ok, I see now. But does this Faulhaber's formula adds up in here aswell? – alladinsane Nov 08 '19 at 11:32
  • Why don't you use induction? – IamWill Nov 08 '19 at 11:33
  • @Willy.K written above. – alladinsane Nov 08 '19 at 11:36
  • @bof if I put $a_n = an^3 + bn^2 + cn + d$ into $a_n − a_{n−1} = n^2$ won't the 3rd powers disappear? – alladinsane Nov 08 '19 at 12:04

1 Answers1

1

I'm not familiar with your terminology of homogeneous and nonhomogeneous parts, so I can't answer exactly what's wrong with your approach, except for saying that when your sequence looks like $\sum p(k)$ for a polynomial $p$ of degree $d$, then you should expect your sequence to be given by a polynomial of degree $d+1$.

The reason is probably easier to appreciate when $d$ is small. For example suppose $a_n=\sum_{k=1}^n1$. Obviously $a_n$ is just $n$, which is a polynomial of degree $1$. Each additional summand has degree $0$ (it is the constant $1$), but since we are taking the cumulative sum of all the summands, the result ends up with something that grows faster and has degree $1$. Similarly, if $a_n=\sum_{k=1}^nk$, then $a_n=n(n+1)/2$ is given by a quadratic polynomial. This is because each successive summand is linear, which makes the growth rate of $a_n$ faster than that and in particular becomes a quadratic.

So for your case $$a_n=\sum_{k=1}^nk^2,$$ you should be expecting a cubic polynomial as the resulting closed form expression for $a_n$. So let $a_n=c_0+c_1n+c_2n^2+c_3n^3$, and then go from there.

YiFan Tey
  • 17,431
  • 4
  • 28
  • 66
  • Thanks, I've found Faulhaber's formula stating the same. But if I put a cubic polynomial into the equation, again, the 3rd powers will disappear. – alladinsane Nov 08 '19 at 11:37
  • And what happens if I want to obtain a limit: $\lim_{n \to \infty}\frac{1^k+2^k+...+n^k}{n^(k+1)}$? Do I need to use... binomial formula? Seems terrible. – alladinsane Nov 08 '19 at 11:42
  • @Filip hmm, what equation are you referring to? If you're talking about something like the $n^k$ terms disappearing in $(n+1)^k-n^k$, well that's correct and exactly corresponds to how each additional summand is of degree $k$. – YiFan Tey Nov 08 '19 at 11:47
  • For the limit, my best best would be to plug in the closed form formula for $\sum i^k$ and see what you get. Actually, we only need the coefficient of $n^{k+1}$, which can be obtained using tricks like integration. Perhaps you want to ask a new question about that? – YiFan Tey Nov 08 '19 at 11:49
  • Sure, won't bother you with the thing not quite realted to the topic. Yes, I'm referring to $a_n - a_{n-1} = n^2$ for $a_n = an^3 + bn^2 + cn + d$. Won't the third powers disappear? – alladinsane Nov 08 '19 at 11:57
  • I guess they will, so it gives me nothing but a result I mentioned in the very first post. – alladinsane Nov 08 '19 at 12:00
  • Indeed, they will disappear, but your method still works, since we can get the equation $$a(n+1)^3+b(n+1)+c(n+1)+d-an^3-bn^2-cn-d=n^2$ for all $n$, and although the cubic term disappears, your coefficients $a,b,c,d$ don't. Pairing up the coefficients of the polynomials in $n$ on both sides gives us information we can use regarding the permissible values of $a,b,c,d$. – YiFan Tey Nov 08 '19 at 12:14
  • That's right! I have tried pairing them up but should have really remained e.x $0n^3$ as $n^3(a-a) $. Thanks a lot! – alladinsane Nov 08 '19 at 12:39