# finding value of $f(0)$ in third degree polynomial

Let $f(x)$ be a third degree polynomial with real coefficients such that

$|f(1 )|=|f(2)|=|f(3)|=|f(5)|=|f(6)|=|f(7)|=12$. then finding $|f(0)|$

Attempt: assume $|f(x)|=12$ for $x=1,2,3,5,6,7$

so $f(x)\pm 12 = A(x-1)(x-2)(x-3)(x-5)(x-6)(x-12)$

but from above i am getting $6$ th degree polynomial, could some help me to solve it, thanks

• f(x)±12 No, that doesn't follow. The signs need not (and in fact can not) be the same for all points e.g. it's possible that $f(1)=12$ but $f(2)=-12$. – dxiv Mar 12 '17 at 2:29

Since $f$ is a polynomial of degree 3, it can take the same value at most 3 times. Therefore there are three values $a_1$, $a_2$, $a_3$ among 1, 2, 3,5, 6,7 for which $f$ is 12 and three values $a_4$, $a_5$, $a_6$ for which $f$ is -12. Then $$f(x) = 12 + c(x-a_1)(x-a_2)(x-a_3) = -12+c (x-a_4)(x-a_5)(x-a_6)$$ with $c\neq 0$. Equating the coefficients of $x^2$ we get that $$a_1+a_2+a_3 = a_4+a_5+a_6 = (1+2+3+5+6+7)/2 = 12.$$ The triple that has 7 can't have 5 or 6 in it; that means that the groups are $2, 3, 7$ and $1, 5, 6$.
Since we only care about $|f(0)|$ we can assume, without loss of generality, that $f(1) = f(5) = f(6) = 12$ (otherwise replace $f$ by $-f$). Then, by comparing the terms without $x$, we get $$12 - c\cdot 1 \cdot 5 \cdot 6 = -12 - c\cdot 2 \cdot 3\cdot 7$$ and from this we find $c = -2$. That implies $$\pm f(x) = 12 -2(x-1)(x-5)(x-6) = -12 -2(x-2)(x-3)(x-7)$$ (note that the coefficients of $x$ match too) and $|f(0)| = 72$.
• Because $7+5 = 12$ and $7+6=13>12$, hence there would be no room for a third member. – Catalin Zara Mar 12 '17 at 3:37