Find all values of $x$ at which $P(x)=x^4-4x^3+22x^2-36x+18$ is a perfect square Find all values  of  positive  integer  $x$ at which  the following  expression is perfect  square 
$$P(x)=x^4-4x^3+22x^2-36x+18$$
I tried  to assume $P= (x^2+ax+b)^2$  ;  and  comparing the cofactors , get that $a= -2 ; b= 9$ 
, but when expand the $x^2-2x+9$,  I didn't get  the same as $P$
What is wrong in my work? 

As Jyrki Lahtonen mentioned in comments, my bounds can be improved to
$$(x^2-2x-14)^2 < P(x) < (x^2-2x-13)^2,$$
or in expanded form:
$$196 + 56 x - 24 x^2 - 4 x^3 + x^4 < 18 - 36 x - 22 x^2 - 4 x^3 + x^4 < 169 + 52 x - 22 x^2 - 4 x^3 + x^4$$
for sufficiently large values of $x$ ($x \ge 48$ in first inequality, $x \ge -1$ in the second one). But these bounds are actually squares of adjacent integers, so after inspection of finitely many cases ($x = 1, 2, \ldots, 47$) we can surelz say that $P(x)$ is never a square.
