What is the minimum value of $\dfrac {9x^2\sin^2 x+4}{x\sin x}$ 
Question: What is the minimum value of $$\dfrac {9x^2\sin^2x+4}{x\sin x}\tag1$$For $0<x<\pi$.


I solved this, but somewhere, I did something wrong. My work is as follows:
First, set $y=x\sin x$. Therefore,
$$\begin{align*}\dfrac {9y^2+4}{y}=\dfrac 4y+9y\tag2\end{align*}$$
And by the AM-GM Inequality, we have$$\begin{align*}\dfrac {9y+\dfrac 4y}2 & \geq\sqrt{\dfrac 4y\cdot 9y}\tag3\\9y+\dfrac 4y & \geq12\tag4\end{align*}$$
$(4)$ is minimized only when the RHS is equal to zero. So$$9y+\dfrac 4y=0\implies 9y^2=-4\implies y^2=-\dfrac 49\tag5$$
However, if I square root both sides, I get an imaginary value. Where did I go wrong? The book says the solution is $12$ (received by plugging in $x=\dfrac 23$).
 A: Hint: you can show it as $$\frac { 9x^{ 2 }\sin ^{ 2 } x+4 }{ { x\sin  x } } =\frac { \left( 3x\sin { x } -2 \right) ^{ 2 }+12x\sin { x }  }{ x\sin  x } =\frac { \left( 3x\sin { x } -2 \right) ^{ 2 } }{ x\sin  x } +12$$ 
A: Actually, $(4)$ is minimized with the LHS is equal to $12$, since it is $\geq 12$. We get
$$9y + \dfrac{4}{y} = 12$$
is true if and only if 
$$9y^2 + 4 = 12y$$
or 
$$9y^2 - 12y + 4 = 0\text{.}$$
Apply the quadratic formula to get
$$y = \dfrac{12 \pm \sqrt{12^2-4(9)(4)}}{2(9)} = \dfrac{12 \pm \sqrt{144-144}}{18} = \dfrac{12}{18} = \dfrac{2}{3}\text{.}$$
A: What you did wrong is that you get AM=GM when all term are equal and not when $9y+\frac{4}{y}=0$. 
Then you get $12$ as a minimum when 
$$9y=\frac{4}{y}\rightarrow y=\pm \frac{2}{3}$$
but $y \ge 0$ then $y=2/3$.
A: You already noted that
$$9y + \frac{4}{y} \geq 12$$ 
so if the LHS were exactly $12$, it would certainly be minimal!
If equality is to be attained, you have
$$9y + \frac{4}{y} - 12 = 0,$$
multiplying by $y$ gives
$$9y^2 - 12y + 4 = (3y - 2)^2 = 0$$
Hence $y = 2/3$.
