# Find the minimum and maximum values of $1/(\cos x + \sin x )$

The question states find the maximum and minimum values of $$1/(\cos x + \sin x)$$ and I turned it into $$1/(\sqrt{2} \sin(x+pi/4))$$ and my answers are $$1/\sqrt{2}$$ for the maximum and $$-1/\sqrt{2}$$ minimum but the answer is $$1/\sqrt{2}$$ for the minimum and $$-1/\sqrt{2}$$ for the maximum.

Thanks

• Yes, the local minima might all be bigger than the local maxima! Look at the graph of $1/\cos x$. The present function is rather similar. – Lord Shark the Unknown Apr 27 '19 at 16:53
• @LordSharktheUnknown is there a difference between the local minimum and the minimum value? – user639649 Apr 27 '19 at 16:57
• $cosx+sinx=0$ for $x=-\frac{\pi}{4}$ or $x=\frac{3\pi}{4}$.so min and max of $\frac{1}{cosx+sinx}$ are $\pm \infty$. – herb steinberg Apr 27 '19 at 16:59
• @user639649 Yes, your function does not have a minimum value. Look at the graph and you will see that all of the local minima are larger than the local maxima. – kccu Apr 27 '19 at 16:59
• We can use math.stackexchange.com/questions/2150994/… to validate it. The reason is the function is not continuous everywhere. See math.stackexchange.com/questions/1727241/… – lab bhattacharjee Apr 27 '19 at 17:00

Hint: Let $$f(x)=\frac{1}{\sin(x)+\cos(x)}$$ then $$f'(x)=-{\frac {\cos \left( x \right) -\sin \left( x \right) }{ \left( \sin \left( x \right) +\cos \left( x \right) \right) ^{2}}}$$
• You must only solve the equation $$f'(x)=0$$ – Dr. Sonnhard Graubner Apr 27 '19 at 17:03
Hint: $$\sin x + \cos x = \sqrt{2}\sin(x+\pi/4)$$. What is the maximal value of this expression? What is the maximal value of this expression? What happens if we invert these extremal values? What happens with the inverse if this value is $$0$$?
• If the sum is equal to $0$ we get a singularity. Hence, the function grows unbounded. Note that we are talking about local extrema. The function is unbounded in both directions. The square root of 2 was a local maximum but we have to invert it and it will become the minimum. Similarly, we had $-\sqrt{2}$ as a minimum which will become a local maximum after inverting. – MachineLearner Apr 27 '19 at 17:12