# Construction of a polynomial of degree 4 with some conditions

Exercise Let $P(x)$ be a polynomial of degree $4$, the question is :

Find this $P$ such that :

1. The coefficient oh highest degree is $1$
2. P is divisible by $x^2+x+1$
3. The rest of the division of $P$ by $x^2-1$ is $-3x+9$

The first condition implies that $P=a_0+a_1x+a_2x^2+a_3x^3+x^4$. The second one can be written as $$P(x)=\bigl(x(x+1)+1\bigr)Q(X).$$ So $Q(x)=\frac{a_0+a_1x+a_2x^2+a_3x^3+x^4}{x(x+1)+1}$ with $P(0)=Q(0)$ and $P(-1)=Q(-1)$. The last condition I wrote $$P(x)=-3X+9+R(x)\bigl((x-1)(x+1)\bigr).$$ Then we have a system, $$\left\{ \begin{array}{ll} a_0+a_1+a_2+a_3=5 \\ a_0-a_1+a_2-a_3=13& \end{array} \right.$$ because $P(1)=6$ and $P(-1)=12$. Which is equivalent to $$\left\{ \begin{array}{ll} a_0+a_2=9 \\ a_1+a_3=-4& \end{array} \right.$$

How can I continue?

Since there is a $(a,b)$ such that $$P(x)=(x^2+x+1)(x^2+ax+b),$$ you can find $(a,b)$ from $$P(1)=6\iff (1+1+1)(1+a+b)=6,$$$$P(-1)=12\iff (1-1+1)(1-a+b)=12.$$

• Arf cr*p I didn't think about $\deg(Q)$ must be equal to $2$. Thanks a lot. +1 and accept. – user142836 Aug 29 '14 at 19:17
• @Yass: You are welcome. – mathlove Aug 29 '14 at 19:18

(1+2) $P(x)=(x^2 +bx+c)(x^2+x+1)$

(3) $P(x)=(x^2-1)Q(x)+(-3x+9)$

Doing $P(1)$ and $P(-1)$ (+1, -1 are roots of $x^2-1$) in (3) we have

$P(1) = 6,\ P(-1)=12$ and using (1+2)

$$P(1)= 6 = (1+b+c)\cdot 3$$

$$P(-1)=12=(1-b+c)\cdot 1$$

So

$$b+c=1$$ $$-b+c=11$$

therefore

P(x)=(x^2-5x+6)(x^2+x+1)