# Rearranging equations with sine

I am working on a program which will predict the tides, but have come across a problem when using the simplified harmonic method of tidal prediction, I understand the whole thing but cannot do the following, this is what I have so far:

$$R\sin(r) = H\sin(\theta)$$

$$R\cos(r) = H\cos(\theta)$$

How do I obtain the values of just R and r alone?

EDIT 2! it is slightly more complex than first explained, this is more like what I am trying to work with:

$$R\sin(r) = A\sin(Y) + B\sin(Z)$$

$$R\cos(r) = A\cos(Y) + B\cos(Z)$$

Thanks.

-
Trivially, $r = \theta + 2\pi k$ (for all $k \in \mathbb Z$) and $R = H$ (other solutions may exist as well)... – Argon Oct 22 '12 at 21:55
And I was reading the title thinking "I've never heard of sine factorial before". – SiliconCelery Oct 22 '12 at 21:56
Haha, I have now edited the title! – Paul Reed Oct 22 '12 at 22:14
@Paul Reed: What is the difference? denote $H=A+B$... – Dennis Gulko Oct 22 '12 at 22:15
Final question update! The angles were not the same, there are two angles used, Y and Z. – Paul Reed Oct 22 '12 at 22:47

You know that $\sin^2\theta+\cos^2\theta=1$. Hence, by squaring both equations and adding you have: $$R^2=R^2(\sin^2r+\cos^2r)=H^2(\sin^2\theta+\cos^2\theta)=H^2$$ Hence $R=\pm H$. From here you know that $\sin r=\pm\sin\theta$ (depending on the value of $H$). Assuming that $H,R\geq0$ then you have $\sin r=\sin\theta$. So $r=\theta+2\pi k$
That is the same: $R^2=(A+B)^2$... – Dennis Gulko Oct 22 '12 at 22:14
That $\sin^2+\cos^2=1$ will get you a long way, @PaulReed. With your new equations you've got $R^2=A^2+B^2+2 A B \cos{(y-z)}$. – Alexander Gruber Oct 22 '12 at 22:49