Answer
$(x^2+1)(2x^2+x+2)$
Work Step by Step
We factor the given expression by grouping terms and factoring out the greatest common factor:
$$\begin{align*}
x^3+x+2x^4+4x^2+2&=(x^3+x)+(2x^4+4x^2+2)\\
&=x(x^2+1)+2(x^4+2x^2+1)\\
&=x(x^2+1)+2(x^2+1)^2\\
&=(x^2+1)(x+2(x^2+1))\\
&=(x^2+1)(2x^2+x+2).
\end{align*}$$