$f(x) =ax^6 +bx^5+cx^4+dx^3+ex^2+gx+h $, find $f(7)$.

Problem :

Given a polynomial $f(x) =ax^6 +bx^5+cx^4+dx^3+ex^2+gx+h$ such that $f(1)= 1, f(2) =2 , f(3) = 3, f(4) =4, f(5)=5, f(6) =6$.

Find $f(7)$ in terms of $h$.

My approach:

We can put the values of $f(1) = 1$ in the given equation and $f(2) = 2$, etc. But this is quite time consuming by making six different equations and then solve them to get the values of $a,b,c,d,e,g,h$. Please suggest some alternate solution for this.


Since $f(x) - x$ is a polynomial of degree $6$ and has $6$ roots $1, 2, 3, 4, 5, 6$ by condition, we can factorize $f(x) - x$ as: $$f(x) - x = C(x - 1)(x - 2)(x - 3)(x - 4)(x - 5)(x - 6).$$ Plug in $x = 0$ in the above expression, we have $3 - 0 = C\times 6!$, hence $C = \dfrac{3}{6!}$. Therefore, $$f(7) = 7 + (f(7) - 7) = 7 + \frac{3}{6!}(7 - 1)(7 - 2)(7 - 3)(7 - 4)(7 -5 )(7 - 6) = 7 + \frac{3}{6!}\times 6! = 10.$$


For a method which is intermediate in cleverness between the one given by the other answers and just solving the system of simultaneous equations, you could use successive differences. We write the following table:

$$ \begin{array}{ccccccccccccccc} h & & 1 & & 2 & & 3 & & 4 & & 5 & & 6 & & x_6 \\ & 1-h & & 1 & & 1 & & 1 & & 1 & & 1 & & x_5 \\ && h && 0 && 0 && 0 && 0 && x_4 \\ &&& -h && 0 && 0 && 0 && x_3 \\ &&&& h && 0 && 0 && x_2 \\ &&&&& -h && 0 && x_1 \\ &&&&&& h && x_0 \end{array}$$ where each number is the difference of the two directly above it. Then each row of this table represents a polynomial whose degree is one lower than the row above it; since we started with a degree-6 polynomial, the bottom row is constant, and so $x_0=h$. Working our way back up the table, we then have $$ x_1=0+x_0=h\\ x_2=0+x_1=h\\ x_3=0+x_2=h\\ x_4=0+x_3=h\\ x_5=1+x_4=h+1\\ x_6=6+x_5=h+7 $$ and so $f(7)=h+7$.


If f(0) were 0 then the answer would be 7, because fixing the 7 points leads to a unique solution and f(x) = x is obviously a solution. Now, suppose we change f(0) to some value h. One can then argue that the function g(x) = f(x) - x will have the symmetry g(7-x) = g(x). Therefore adding h to f(0) will increase the value of f(7) by h, therefore it will be increased to 7+h.