How to find the minimum of $f(x)=(\sin(x)+\cos(x)+\tan(x)+\cot(x)+\sec(x)+\csc(x))^2$?

I need to find the minimum of $f(x)$ with $$f(x)=(\sin(x)+\cos(x)+\tan(x)+\cot(x)+\sec(x)+\csc(x))^2$$ Could you help me with some clues?


You can do the following:

Let $$\sin x + \cos x = y$$

Then we have that $$\tan x + \cot x = \frac{2}{y^2 -1}$$

and

$$\sec x + \csc x = \frac{2y}{y^2-1}$$

I believe $$\sin x + \cos x + \tan x + \cot x + \sec x + \csc x $$ simplifies to $$y + \frac{2}{y-1}$$ (but I tried doing it in my head, so might have made mistakes).

And you can use the standard calculus techniques, now. (but take care to eliminate the corner cases etc).