Finding the range of a Quadratic divided by a Quadratic I need to find the range of a function:
$$f(x) = \frac{e^{2x} - e^x + 1}{e^{2x} + 3e^x - 7} $$
Substituting $e^x = t $ and equating $f(x)$ to $y$, I get
$$(y-1)t^2 + (3y+1)t - (7y+1) = 0$$
Since $t$ must be real and positive, I get the range of y to be $(-\infty, -\frac{1}{3})\bigcup(1, \infty) $.
Is this correct?
 A: Substitute $f(x)$ with $y$: $y=\frac{e^{2x}-e^x+1}{e^{2x}+3e^x-7}$.
Rewrite in terms of $e^x$:
$$e^{2x}y+3e^xy-7y=e^{2x}-e^x+1$$
$$(y-1)(e^x)^2+(3y+1)e^x-(7y+1)=0$$
This equation has roots (with respect to $x$), when there are roots with respect to $e^x$ (discriminant is non-negative) and at least one root is positive.
$D=(3y+1)^2-4(y-1)(-7y-1)=37y^2-18y-3\ge0$ or $y\in\left(-\infty, \frac{9-8\sqrt{3}}{37}\right]\cup\left[\frac{9+8\sqrt{3}}{37}, \infty\right)$
In this case $e^x=\frac{-(3y-1)\pm\sqrt{37y^2-18y-3}}{2(y-1)}$
A: Here is an alternative answer.
Set $f(t) = \frac{t^2-t+1}{t^2+3t-7}$. We want the range of $f$ on $(0,\infty)$. This function has a singularity (vertical asymptote) at $t_0 = \frac{\sqrt{37} - 3}{2}$. Now
$$
f'(t) = \frac{4 \left(t^2-4 t+1\right)}{\left(t^2+3 t-7\right)^2}.
$$
Then $f'(t) = 0$ for $t_{1,2} = 2 \mp \sqrt{3}$.
and therefore $f' > 0$ on $(0,t_1)$, $f' < 0$ on $(t_1,t_0) \cup (t_0,t_2)$ and $f' > 0$ on $(t_2,\infty)$.
It follows that $f((0,\infty)) = (-\infty, f(t_1)] \cup [f(t_2,\infty)$ which is the range given in the previous answer.
