Find $\cos(x+y)$  if $\sin(x)+\sin(y)= a$ and $\cos(x)+\cos(y)= b$ Find $\cos(x+y)$  if $\sin(x)+\sin(y)= a$ and $\cos(x)+\cos(y)= b$.
 A: The following identities should help you:
$$
\tan \bigg(\frac{{x + y}}{2}\bigg) = \frac{{\sin x + \sin y}}{{\cos x + \cos y}}
$$
and
$$
\tan \bigg(\frac{{x + y}}{2}\bigg) =  \pm \sqrt {\frac{{1 - \cos (x + y)}}{{1 + \cos (x + y)}}} .
$$
A: 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)$. 
A: Square and add the two to get $$2 + 2 \cos(x-y) = a^2 + b^2$$
$$2 \cos(x-y) = a^2 + b^2 - 2 $$
Square and subtract the two to get $$\cos(2x) + 2 \cos(x+y) + \cos(2y) = b^2 - a^2$$
Now, $$\cos(2x) + \cos(2y) = 2 \cos(x+y) \cos(x-y) = \cos(x+y) (a^2+b^2-2)$$
Hence, we get
$$\cos(x+y) (a^2 + b^2) = b^2 - a^2$$
Hence,
$$\cos(x+y) = \frac{b^2-a^2}{b^2+a^2}$$
A: An approach using complex numbers/geometry:
If $c = b + ia$, and if $z = \cos x + i \sin x$ and $z_1 = c - z = \cos y + i \sin y$, you are looking at the real part of $w = \cos(x+y) + i \sin (x+y) =  zz_1 = z(c-z)$ with the restriction that $|z| = 1$ and $|z_1| = |c - z| = 1$. 
Now the points satisfying $|z| = 1$ and $|c-z| = 1$ are given by the intersection of two unit circles: one centered at the origin and the other at $c$.
Thus $w = z(c-z)$ is a constant dependent only on $c$: it is the product of the two intersection points and can be computed easily as follows:
Each point of intersection can be written as $\dfrac{c}{2} \pm d$, where $d$ is perpendicular to $c$ (Why?) i.e. $d = kic$ for some real constant $k$.  (Why?) (It might help to draw a figure here).
Thus the product of points of intersection is $w = (\dfrac{c}{2} + d)(\dfrac{c}{2} - d) =\dfrac{c^2}{4} + k^2 c^2$.
This implies that $w$ is a multiple of $c^2$ and the argument of $w$ is twice that of $c$. Since $|w| = 1$, $w$ can be computed easily without having to worry about $k$.
We get $w = \cos 2 \alpha + i \sin 2 \alpha$ where $\alpha =  \tan^{-1}(\frac{a}{b})$.
PS:
We find that $|c|^2(1/4 + k^2) = 1$ and hence $d = (\sqrt{\frac{1}{|c|} - \frac{1}{4}})\ i c$ and so we can easily solve the given system of equations: i.e. find $\cos x, \cos y, \sin x, \sin y$
