doubt in Solving an inequality I took upon following question-
Find the values of $m$ for which given equation has real roots
$\sin^2 x-(m-3)\sin x+m=0 $
So I started by first satisfying $ D>=0$ and found that $m$ should range from $(-\infty,1] \cup [9,\infty)$
However after this, I found roots by quadratic formula as
$\sin x = (m-3)/2 \pm \sqrt{(m-1)(m-9)/4}$
However this value should be within range of sin function and I'm unable to solve the inequality so formed for values of $m$.
How to solve the inequality( actually the $\pm$ term is confusing me)?
 A: When $m=1$, both roots of the quadratic are $-1$ so a solution for $x$ exists. When $m\in(-\infty,1)$, the smaller root $r_1=(m-3)/2-\frac12\sqrt{(m-1)(m-9)}<-1$ as $(m-3)/2<-1$. So we should enforce that the larger root $r_2=(m-3)/2+\frac12\sqrt{(m-1)(m-9)}\in[-1,1]$, i.e.$$\begin{align*}&-1\le(m-3)/2+\frac12\sqrt{(1-m)(9-m)}\le1\\&
\iff1-m\le\sqrt{(1-m)(9-m)}\le5-m\end{align*}$$Note that the first inequality is always true since $9-m\ge1-m\ge0$ and hence $(1-m)(9-m)\ge(1-m)^2$. The second inequality on squaring gives$$m^2-10m+9\le m^2+25-10m$$which is true. So all values of $m\le1$ will work.

When $m\ge9$, the larger root $r_2\ge3$. So we must enforce $-1\le r_1\le 1$, i.e. $$\begin{align*}&-1\le(m-3)/2-\frac12\sqrt{(m-1)(m-9)}\le1\\&
\iff1-m\le-\sqrt{(m-1)(m-9)}\le5-m\\&
\iff m-5\le\sqrt{(m-1)(m-9)}\le m-1
\end{align*}$$
Correspondingly note that the second inequality is always true this time around. Squaring the first inequality would yield $25\le9$, which is never true. So no $m\ge9$ works.
Our final answer is $m\le1.~\blacksquare$
