I recently came across a question where the minimum value of the expression $\sin^2 (x) + 4 \csc^2 (x)$ was to be found.
Initially, I tried applying the AM-GM inequality and got the answer as $4$. However, I soon realised that for this to be true, $\sin x = \sqrt{2}$ (the numbers on which the AM-GM inequality is applied must be equal),which is not possible.
I differentiated the equation and still got the same answer.
However, the answer is given as $5$.
Can anyone please help with this question as well as my general doubt about differentiation.
P.S: I'm in eleventh grade so I do not know any advanced math.
Edit: After searching on the internet, I found out that $\sin x$ can be greater than one for complex inputs. So is the minimum value of 4 taking into account the complex inputs? And how do we find the minimum value for real inputs?
Let $u=|\sin x|$, so that $0 \le u\le 1$, and you want the minimum of $u^2+\dfrac{4}{u^2} = \Big(\dfrac{2}{u}-u\Big)^2+4$. To minimise this, you want the least value of $\dfrac{2}{u}-u$ (which is definitely positive), so the greatest value of $u$, which is $1$, giving the minimum value of the expression as $5$. To see why the differentiation method fails, look at a graph of $u^2+\dfrac{4}{u^2}$ (e.g. on Desmos): you will see the minimum turning point at $u=\sqrt{2}$, but also the the minimum in the range $0 \le u\le 1$, which does not include that turning point. In general, for reasonably nice functions, the extrema are at turning points. or at end points of their domain of definition.