# linear equation trick for polynomial with integer coeeficients

Let P(x) be a polynomial with integer coeeficients of the form

$P(x)=x^5+ax^4+bx^3+cx^2+dx+e$

for some integers a,b,c,d and e.

If $$\left\{ \begin{array}{l} P(1)=1\\P(2)=2\\P(3)=3\\P(4)=4\\P(5)=5 \end{array} \right.$$

what is P(6)?

• You're basically given a system of linear equations that you need to solve in order to get $a,b,c,d$ and $e$. Then you'll be able to explicitly compute $P(6)$. Commented Dec 4, 2016 at 20:13
• $P(x)-x$ is a polynomial of degree $5$ with leading coefficient $1$ and vanishes on $5$ points $1,2,3,4,5$, this means.... Commented Dec 4, 2016 at 20:19
• @john_jerome Hmmm, it's possible to do it by solve a,b,c,d,e firstly then get P(6), but I guess we should not do it that way. so I guess some trick needed to solve P(6). Commented Dec 4, 2016 at 20:19
• See this answer. Commented Dec 4, 2016 at 21:15

The polynomial $$P(x)-x$$ has $5$ roots, namely $1,2,3,4,5$. Since the degree of $P(x)-x$ is $5$ and the leading coefficient is $1$ , we have $$P(x)-x=(x-1)(x-2)(x-3)(x-4)(x-5)$$ This implies $$P(x)=(x-1)(x-2)(x-3)(x-4)(x-5)+x$$Just insert $6$ to get the result.