If $\frac{\cos x}{\cos y}+\frac{\sin x}{\sin y}=-1$, then what's the value of $4\left(\frac{\cos^3y}{\cos x}+\frac{\sin^3y}{\sin x}\right)$? I was trying to solve this problem:

If 
  $$\frac{\cos x}{\cos y}+\frac{\sin x}{\sin y}=-1$$ 
  then what is the value of 
  $$S=4\left(\frac{\cos^3y}{\cos x}+\frac{\sin^3y}{\sin x}\right)$$

I tried to solve this problem using a change of variables
$\cos^3y=a\cos x$ and $\sin^3y=b \sin x$.
So: 
$$\frac{S}{4}=a+b$$
$$\frac{\cos^6y}{a^2}+\frac{\sin^6y}{b^2}=1$$
and 
$$\frac{\cos^2y}{a} + \frac{\sin^2y}{b}=-1$$
I tried to manipulate these equations, but it gives no result 
 A: I don't know if this helps, but this is what I've discovered so far
The first equation can be written as
$$\cos x \sin y + \sin x \cos y = -\cos y \sin y$$
or using the double angle formula
$$\sin (x+y) = -\cos y \sin y$$
By the triple angle formulas for sine and cosine, we have that 
$$\sin^3(y)=\frac{3\sin(y)-\sin(3y)}{4}, \, \cos^3(y) = \frac{3\cos(y) + \cos(3y)}{4}$$
Plugging this in and simplifying the fractions, we get
$$S=\frac{3\cos(y)\sin(x) + \cos(3y)\sin(x) +3\sin(y)\cos (x)-\sin(3y)\cos(x)}{\cos x \sin x}$$
Rearranged, this is
$$S=\frac{3\cos(y)\sin(x) +3\sin(y)\cos (x) + \cos(3y)\sin(x) -\sin(3y)\cos(x)}{\cos x \sin x}$$
And using the sum and difference of angle formulas for sine, we get
$$S=\frac{3\sin(x+y) + \sin(x-3y)}{\cos x \sin x}$$
EDIT: Using the graphing software desmos and plugging in test values for $x,y$ that satisfy the first equation, we get $\fbox{4 }$. I guess I'll leave it up to someone smarter to prove why is works, instead of just showing that it does.

A: http://comentario.fariasbrito.com.br/vest/index.php?vid=68 There you go (it's the seventh question).
It's a pretty interesting problem, but I think when you're searching problems from IME or ITA, you should first check the sites of courses that are about them if the problems aren't from before 2000 (like the one I sent and Poliedro).
@edit: A person told me that I should outline the solution here, so here I go:
$$S = \frac{(3\sin (x+y) + \sin(x-3y))}{\sin x \cos x}$$
(as found by D.R.)
Then defining $a = 3\sin (x+y) + \sin(x-3y)$, $b = \sin x \cos x$ and seeing that $\frac{\cos x}{\cos y} + \frac{\sin x}{\sin y} = -1 \Rightarrow \sin y \cdot \cos x + \sin x \cdot \cos y = -\sin y \cdot \cos y \Rightarrow 2\sin(x+y) +\sin 2y = 0 = c$ we get:
$$S = \frac ab$$
$$a-4b-2c = a-4b = 3\sin (x+y) + \sin(x-3y) - 2\sin 2x - 4\sin (x+y) - 2\sin2y = -\sin (x+y) + \sin(x-3y) - 2\sin 2x - 2\sin2y = 2\sin (-2y)\cdot \cos (x-y) - 2\cdot 2\sin (x+y) \cdot \cos(x-y)$$
Since $2\sin(x+y) = -\sin 2y$ we get:
$$a - 4b = -2\sin 2y \cdot \cos (x-y) + 2\sin 2y \cdot \cos (x-y) = 0 \Rightarrow a = 4b$$
Thus: $$S = \frac {4b}{b} \Rightarrow S = 4$$
In the link there's another solution that is bigger, but I think it should be more acessible to people that don't want the trick of using $a, b$ and $c$.
