Finding range of $$f(x)=\frac{\sin^2 x+4\sin x+5}{2\sin^2 x+8\sin x+8}$$
Try: put $\sin x=t$ and $-1\leq t\leq 1$
So $$y=\frac{t^2+4t+5}{2t^2+8t+8}$$
$$2yt^2+8yt+8y=t^2+4t+5$$
$$(2y-1)t^2+4(2y-1)t+(8y-5)=0$$
For real roots $D\geq 0$
So $$16(2y-1)^2-4(2y-1)(8y-5)\geq 0$$
$$4(2y-1)^2-(2y-1)(8y-5)\geq 0$$
$y\geq 0.5$
Could some help me where I have wrong, thanks
Hint: Use $$\sin^2 x +4\sin x+5 = (\sin x +2)^2 +1$$ and $$2\sin^2 x +8 \sin x +8 = 2\left(\sin x + 2 \right)^2.$$
Also, break the fraction into two pieces
$$\dfrac{(\sin x +2)^2 +1}{2\left(\sin x + 2 \right)^2}=\dfrac{1}{2}+\dfrac{1}{2}\dfrac{1}{\left(\sin x + 2 \right)^2}$$