I want to check whether the following polynomials is irreducible over the rationals $f=X^4-3X^2+2X+1$. I think I found that it is irreducible but my solution is really complicated, quite long and I am not sure whether this is correct. I would really appreciate it if someone could point out any mistakes or tell me whether my reasoning is correct. Sadly, I cannot use the classical theorems like Eisenstein (there is no common divisor of the coefficients $-3,2$ and $1$ and neither I have found a good reduction modulo some prime $p$. I have tried $p=2$, which gave me $X^4+X^2+1$ which is reducible and $p=3$ which gave me $X^4+2X+1$ for which $-1$ is a root thus also reducible. Out of options, I resorted to doing it by hand. Since $f$ is normed it is primitive. Thus, $f$ irreducible over $\mathbb{Q}[X]$ if and only if it is irreducible over $\mathbb{Z}[X]$ which follows by Gauss. Then, I checked whether the polynomial had any roots in $\mathbb Z$. It does not because since every root of a polynomial must a divisor of the constant term, here $1$ only $\pm 1$ are possible options for roots. Since $f(\pm 1)\neq 0$ I deduced that f does not have rational roots. Thus, if $f=gh$ for some polynomials $g,h\in \mathbb{Z}[X]$, then both $g$ and $h$ need to be quadratic. So I made the following ansatz \begin{align} f&=gh=(\alpha_1X^2+\beta_1X+\gamma_1)(\alpha_2X^2+\beta_2X+\gamma_2)\\ &=\alpha_1\alpha_2X^4+(\alpha_1\beta_2+\alpha_2\beta_1)X^3+(\beta_1\beta_2+\gamma_1\alpha_2+\gamma_2\alpha_1)X^2+(\beta_1\gamma_2+\beta_2\gamma_1)X+\gamma_2\gamma_1 \end{align}
with $\alpha_i,\beta_i,\gamma_i\in\mathbb{Z}$ for $i=1,2$. Then, I can start doing some simplification by comparing this to the original f. Obviously, $\alpha_1=\alpha_2=\pm1$, from which we can deduce by looking at the term proportional to $X^3$ that $\alpha_1\beta_2+\beta_1\alpha_2=\pm(\beta_1+\beta_2)=0$, it follows $\beta=\beta_1=-\beta_2)$. However, at the same time $\gamma_1=\gamma_2=\pm 1$. Then, by looking at the term proportional to $X$, we see that $\beta_2\gamma_1+\beta_1\gamma_2=\pm(\beta_1+\beta_2)=2$ which is a contradiction. Thus, f must the irreducible. I would really really appreciate any help on this, I have been stuck on this for hours and I have no idea whether what I did was correct. Thank you so much in advance!