# Find the minimum of $\frac{\sin x}{\cos y}+\frac {\cos x}{\sin y}+\frac{\sin y}{\cos x}+\frac{\cos y}{\sin x}$

Let $$0 such that $$\sin (x+y)=\frac 23$$, then find the minimum of

$$\frac{\sin x}{\cos y}+\frac {\cos x}{\sin y}+\frac{\sin y}{\cos x}+\frac{\cos y}{\sin x}$$

A) $$\frac 23$$

B) $$\frac 43$$

C) $$\frac 89$$

D) $$\frac {16}{9}$$

E) $$\frac{32}{27}$$

My attempts:

I think that the all possible answers are wrong. Because, by Am-Gm inequality we have

$$\frac{\sin x}{\cos y}+\frac{\cos y}{\sin x}+\frac {\cos x}{\sin y}+\frac{\sin y}{\cos x}≥2+2=4.$$

But, Wolfram Alpha gives us a different result : The Global Minimum doesn't exist. However, ​the local minimum must be $$6.$$

But, still the problem is not solved. Because Wolfram's graph shows that the minimum can be less than $$6$$.

I also tried

Let $$\sin x=a,\cos y=b,\cos x=c,\sin y=d$$ with

$$ab+cd=\frac 23≥2\sqrt{abcd}\implies abcd≤\frac 19\\ a^2+c^2=b^2+d^2=1$$

then I need

$$\min \left(\frac ab+\frac ba+\frac cd+\frac dc\right)$$

