<s>[INST] What is the simplest way to factor the following polynomial $x^4-8x^2+x+12$? 
What is the simplest  way  to factor the following  polynomial  $$x^4-8x^2+x+12$$ ?

Note : I already knew the factorization which is 
$$(x^2-x-3)(x^2+x-4)$$ 
I need the way to get that 
Thank you for your help.
 [/INST] I like the following way.
$$x^4-8x^2+x+12=(x^2+k)^2-((2k+8)x^2-x+k^2-12).$$
Now, we need to find a value of $k$, for which $(2k+8)x^2-x+k^2-12=(ax+b)^2$,
for which we need $$1-4(2k+8)(k^2-12)=0$$ or
$$(2k+7)(4k^2+2k-55)=0.$$
Easy to see that $k=-3.5$ is valid.
Indeed, $$x^4-8x^2+x+12=(x^2-3.5)^2-(x^2-x+0.25)=$$
$$=(x^2-3.5)^2-(x-0.5)^2=(x^2-x-3)(x^2+x-4)$$
and we are done!
In the general case we'll get a cubic equation with the variable $k$ and one of this equation roots always gives difference of squares and possibility of the factorization.    
</s>