<s>[INST] Least value of $a$ for which at least one solution exists? What is the least value of $a$ for which
$$\frac{4}{\sin(x)}+\frac{1}{1-\sin(x)}=a$$
has atleast one solution in the interval $(0,\frac{\pi}{2})$?
I first calculate $f'(x)$ and put it equal to $0$ to find out the critical points.
This gives
$$\sin(x)=\frac{2}{3}$$
as $\cos(x)$ is not $0$ in $(0,\frac{\pi}{2})$. I calculate $f''(x)$ and at $\sin(x)=\frac{2}{3}$, I get a minima. Now to have at least one solution, putting $\sin(x)=\frac{2}{3}$ in the main equation, I get $f=9-a$, which should be greater than or equal to $0$. I then get the 'maximum' value of $a$ as $9$.
Where did I go wrong?
[Note the function is $f(x)=LHS-RHS$ of the main equation.]
 [/INST] My Solution:: Using the Cauchy-Schwarz inequality:: $\displaystyle \frac{a^2}{x}+\frac{b^2}{y}\geq \frac{(a+b)^2}{x+y}$
and equality holds when $\displaystyle \frac{a}{x} = \frac{b}{y}.$
So here $\displaystyle \frac{2^2}{\sin x}+\frac{1^2}{1-\sin x}\geq \frac{(2+1)^2}{\sin x+1-\sin x}\Rightarrow a\geq 9$
and equality holds when $\displaystyle \frac{2}{\sin x} = \frac{1}{1-\sin x}\Rightarrow \sin x = \frac{2}{3}$
</s>