Say you have the polynomial $ x^4 + 2 + x^{-4} $
Looking at it, you see you can do $\begin{align*} x^4 + 1 + 1 + x^{-4} & =x^2( x^2 + x^{-2} ) + x^{-2}( x^2 + x^{-2} )\\ &= \left( x^2 + x^{-2} \right)^2. \end{align*}$ Another one is $\begin{align*} x^2 + \frac{1}{2} + \frac{1}{16x^2} &= x^2 + \frac{1}{4} + \frac{1}{4} + \frac{1}{16x^2} \\ &=x^2\left( 1 + \frac{1}{4x^2} \right) + \frac{1}{4}\left( 1 + \frac{1}{4x^2} \right)\\ &=\left( x^2 + \frac{1}{4}\right) \left( 1 + \frac{1}{4x^2} \right)\\ (x^2) \left( 1 + \frac{1}{4x^2} \right)^2. \end{align*}$
So the question is, I've been doing this by "inspection" - are there any techniques for recognizing when this type of factorization is possible or how to do more easily?