Answer
$f(x)=(x-2)(x^{2} +2x+2)$
Work Step by Step
See The Rational Zero Theorem:
If $\frac{p}{q}$ is a zero of the polynomial $f(x) $with integer coefficients, then $p$ is a factor of the constant term, $a_{0}$, and $q$ is a factor of the leading coefficient, $a_{n}$.
------------------------
$f(x)=x^{3}-2x-4$
a. Candidates for zeros, $\frac{p}{q}:$
$p:\qquad \pm 1, \pm2,\pm4,$
$q:\qquad \pm 1, $
$\displaystyle \frac{p}{q}:\qquad \pm 1,\pm2, \pm4$
b. Try for $x=2:$
$\begin{array}{lllll}
\underline{2}| & 1 &0 & -2 & -4\\
& & 2 & 4 & 4\\
& -- & -- & -- & --\\
& 1 & 2 & 2 & |\underline{0}
\end{array}$
$2$ is a zero,
$f(x)=(x-2)(x^{2} +2x+2)$
The trinomial has negative discriminant ($2^2-4(1)(2)=-4$), so it is irreducible.