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 :


*

*The coefficient oh highest degree is $1$

*P is divisible by $x^2+x+1$

*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.$$
