If the equation $\sin^2x-a\sin x+b=0$ has only one solution in $(0,\pi)$, then what is the range of $b$? 
If the equation $\sin^2(x)-a\sin(x)+b=0$ has only one solution in $(0,\pi)$, then what is the range of $b$?

What I try:
$$\displaystyle \sin x=\frac{a\pm \sqrt{a^2-4b}}{2}\in\bigg(0,1\bigg)$$
for one  real solution $a^2=4b$.
How do I solve it?

To $x$ to have only one solution in the range $(0,\pi)$, then $x$ must be $\pi\over 2$, according to the unit circle for trigonometry.
Since, $\sin{\frac{\pi}{2}} = 1$,
$$\sin^2 x - a\sin x +b = 1-a+b =0$$
$$\implies a-b=1 \to\text{eq.1} $$
From what you have tried we get,
$$a^2 =4b \to \text{eq.2} $$
Thus, to satisfy eqs. 1&2 is,
From eq.1 , we get, 
$$a=1+b$$
Subtituting into eq.2,
$$(1+b)^2=4b$$
$$1+2b+b^2=4b$$
$$(b-1)^2=0$$
$$\therefore b=1$$
and $a=2$
