$f(X)$ is irreducible if and only if $X^{\deg(f)}f(\frac{1}{X})$ is irreducible This is Question 19.5 of "Abstract Algebra: A First Course" by Dan Saracino:
Suppose $\mathbb{F}$ is a field and $a_i \in \mathbb{F}$.
Let $$f(X)=a_0+a_1X+\cdots +a_mX^m$$
and $$g(X)=a_m+a_{m-1}X+\cdots +a_0X^m.$$
Prove $f(X)$ is irreducible over $\mathbb{F}$ iff $g(X)$ is irreducible over $\mathbb{F}$.
This problem seems very easy. we can say if $f(X)=h(X)l(X)$, then since $g(X)=X^mf(\frac{1}{X})$, $$g(X)=X^{\deg(h)}h(\frac{1}{X})X^{\deg(l)}l(\frac{1}{X})=\hat{h}(X)\hat{l}(X).$$
However, I am skeptical about the approach. Since $f(X)$ is not a function but an element of $\mathbb{F}[X]$, $f(\frac{1}{X})$ does not have a meaning. Moreover, since later in the book we have a question that says, if $r \in \mathbb{F}$ and $f(X)=g(
X)h(X)$, prove $f(r)=g(r)h(r)$, I realized it is not correct to simply consider $X$ as a variable and change it to $\frac{1}{X}$.
So what should I do here to make this argument rigorous?
 A: This argument can be made rigorous, though unfortunately most books treat it as something obvious. The polynomial ring has a universal property. If $S$ is a commutative ring and $\varphi:F\to S$ is a homomorphism, then for any $s\in S$ there is a unique "extension" to a homomorphism $F[x]\to S$ which sends $x\to s$. The proof is easy.
Now, $F[x]$ is contained in the field of rational functions, which is denoted by $F(x)$. So given a polynomial $f$, the expression $f(\frac{1}{x})$ indeed has a meaning. This is the image of the polynomial $f(x)$ under the homomorphism $\varphi:F[x]\to F(x)$ which satisfies $\varphi(r)=r$ for $r\in F$, and $\varphi(x)=\frac{1}{x}$. Since $\varphi$ is a homomorphism, we indeed have the expected properties:
$(g+h)(\frac{1}{x})=g(\frac{1}{x})+h(\frac{1}{x}), \ \ \ \ (gh)(\frac{1}{x})=g(\frac{1}{x})h(\frac{1}{x})$
Of course it's annoying to define $\varphi$ every time, so we just call it substituting the element $\frac{1}{x}\in F(x)$ into a polynomial. But it's definitely good to see the rigorous meaning at least once.
