# minimum value of $a/\sin x+b/\cos x$ [closed]

How do I find the minimum value of $$a/\sin x+b/\cos x$$?

I tried using AM>GM and I am getting a value of $$\sqrt{8ab}$$ at $$x=\pi/4$$.

That works for some values of $$a$$ and $$b$$, but I observed errors for other values on WolframAlpha.

$$a$$ and $$b$$ are constants and $$x$$ is a variable.

• Which parameters are constant and which are variable (a,b,x)? Commented Nov 5, 2021 at 3:39
• The expression is unbounded both below and above as a function of $x$, unless there are additional constraints that you forgot to mention.
– dxiv
Commented Nov 5, 2021 at 3:40
• $\pi/4$ is a local minima in $(0,\pi/2)$, if that helps. Commented Nov 5, 2021 at 3:51
• Set the derivative to 0.
– Eric
Commented Nov 5, 2021 at 3:58
• The solution in the accepted answer does not exist if $b=0$, is never an actual (global) minimum, and is not even a local minimum if $a=b=-1$ for example. If this is the answer you were looking for (since you accepted it), then the question is missing essential information. Voting to close for lack of clarity.
– dxiv
Commented Nov 5, 2021 at 5:25

Suppose for simplicity that $$b\gt 0$$. When $$x$$ approaches $$\pi/2$$ on the left your expression approaches $$-\infty$$. So the infimum is $$-\infty$$.

According to fermat's principle of stationary points, to find a minimum point if any function set it's derivative to $$0$$. Let, $$f(x)=\frac{a}{\sin(x)}+\frac{b}{\cos(x)}$$ Consider it's derivative, $$f'(x)=\frac{-a\cos(x)}{sin^{2}(x)}+\frac{b\sin(x)}{cos^{2}(x)}$$ Set it equal to $$0$$, $$f'(x)=\frac{-a\cos(x)}{sin^{2}(x)}+\frac{b\sin(x)}{cos^{2}(x)}=0$$ $$\frac{a\cos(x)}{sin^{2}(x)}=\frac{b\sin(x)}{cos^{2}(x)}$$ Simplification leads to, $$\tan^{3}(x)=\frac{a}{b}$$ $$\tan(x)=\sqrt[3]{\frac{a}{b}}$$ $$x=arctan(\sqrt[3]{\frac{a}{b}})$$ So it's the minimum point. It depends on constants $$a,b$$. For example if we let, $$a=b=1$$ then $$x=\frac{\pi}{4}$$

• Not by $x$ but by $\ x$ with a space. Commented Nov 5, 2021 at 4:28
• The Fermat principle works for bounded functions. This one is not bounded. Commented Nov 5, 2021 at 4:31
• @markvs, I am not sure about it ,but theorem of stationary points was proved in Wikipedia article without considering the condition you mentioned. Commented Nov 5, 2021 at 4:37
• @RAHUL: See my answer here. You are finding local extreme points (which may not be even minimal but maximal) and may be not global which is the case here. Commented Nov 5, 2021 at 4:44
• @RAHUL: In fact what you find may be neither a max nor a min but an inflection point. Like the zero of $x^3$. Commented Nov 5, 2021 at 4:53