Maxima & Minima  
Hi, how do I find the minimum value of f(x) = (4sin²x + 9cosec²x) using the concepts of maxima and minima? First I used the AM-GM inequality, I got 12, which is the right answer if we take a look at the graph of the function. Then I tried using the concepts of maxima/minima (which is supposed to work too). 
If I differentiate it once and set it equal to zero, it gives me x = (2n+1)π/2, i.e odd multiples of π/2 (check out the attachment). Now if we put x = π/2, 3π/2, 5π/2, etc into the function, it gives me 13 as the answer, which is wrong. It's minimum value is 12. Where did it go wrong? Because concepts of maxima and minima should get us to the correct answer? 
Thanks 
 A: Using AM-GM inequality,
$$4\sin^2 x + 9 cosec^2 x \ge 2 \sqrt{4\cdot 9}=12$$
However, the equality only holds when $$4 \sin^2 x = 9 cosec^2 x$$ $$\sin^4 x = \frac94$$which is not attainable.
Desmos link here for the graph.

A: Solution
\begin{align*}4\sin^2 x + 9 \csc^2 x&=4\sin^2 x + \frac{9}{ \sin^2 x}\\&=\left(4\sin^2+ \frac{4}{ \sin^2 x}\right)+\frac{5}{\sin^2 x}\\&\geq 2\sqrt{4\sin^2 x\cdot\frac{4}{\sin^2 x}}+5\\&=2\cdot 4+5\\&=13,\end{align*}with the equality holding if and only if $\sin^2 x=1$, namely, $x=2k\pi\pm \dfrac{\pi}{2}$ where $k \in \mathbb{Z}.$
A: Writing $\sin^2x=t^2$ for $t\in[0,1]$, we want to know when $g(t)=4t^2+\frac9{t^2}$ becomes minimal. We have $4t^2+\frac9{t^2} = (\frac3t-2t)^2+12$. Dropping the square gives you the 12. However, $\frac3t-2t\ge 1$ for $0< t\le 1$ and so the function must be at least 13, attained whenever $\sin^2x=1$.
A: As noted we can't apply AM-GM inequality but we can refer to Rearrangement inequality selecting


*

*$(a_1,a_2)=\left(\sin^2 x,\frac94 \right)$

*$(b_1,b_2)=\left(4,\frac{4}{\sin^2 x}\right)$


we have
$$4\sin^2 x + \frac{9}{ \sin^2 x}=4\cdot \sin^2 x + \frac 94\cdot\frac{4}{ \sin^2 x}=$$
$$=a_1b_1+a_2b_2\ge a_1b_2+a_2b_1=\sin^2\cdot  \frac{4}{ \sin^2 x}+ \frac 94\cdot4=13$$