But, I can't do anything from here. Finally, I attach the graph drawn by WA. • $$\frac{\sin x}{\cos y}+\frac{\cos y}{\sin x}+\frac {\cos x}{\sin y}+\frac{\sin y}{\cos x}+≥2+2=4$$ This is quite a nontrivial claim. Why is this true? Nov 30, 2021 at 9:32
• @EeveeTrainer By Am-Gm $a+\frac 1a+b+\frac 1b≥2+2=4$ Nov 30, 2021 at 9:34
• @AndreasLenz We have that $x,y \in (0,\pi/2)$ though. Nov 30, 2021 at 9:38
• @AndreasLenz, we're in the first quadrant. Nov 30, 2021 at 9:38
• Sadly, I don't, and I probably wouldn't know how to use them well. Also, ignore my previous comment, I forgot the constraint $\sin(x+y) = 2/3$. Graphing that as well, we have this graph (for the original function set equal to $5.9$). Based on this and how the graph behaves for nearby values of $c$ (even for $c=5.9999$ the red and green lines don't cross), I think $6$ is the global minimum. Nov 30, 2021 at 9:58

Simplifying gives: $$\frac{\sin x}{\cos y}+\frac {\cos x}{\sin y}+\frac{\sin y}{\cos x}+\frac{\cos y}{\sin x}=\frac{\sin^2 x+\cos^2y}{\sin x\cos y}+\frac {\cos^2 x+\sin^2y}{\sin y\cos x}=\frac{\sin(x+y)\sin(x-y)+1}{\sin x\cos y}+\frac {1-\sin(x+y)\sin(x-y)}{\sin y\cos x}=\frac {8}{3\sin2x\sin 2y}+\frac{2\sin (x-y)}{3}\left(\frac{1}{\sin x\cos y}-\frac{1}{\sin y\cos x}\right)=\frac {8}{3\sin2x\sin 2y}-\frac 83\frac{\sin^2(x-y)}{\sin2x\sin 2y}=\frac{8\cos^2(x-y)}{3\sin 2x\sin2y}=\frac{16\cos^2(x-y)}{3(\cos 2(x-y)-\cos 2(x+y))}=\frac{16}{3(2-10/9\sec^2(x-y))}$$

The denominator is maximum when $$\sec^2(x-y)$$ is minimum, which happens when $$x=y$$, in which case the quantity has value $$6$$. So the required global minimum should be $$6$$.

Edit: The edit shows that the given expression (let's call it $$f(x,y)$$ for brevity) can't take any value smaller than $$6$$. To see that, let's first note (Refer Note) that $$\color{blue}{ 2-\frac {10}9\sec^2(x-y)\gt 0 \text{ for all } (x,y)\in (0,\frac \pi 2)\times (0,\frac \pi 2)}$$.

Suppose on the contrary that there exist some $$a$$ and $$b$$ in $$(0,\frac \pi 2)$$ such that $$f(a,b)<6$$. It follows that $$\frac{16}{3(2-10/9\sec^2(x-y))}\lt 6\implies 8<18-10\sec^2(x-y)\implies \sec^2(x-y)\lt 1$$ and this is a contradiction. So the assumption that $$f$$ takes any value less than $$6$$ is wrong. Hence global minimum value of $$f$$ under the given conditions is $$6$$.

Note: If $$\sec^2(x-y)\ge \frac{18}{10}$$ then $$\cos^2(x-y)\le \frac {10}{18}\implies 0\lt \cos (x-y)\le \sqrt {\frac{10}{18}}$$ (because $$x-y \in (-\frac \pi 2, \frac \pi 2)$$ so $$\cos$$ is +ve) so let's consider two cases: 1) $$0\le x-y)\lt \frac \pi 2 \text{ and } 2) -\frac \pi 2\lt x-y \lt 0$$.

Case 1: it follows that $$x-y\ge \arccos\sqrt {\frac{10}{18}}$$ (noting that $$\cos$$ is decreasing on $$[0,\pi/2))$$. Given that $$x+y=\arcsin \frac 23$$, it follows that $$y\le 0$$ which is not possible.

Case 2: it follows that $$x-y\le -\arccos\sqrt {\frac{10}{18}}$$ (noting that $$\cos$$ is increasing on $$(-\frac \pi 2, 0))$$. Then proceeding as in case 1) results in a contradiction.

This establishes the blue colored part.

• @I'mastudent: I have used inverse trigonometric functions in cases 1) and 2) and the fact that cos is decreasing on $[0,\frac \pi 2]$ and increasing on $(-\frac \pi 2, 0)$. Is something unclear to you?
– Koro
Nov 30, 2021 at 13:59
• I want to wrote directly $\frac{16}{3(2-10/9\sec^2(x-y))}≥\frac{16}{3(2-10/9)}=6.$ is it okay? Nov 30, 2021 at 14:20
• @I'mastudent: That's perfect, yes! That also avoids "Edit" and "Note" in the answer completely.
– Koro
Nov 30, 2021 at 14:23
• I would love for your answer to be a truly pedagogical one. For example, how you did the steps and etc. You suddenly wrote $\sin^2x+\cos^2y=1+\sin(x+y)\sin(x-y)$ and I just proved it. But how did you come to this conclusion directly? Have you experienced this formula before? In other lines, you suddenly took the trigonometric expression out of the parentheses. Honestly, I wanted to understand what was going on, but I couldn't. Dec 1, 2021 at 11:07
• @I'mastudent: At the time of writing the answer, I had the identity $\sin ^2 x-\sin^2y=\sin (x+y)\sin(x-y)$ in mind and tried to cast the given expression in a form wherein I can apply that identity. I skipped intermediary steps like $\sin^2x+\color{blue}{\cos^2y}=\sin^2x+\color{blue}{(1-\sin^2y)}$ etc. I felt that analysing $\frac{8\cos^2(x-y)}{3\sin 2x\sin2y}$ as it is, would be difficult due to $3$ variable terms present in it. (Contd.)
– Koro
Dec 1, 2021 at 11:34

Let $$t:=x-y$$ and $$u:=x+y$$. We have

$$\frac{\sin x}{\cos y}+\frac {\cos x}{\sin y}+\frac{\sin y}{\cos x}+\frac{\cos y}{\sin x}=2\cos(t)(\csc(2y)+\csc(2x))=\frac{4\sin(u)\cos^2(t)}{\cos^2(t)-\cos^2(u)}.$$ As $$u$$ is known to be constant, we have a univariate function in $$t$$. It has a stationary point at $$t=0$$, giving

$$\sin(x+y)=\sin(2x)=\frac23$$ and

$$2\tan(2x)+2\cot(2x)=6.$$

You are correct. Let $$f(x,y) = g + \frac{1}{g} + h + \frac{1}{h}$$ where $$g(x,y) = \frac{\sin x}{\cos y}, \quad h(x,y) = \frac{\cos x}{\sin y}.$$ Then since $$0 \le x, y \le \pi/2$$, we must have $$0 \le \sin x, \cos x, \sin y, \cos y \ge 1$$, hence $$g, h \ge 0$$. Then AM-GM proves $$g + 1/g \ge 2$$, as well as $$h + 1/h \ge 2$$, thus $$f \ge 4$$, and this is without the added constraint $$\sin (x+y) = \frac{2}{3}$$. None of the answer choices is greater than $$4$$, so all are incorrect.

But also be advised that Wolfram Alpha is also misleading, because we have established that it is impossible for $$f$$ to be negative. Thus there must be a lower bound.

The actual minimum is $$6$$. To see this, let $$c_1 = \arcsin \frac{2}{3} \approx 0.729728$$, and $$c_2 = \pi - c_1 \approx 2.41186$$. These comprise the two possible values for $$x + y$$ in the square $$[0,\pi/2]^2$$. Then the transformation $$u = x+y$$, $$v = x-y$$ gives $$f = 8\frac{\sin u \cos^2 v}{\cos 2v - \cos 2u} = 4 \frac{\sin u \cos^2 v}{ \cos^2 v + \sin^2 u - 1}$$ Then since $$\sin u = 2/3$$, $$f = \frac{24\cos^2 v}{-5 + 9 \cos^2 v} = \frac{8}{3} + \frac{\frac{40}{27}}{t - \frac{5}{9}}$$ where $$t = \cos^2 v$$. Consider the range of $$t$$. Since $$x + y \in \{c_1, c_2\}$$ and $$0 \le x, y \le \pi/2$$, it follows that $$0 \le |x-y| \le c_1$$, and in turn, $$\frac{5}{9} \le t \le 1.$$ As $$f$$ is obviously a decreasing function of $$t$$ on this interval, the minimum is attained when $$t$$ is as large as possible, namely $$t = 1$$, corresponding to $$v = 0$$, or $$x = y \in \{c_1/2, c_2/2\}$$, and $$f = \frac{8}{3} + \frac{40/27}{4/9} = 6.$$

Here is a plot of $$f(x,y)$$ and the two curves for which $$\sin (x+y) = \frac{2}{3}$$. As you can see, they do have a global minimum, and as $$f$$ is never negative, neither are the curves. • +1 Thank you very much. But, Unfortunately I can not understand, meaning of "global minimum doesn't exist, only local minimum exist.Does this mean, expression can be less than $6$?In WA graph I see colored spots when "expression<6. But, why?... Nov 30, 2021 at 11:01
• @I'mastudent No, the WA graph is wrong. That's what I'm trying to show you. Sometimes, WA will produce incorrect results, either because it doesn't interpret your input in the way you want, or because there is a bug. Nov 30, 2021 at 11:08
• Thank you again. I tried the same input for "expression<4", but I did not see any colored spots. So, I confused. Nov 30, 2021 at 11:13
• @I'mastudent Can you provide a link to the input you sent to WA? That way, I might be able to better determine what is happening. Nov 30, 2021 at 11:23
• @Koro Your example is impossible. If $\sec(x-y) = 100$, then you cannot also have $\sin (x+y) = 2/3$ in the square $[0,\pi/2]^2$. Nov 30, 2021 at 11:47