<s>[INST] Given that $n^4-4n^3+14n^2-20n+10$ is a perfect square, find all integers n that satisfy the condition So, I tried solving that by 
$$n^4-4n^3+14n^2-20n+10=x^2\\10=x^2-a^2, a^2=n^4-4n^3+14n^2-20n+10\\10=(x+a)(x-a)$$ but I couldn't find any integers when I solved it
 [/INST] Let us expand $(x^2+ax+b)^2 = (x^2+ax+b)(x^2+ax+b)$:
$$x^4 + (2a)x^3 + (a^2+2b)x^2 +(2ab)x+b^2$$
We want this to be as close as possible to the given expression, so we need to match the coefficients to the terms in the expansion. Starting from the coefficient after $x^4$ which is $x^3$, when $2a = -4 \Rightarrow a = -2$, we obtain $x^4 - 4x^3 + (4+2b)x^2 - (4b)x + b^2$.
Similarly, when $4+2b=14 \Rightarrow b = 5$, then we have $x^4 - 4x^3 + 14x^2 - 20x + 25$, which is exactly $15$ more than the given expression.
Therefore $x^2 = (n^2 - 2n + 5)^2 - 15$, and you can continue by using the difference of squares method explained in rain1's answer.
</s>