Interpolating $\sum_{k=0}^nk(k+1)$

111 Views Asked by At

We know that function: $$ f(n)=\sum_{k=0}^nk(k+1) $$ is a polynomial of third degree.

I am tasked to write this polynomial using interpolation.

How to do it? Should I just come up with 4 different nodes (to get polynomial of third degree) e.g. $1,\ 2,\ 3,\ 4$ and calculate their value with $f(n)$ and then just interpolate them? (I know Newton and Lagrange methods)

I'm not asking you to solve this, just tell whether my method is correct (or tell me another solution).

1

There are 1 best solutions below

2
On BEST ANSWER

As this polynomial is unique, any polynomial interpolation method on at least four points will work. More than four is overkill (the higher degree coefficients will end-up being zero).

As by-hand Lagrange interpolation is not so fun (consider using the Neville scheme), you can take advantage of the fact that there is no constant term ($f(0)=0$), and interpolate

$$\frac{f(n)}n$$ on three points instead.

The method of indeterminate coefficients might be advantageous.

$$\begin{cases}a+b+c&=\dfrac21,\\4a+2b+c&=\dfrac82,\\9a+3b+c&=\dfrac{20}3.\end{cases}$$


Additional hint:

By integration, we see that the sum must be asymptotic to $\dfrac{n^3}3$, so that the leading coefficient is $\dfrac13$.

Then you can perform a two-points interpolation on

$$\frac{f(n)-\dfrac{n^3}3}{n}.$$

$$\begin{cases}a+b&=\dfrac{2-\dfrac13}1,\\2a+b&=\dfrac{8-\dfrac83}2.\end{cases}$$

The solution is quasi-immediate.


A better trick:

Notice that

$$k(k+1)(k+2)-(k-1)k(k+1)=3k(k+1).$$

Then by telescoping,

$$\sum_{k=1}^n k(k+1)=\dfrac{n(n+1)(n+2)-0\cdot1\cdot2}3.$$

The trick works with all raising factorials.