<s>[INST] Range of a function $f(x)$ 
As x varies over all real numbers, the range of the function $$f(x)=\frac{x^2-3x+4}{x^2+3x+4}$$  is (1) $[\frac{1}{7},7]$, (2) $[-\frac{1}{7},7]$, (3) $[-7,7]$ (4) $(-\infty,\frac{1}{7})\bigcup(7,\infty)$.

Trial:$$\begin{align} \frac{x^2-3x+4}{x^2+3x+4} &=\frac{(x-\frac{3}{2})^2+\frac{7}{4}}{(x+\frac{3}{2})^2+\frac{7}{4}} >0 \end{align}$$ So,(1) will be the right answer. But how I show that $\frac{1}{7} \leq f(x) \leq 7$. Please help.

Note:  Originally it was stated that
$$f(x)=\frac{x^2-3x+1}{x^2+3x+1},$$
and this is what the initial answers were based on.
 [/INST] Answer to modified question: Note that the line $y=1$ is an asymptote to the curve $y=f(x)$.
Calculate $f'(x)$.  It turns out to be $\frac{6x^2-24}{(x^2+3x+4)^2}$. So $f(x)$ is increasing from $-\infty$ to $-2$, then decreasing until $2$, then increasing. 
For negative $x$, the curve is above the asymptote, and for positive $x$ it is below the asymptote. 
The maximum value (at $x=-2$) is $7$, and the minimum value (at $x=2$) is $\frac{1}{7}$. So the range is $[1/7,7]$. 
</s>