Minimum of $\left(\frac{1+\sin^2x}{\sin^2x}\right)^n+\left(\frac{1+\cos^2x}{\cos^2x}\right)^n$ 
I would like to find the minimum of
$$f(x)=\left(\frac{1+\sin^2x}{\sin^2x}\right)^n+\left(\frac{1+\cos^2x}{\cos^2x}\right)^n,$$
where $n$ is a natural number.

I know there is possible by derivate, but
$$f'(x)=n \left(\left(\cos ^2(x)+1\right) \sec ^2(x)\right)^{n-1} \left(2 \left(\cos ^2(x)+1\right)\tan (x) \sec ^2(x)-2 \tan (x)\right)+n \left(\left(\sin ^2(x)+1\right) \csc^2(x)\right)^{n-1} \left(2 \cot (x)-2 \left(\sin ^2(x)+1\right) \cot (x) \csc^2(x)\right).$$
I think this is not the best way.

Using A.M $\geq G.M.$ on the first and second inequalities yields
$$
\begin{aligned}
f(x) &=\left(\csc ^{2} x+1\right)^{n}+\left(\sec ^{2} x+1\right)^{n} \\
& \geqslant 2 \sqrt{\left[\left(\csc ^{2} x+1\right)\left(\sec ^{2} x+1\right)\right]^{n}} \\
&=2\left[\left(2+\cot ^{2} x\right)\left(2+\tan ^{2} x\right)\right]^{\frac{n}{2}} \\
&=2\left(4+2 \cot ^{2} x+2 \tan ^{2} x+1\right)^{\frac{n}{2}} \\
& \geqslant 2\left(4+2 \cdot 2 \sqrt{\cot ^{2} x \tan ^{2} x}+1\right)^{\frac{n}{2}} \\
&=2\cdot 9^{\frac{n}{2}} \\
&=2\cdot 3^{n}
\end{aligned}
$$
$\therefore f(x)$ attains its minimum value $2 \cdot 3^{n}$ when $$\cot ^{2} x=\tan ^{2} x \textrm{ and } \csc^2 x=sec^2 x\Leftrightarrow x=\pm \frac{\pi}{4}.$$
