Dividing a polynomial with integer coefficients by a quadratic In the following question, one of the coefficients of the divisor quadratic polynomial is unknown; so, it cant be factored for performing synthetic division. I tried to perform long division hoping to get some clues but ran into a conflict.
Appreciate your help. Thanks!!
Here is the question:
$x^2 -x +a$  evenly divides $x^8 + 5x^6 + 13x^4 + 20x^2 +36$. Determine positive integer $a$.
A few things I noted are:

*

*$a$ must be a factor of 36 so, I am thinking $a$ would be from $\{1, 2, 3, 4, 6, 9, 12, 18, 36\}$

*All the coefficients of the dividend polynomial are integers and degrees of all the terms are even. Not sure how to use this info.

*$P(x) = Q(x)(x^2 -x +a) + mx + n$.  Since the remainder is zero, $m$ and $n$ are zero. When I tried long division, I got two equations; but the value of $a$ would come as imaginary which conflicts with the first observation and the question asks for real integer $a$.

 A: Some quick observations : if $x$ is a root of $P(x)$ then so is $-x$. Thus if $(x^2-x+a)$ is a factor of $P(x)$, so is $(-x)^2-(-x)+a=x^2+x+a.$
Then $(x^2-x+a)(x^2+x+a)=x^4+(2a-1)x^2+a^2$ is a factor of $P(x)$. $\, a^2|36 \,$ $\Rightarrow a \in \{1,2,3,6\}$. (Here @Anwesha1729 observe in their answer that as $P(x)$ takes odd values also for integer $x$, $a$ must be odd.)
Let $P(x)=(x^4+(2a-1)x^2+a^2)(x^4+bx^2+c)$.
Comparing coefficients :
$$b+(2a-1)=5$$
$$a^2+c+(2a-1)b=13$$
$$a^2b+(2a-1)c=20$$
$$a^2c=36$$
It can be readily checked $a=3$ $\, (b=0,c=4)$
A: Avoiding the long division with a polynomial of degree $8$, you may note that
$$\begin{align}
\color{blue}{x^8} + \color{red}{5x^6} + \color{blue}{13x^4} + \color{red}{20x^2} +\color{blue}{36}
&=(x^8 + 13x^4 +36)+ (5x^6+ 20x^2)\\
&=(x^4+9)(x^4+4)+5x^2(x^4+4)\\
&=(x^4+5x^2+9)(x^4+4).
\end{align}$$
Now long division is easier to perform. Can you take it from here?
A: Let the $q(x)$ be the quotient when f(x) is divided by $x^2-x+a$. (where $f(x)$ be the given 8 degree polynomial). $f(x) = q(x)(x^2-x+a)$. $ f(0)= 36= a*q(0)$ , $f(1)=75=a*q(1)$ . As $ q(0), q(1) $ are integers (Since $q(x) $ is a polynomial with integer coefficients as coefficients of divisor are integers check that) ,$a|36, a|75$ this implies $a=1 $ or $3$ or no integer solution.
If $a=1$ then roots of $x^2-x+1=0$ i.e $ -w, -w^2$ are also the roots of $ f(x)$,  where $1+w +w^2=0$ and $w^3=1$ check that. You can check the case of $a=3$  using synthetic division or any other process.
