> Find the range of $f(x)=\frac{\sin^2x+\sin x-1}{\sin^2x-\sin x+2}$ 
Find the range of the function $$f(x)=\frac{\sin^2x+\sin x-1}{\sin^2x-\sin x+2}$$

I know how to find ranges of rational expressions when variable has its domain $\mathbb{R}$..but I can't solve the following problem where $\sin x$ has range .. 
 A: Hint:
Since it is not really very clear what you are asking I'm going to make the assumption that your objective is to compute the range of $f(x)$. 
The expression can be simplified since you have a quadratic expression in the numerator and denominator so $$f(x) = \frac{\sin^2 x + \sin x -1}{\sin^2 x -\sin x + 2}$$ by completing the square can be re-written as $$f(x) = \frac{\left(\sin x+\frac12\right)^2-\frac54}{\left(\sin x-\frac12\right)^2+\frac74}$$ You now have an expression that can be re-written as the difference of 2 squares such that $$a^2 – b^2 = (a + b)(a – b)$$ from this you can find the range of $f(x)$. The hint stops here. 
If you do this correctly you should find that the range is roughly $-0.519\le f(x)\le 0.5$.
A: I would treat the problem in a rather different way to that of @BLAZE.
We may consider $f$ as a composed function, $f=g\circ \sin$, and since the range of $\sin$ is $[-1,1]$, we may consider the problem to be asking the range of $g:[-1,1]\to\Bbb R$, where
$$
g(x)=\frac{x^2+x-1}{x^2-x+2}\,.
$$
Now the derivative of $g$ is, close as I can make it
$$
g'(x)=\frac{(x^2-x+2)(2x+1 - (x^2+x-1)(2x-1)}{\text{nonzero}}=\frac{-2x^2+6x+1}{\text{nonzero}}\,,
$$
where the roots of the top polynomial are $\frac{-6\pm\sqrt{44}}{-4}=\frac{6\pm\sqrt{44}}4$. The root $r_+=(6+\sqrt{44})/4$ is way outside
the domain of $g$, but $r_-=(6-\sqrt{44})/4\approx-.015831$ is well within that domain. Consequently, we need only evaluate $g$ at the endpoints of its domain, namely $\pm1$, and at $r_-$. We have $g(-1)=-1/4$, $g(1)=1/2$, and $g(r_-)=(3-\sqrt{44})/7\approx-0.51904$.
Thus the range of your function is $[(3-\sqrt{44})/7,1/2]$.
A: Since the whole range of $\sin x$ is [-1,1], the range of $f(x)$ is the range of $g(y)=\frac {y^2+y-1}{y^2-y+2}=1-\frac {3-2y}{y^2-y+2}$ for $y\in [-1,1].$ This is easily solved with differential calculus. As one of your tags is (algebra-precalculus), I dk whether you need a non-calculus method.
