If #sinx+siny=a# and #cosx+cosy=b# how do you find #cos(x-y)# ?

2 Answers
Sep 15, 2016

#cos(x-y) = (a^2+b^2-2)/2#

Explanation:

Using de Moivre's identity

#e^(i phi) = cos phi + i sin phi#

Adding term to term

#((i sin x + i sin y = i a), (cos x + cos y = b))#

giving

#e^(ix) + e^(iy) = rho e^(ialpha)#

with #rho = sqrt(a^2+b^2)#

Adding now

#((-i sin x - i sin y =-i a), (cos x + cos y = b))#

#e^(-ix) + e^(-iy) = rho e^(-ialpha)#

Multiplying term to term

#1+e^(i(x-y))+e^(-i(x-y)) + 1= rho^2# or

#2+2cos(x-y)=rho^2# and finally

#cos(x-y) = (a^2+b^2-2)/2#

of course #a,b# must obey

#abs( (a^2+b^2-2)/2) le 1#

Sep 16, 2016

#cos(x-y)=1/2(a^2+b^2-2)#

Explanation:

As #cosx+cosy=b#, #b^2=cos^2x+cos^2y+2cosxcosy#, and similarly as #sinx+siny=a#, #a^2=sin^2x+sin^2y+2sinxsiny#

Adding the two, we get

#a^2+b^2=cos^2x+cos^2y+2cosxcosy+sin^2x+sin^2y+2sinxsiny# or

#a^2+b^2=2+2×(cosxcosy+sinxsiny)# or

#a^2+b^2=2+2×cos(x-y)# or

#cos(x-y)=1/2(a^2+b^2-2)#