My attempts:
I cannot apply the Eisenstein's criteria here, because there is no prime number that divides the constant term i.e. $1$ Taking a translation of the form $x \rightarrow x+a$ does not solve this issue either.
Next, I tried the mod tests: $\operatorname{mod}2$ doesn't work since $x^4-x^2+1=(x^2+x+1)(x^2-x+1)$, similarly in $\operatorname{mod}3$ $x^4-x^2+1=(x^2+1)^2$. Now I can go on and maybe eventually find a $\operatorname{mod}p$ that works, but that is very time consuming, specially in examinations.
So, I'll use the rational root test. The possibilities for roots are $\pm 1$ and it is easy to see that neither is a root.
The only possibility left then are quadratic factors, say, $(x^2+ax+b)(x^2+cx+d)=x^4-x^2+1$
This gives me a set of equations $bd=1, a+c=0, b+d+ac=-1$. So either $b=d=1$, in which case $a=\pm \sqrt3 \notin \mathbb{Q}$, or $b=d=-1$, which gives $a=\pm i \notin \mathbb{Q}$.
So such factorization is not possible and hence the given polynomial is irreducible.
Is this solution correct? Also, is there an easier way to solve this? Thank you.