<s>[INST] I would like to calculate $\lim_{x \to \frac{\pi}{6}} \frac{2 \sin^2{x}+\sin{x}-1}{2 \sin^2{x}-3 \sin{x}+1}$ I want to calculate the following limit: $$\lim_{x \to \frac{\pi}{6}} \frac{2 \sin^2{x}+\sin{x}-1}{2 \sin^2{x}-3 \sin{x}+1}$$
or prove that it does not exist. Now I know the result is $-3$, but I am having trouble getting to it. Any ideas would be greatly appreciated.
 [/INST] You may just observe that, $\color{#3366cc}{\sin (\pi/6) =1/2}$ and that, as $x \to \pi/6$,
$$
\require{cancel}
\frac{2 \sin^2{x}+\sin{x}-1}{2 \sin^2{x}-3 \sin{x}+1}=\frac{\cancel{\color{#3366cc}{(2 \sin{x}-1)}}(\sin{x}+1)}{\cancel{\color{#3366cc}{(2 \sin{x}-1)}}(\sin{x}-1)}=\frac{\sin{x}+1}{\sin{x}-1} \color{#cc0066}{\longrightarrow} \frac{1/2+1}{1/2-1}=\color{#3366cc}{-3}
$$

Some details. One has
$$
\begin{align}
 2u^2+u-1 &=2\left(u^2+\frac{u}2-\frac12 \right) \\
 & =  2\left[\left(u +\frac14\right)^2-\frac1{16}-\frac12 \right] \\
 & =  2\left[\left(u +\frac14\right)^2-\frac9{16}\right] \\ 
 & =  2\left[\left(u +\frac14-\frac34\right)\left(u +\frac14+\frac34\right)\right] \\ 
 & =  2\left[\left(u -\frac12\right)\left(u +1\right)\right] \\ 
 & =  \left(2u -1\right)\left(u +1\right) 
\end{align}
$$ giving, with $u:=\sin x$,

$$
2 \sin^2{x}+\sin{x}-1=\color{#3366cc}{(2 \sin{x}-1)}\left(\sin x +1\right).
$$ 

Similarly,

$$
2 \sin^2{x}-3\sin{x}+1=\color{#3366cc}{(2 \sin{x}-1)}\left(\sin x -1\right).
$$

</s>