TITLE: Find $\cos(x+y)$  if $\sin(x)+\sin(y)= a$ and $\cos(x)+\cos(y)= b$
QUESTION [9 upvotes]: Find $\cos(x+y)$  if $\sin(x)+\sin(y)= a$ and $\cos(x)+\cos(y)= b$.

REPLY [2 votes]: If you know the identities $$\displaylines{\sin x+\sin y=2\sin{x+y\over2}\cos{x-y\over2}\cr\cos x+\cos y=2\cos{x+y\over2}\cos{x-y\over2}\cr\tan2A={2\tan A\over1-\tan^2A}\cr}$$ then dividing the first one by the second one you get $$\tan{x+y\over2}={a\over b}$$ whence the third one gives $$\tan(x+y)={2(a/b)\over1-(a/b)^2}$$ Now looking at a right triangle shows that if $\tan B=u/v$ then $\cos B=v/\sqrt{u^2+v^2}$, so with a little algebra you get $$\cos(x+y)={1-(a/b)^2\over1+(a/b)^2}={b^2-a^2\over b^2+a^2}$$ 
If you don't know those first two identities, they come from the identities for $\sin(r\pm s)$ and $\cos(r\pm s)$.