# Find the minimum for a trigonometric function

Find the local minimum of the following function: $$\tan\left(x+\frac{2\pi}{3}\right)-\tan\left(x+\frac{\pi}{6}\right)+\cos\left(x+\frac{\pi}{6}\right)$$

I am wondering how can I simply this function..

-
If you put $y=x+\frac{\pi}6$ then you get $\cos y-(\tan y-\frac1{\tan y})$. – Martin Sleziak Apr 24 '11 at 7:19
Sorry, I should have written $\cos y-\tan y-\frac1{\tan y}$ or $\cos y-(\tan y+\frac1{\tan y})$. – Martin Sleziak Apr 24 '11 at 8:05
This yields $f'(y)=\frac{\cos^2y-\sin^2y}{\cos^2y\sin^2y}-\sin y$; however I do not know how to solve $f'(y)=0$. (It leads to an equation of 5th degree.) – Martin Sleziak Apr 24 '11 at 21:38
sorry, this is a high school question, and derivative may not be used for the purpose. Is there any simpler way to write -cot y-tan y+cos y – Julie Apr 25 '11 at 2:47
You can rewrite it just using sines and cosines as $\cos y - \frac1{\cos y\sin y}$ but I do not see anyway getting the minima from this. wolframalpha.com/input/?i=cos%28x%29-tan%28x%29-cot%28x%29 – Martin Sleziak Apr 25 '11 at 5:56

I would go at this brute force. Following @Martin's plot, minima occur near $3\pi/4 + n\pi$ with $n$ being an integer. Take your function $f(y) = \cos y - \tan y - \cot y$ and expand it with a Taylor series at these values; $$f({3\pi\over 4}+z) = f({3\pi\over 4}) + f'({3\pi\over 4})z + f''({3\pi\over 4}){z^2\over 2} ..$$ Solve for $z$ such that the derivative of this function is zero, giving you a minimum at $$z = -{f'(3\pi/4) \over f''(3\pi/4)}.$$ This gives you to first order the location of the minimum. The value of the function at the minimum can then be found by plugging back into the function.

This gives you an approximate solution. You can improve the order of the approximation if you like.

-