AM-GM giving wrong result on applying to trigonometric functions Question:

Find the range of $f(x)=\operatorname{cosec} ^2x+25\sec^2x$

My attempt:
Applying AM-GM:
$$f(x) \geq 2\sqrt{\operatorname{cosec}^2x\cdot25\cdot \sec^2x}$$
$$f(x) \geq 10\cdot \left|\operatorname{cosec}x\cdot \sec x\right| = \frac{20}{\left|\sin2x\right|}\geq20$$
Hence, my answer is $[20, \infty)$
But my book used the expansion for $\operatorname{cosec}^2x$ and $\sec^2x$ and arrived at $36$ as the minimum bound. I agree with their method as well, but I don't seem to find any problem my own method as well! 
Why am I getting a different result? What did I do wrong? Hints appreciated!
UPDATE: Thanks to explanation in comments, the problem appears to be that I've got a number for the range, but I haven't proved that it is the lowest number $f(x)$ can be equal to. It is entirely possible $f(x)$ can be greater than $30$ as well. We need to prove that as well. Now, I am stuck on this part, proving that $f(x)=20$ is possible or not. It seems the issue's like using two different values of $sin(2x)=1 and 5/13$ in the same question, the former as used above and the latter used for the fact that for AM-GM to actually take the minimum value, $\operatorname{cosec} ^2x=25\sec^2x$. Can there be more clarification on this?
 A: It's obvious that the maximum does not exist.
By C-S we obtain:
$$f(x)=(\sin^2x+\cos^2x)\left(\frac{1}{\sin^2x}+\frac{25}{\cos^2x}\right)\geq(1+5)^2=36.$$
The equality occurs for $(\sin{x},\cos{x})||\left(\frac{1}{\sin{x}},\frac{5}{\cos{x}}\right)$, which says that the equality occurs.
Thus, the answer is $[36,+\infty)$.
A: Let's consider a simpler non-trigonometric problem that has the same issue as yours.
$$ f(x) = 2x^2 + (x-9)^2, \quad \min_{x\in\mathbb R} f(x) = \mathrm? $$
It should be easy to check the minimum is attained at $x=3$ with $f(x)=54$. Now let's apply AM-GM:
$$ 2x^2 + (x-9)^2 \ge 2 \sqrt{2x^2(x-9)^2} = 2\sqrt2 \left| x(x-9) \right| \ge 0. $$
The minimum is surely more than 0! The problem is that the last "≥" becomes equality when $x=0,9$, but the first "≥" becomes equality when $2x^2 = (x-9)^2$: we have chosen different $x$ in the two equalities. 

This also shows how 20 is not the strict lower-bound, because the $x$ where $\sin 2x=1$ and where $\csc^2x = 25\sec^2x$ are different.

OK so what if we consider $2x^2 = (x-9)^2$? Solving this gives $x=9(-1\pm\sqrt2)$, but then $f(x) = 972 \pm 648\sqrt2 = 1888.41, 55.5896$ which are not minimum either!

This is similar to your case: Solving $\csc^2x=25\sec^2x$ gives $x=\tan^{-1}\frac15$ where $f(x)=52$. 

The problem here is after applying AM-GM we get another function, and that function actually does not have anything to do with the minimum:


*

*You want to find a number $f_\min$ such that $f(x)\ge f_\min$ where equality is possible.

*By AM-GM we found $f(x)\ge g(x)$, and equality happens when some parts are equal.


But we cannot conclude anything about $g(x) \stackrel{?}{⪌} f_\min$. So solving the equality in the AM-GM is useless.

If we still want to use AM-GM, we need to ensure the RHS comes out as a pure number*, e.g. in your case:
\begin{align}
\csc^2 x + 25 \sec^2 x &= (\csc^2 x - 1) + 25 (\sec^2 x - 1) + 26 \\
&\ge 2 \sqrt{ (\csc^2 x - 1) \cdot 25 (\sec^2 x - 1) } + 26 \\
&= 10 \sqrt{ (\csc^2 x - 1)(\sec^2 x - 1)  } + 26 \\
&= 10 \sqrt{ \left(1 - \frac1{\sin^2 x}\right)\left(1 - \frac1{\cos^2 x}\right) } + 26 \\
&= 10 \sqrt{\frac{\sin^2x\cos^2x}{\sin^2x\cos^2x}} + 26 \\
&= \boxed{36}
\end{align}
After checking $\csc^2x - 1 = 25(\sec^2x - 1)$ is solvable ($x=\tan^{-1}\sqrt{\frac15}$), we can be sure that this is the true minimum.
(*: or at least a $g(x)$ where $g(x) = g_\min$ has the same condition of $x$ as $f(x) = f_\min$)
