Given function:
\[
f(x) = \frac{x^2 + x + 1}{x} = x + 1 + \frac{1}{x}
\]
Let \( y = f(x) = x + 1 + \frac{1}{x} \)
Rewriting:
\[
y = x + \frac{1}{x} + 1 \Rightarrow y - 1 = x + \frac{1}{x}
\]
Now, analyze the expression \( z = x + \frac{1}{x} \). For \( x>0 \), we know by AM-GM inequality:
\[
x + \frac{1}{x} \geq 2 \Rightarrow y \geq 3
\]
For \( x<0 \), let’s define \( x = -a \), \( a>0 \), then:
\[
x + \frac{1}{x} = -a - \frac{1}{a} \leq -2 \Rightarrow y \leq -1
\]
Therefore, the range of \( y \) is:
\[
(-\infty, -1] \cup [3, \infty)
\]