<s>[INST] Factoring $x^4z-2z^2-4x^6+x^2z$ We want to factor $8x^4y^4-2y^8-4x^6+x^2y^4 = -2y^8 + (8x^4+x^2)y^4 -4x^6$. We substitute $x^4$ with $z$:
Now we want to compute this $8x^4z-2z^2-4x^6+x^2z = -(x^2-2z)(4x^4-z)$ by hand.
Therefore we transform it into $-(2z^2-(8x^4+x^4)z+4x^6z^0)$ and use the quadratic formula on the (inner) polynomial in $z$. The result is 
$$z = \frac 1 2 x^2 \lor z = 4x^4.$$ 
So the result should be $(z-\frac 1 2 x^2)(z-4x^4)$. But the first factor appears only half? What is the reason for that? Is this a way to factor $8x^4y^4-2y^8-4x^6+x^2y^4$? The exercise is to use the recursive form $-2y^8 + (8x^4+x^2)y^4 -4x^6 \in \mathbb{Q}[y][x]$ (or alternatively $\mathbb{Q}[x][y]$).
 [/INST] $$8x^4y^4-2y^8-4x^6+x^2y^4 =(8x^4y^4-2y^8)-(4x^6-x^2y^4)=2y^4(4x^4-y^4)-x^2(4x^4-y^4)=$$
$$=(2y^4-x^2)(4x^4-y^4)=(2y^4-x^2)((2x^2)^2-(y^2)^2)=(2y^4-x^2)(2x^2-y^2)(2x^2+y^2)$$
</s>