If $\cos x + \cos y - \cos(x+y) = \frac{3}{2}$, then how are $x$ and $y$ related? 
If $$\cos x + \cos y - \cos(x+y) = \frac{3}{2}$$ then
  
  
*
  
*(a) $x + y = 0$
  
*(b) $x = 2 y$
  
*(c) $x = y$
  
*(d) $2 x = y$
  

It is problem of trigonometry, and I have the solution of the problem. However, after seeing the solution, I don't quite understand how is one supposed to know how to approach this problem. My request is:

Don't just solve the problem, but also tell me from where do you come to know which approach would work. (Tell me from where do you come to know which trick or approach to be used to solution this problem.)

Thanks in advance.

Let $z_1 = -\cos x + i\sin x$, $z_2 = -\cos y + i\sin y$. Then,
\begin{align*}
|1+z_1+z_2|^2 \geq 0 &\Rightarrow 3 -2\cos x - 2\cos y + 2\cos(x+y) \geq 0\\
&\Rightarrow \cos x + \cos y - \cos(x+y) \leq \frac{3}{2}
\end{align*}
Equality holds if and only if $1 + z_1 + z_2 = 0$ and hence $1+\bar{z_1}+\bar{z_2} =0$. Adding, we obtain, $\cos x + \cos y = 1$ and consequently $\cos(x+y) = -\frac{1}{2}$. Thus $x+y = \frac{2\pi}{3}$ and from $\cos x + \cos y = 1 $, we get $x = \frac{\pi}{3}$ and $y = \frac{\pi}{3}$. Thus $x=y$ 
This can also be solved without using complex numbers:
\begin{align*}
&\qquad \cos x + \cos y - \cos(x+y) = \frac{3}{2} \\
&\Rightarrow 2\cos\left(\frac{x+y}{2}\right)\cos\left(\frac{x-y}{2}\right) - 2\cos^2\left(\frac{x+y}{2}\right) + 1 = \frac{3}{2} \\
&\Rightarrow 4\cos^2\left(\frac{x+y}{2}\right)  - 4\cos\left(\frac{x+y}{2}\right)\cos\left(\frac{x-y}{2}\right) +1 = 0 \\
&\Rightarrow \left(2\cos\left(\frac{x+y}{2}\right)-\cos\left(\frac{x-y}{2}\right)\right)^2 + 1 - \cos^2\left(\frac{x-y}{2}\right) = 0\\
&\Rightarrow \left(2\cos\left(\frac{x+y}{2}\right)-\cos\left(\frac{x-y}{2}\right)\right)^2  + \sin^2\left(\frac{x-y}{2}\right)  = 0
\end{align*}
and hence
\begin{align*}
\sin\left(\frac{x-y}{2}\right) &= 0\\
2\cos\left(\frac{x+y}{2}\right)-\cos\left(\frac{x-y}{2}\right) &= 0
\end{align*}
Thus $x=y = \dfrac{\pi}{3}$
