Here's another hint: Pick some number ##\alpha##, multiply ##S## by ##sin(\alpha)##, and then use the fact that ##sin(\alpha)cos(\beta) = \frac{1}{2} (sin(\alpha + \beta) + sin(\alpha - \beta))##. If you pick ##\alpha## cleverly, you get some amazing cancellations to get a very simple result.