Can you simplify an Euler formula expression when you are only interested in the real part? I was trying to find a way to simplify $cos(x) + cos(x+a)$ using  Euler's formula:
f(x) = $ e^{ix} + e^{i(x+a)} $
= $cos(x) + cos(x+a) +i(sin(x) +sin(x+a))$
= $ 2 cos(x+ \frac{a}{2} )cos(\frac{a}{2}) + i(2sin(x+\frac{a}{2})cos(\frac{a}{2})) $ {sum to product identities)
=$ 2cos(\frac{a}{2})(cos(x+ \frac{a}{2} )+isin(x+\frac{a}{2}))$
=$2cos(\frac{a}{2})e^{i(x+\frac{a}{2})}$ {Important step 1}
=$2cos(\frac{a}{2})e^{ix}e^{i\frac{a}{2}}$ {Important step 2}
At Important step 1 Re(f(x)) is $2cos(\frac{a}{2})cos{(x+\frac{a}{2})}$ which  is a valid conclusion however at Important Step 2 Re(f(x)) is $2cos(\frac{a}{2})cos(x)cos({\frac{a}{2}})$ which is false (not equal to $cos(x) + cos(x+a)$). Why is it false when $e^{i(x+\frac{a}{2})}$ = $e^{ix}e^{i\frac{a}{2}}$ ?

For the step 2 : $f(x) = 2cos(\frac{a}{2})e^{ix}e^{i\frac{a}{2}}$ is correct. However, the real part of this is not $2cos(\frac{a}{2})cos(x)cos({\frac{a}{2}})$ (did you forget the $i^2$ term?).
Let's compute the expression $z := e^{ix}e^{i\frac{a}{2}}$,
we have 
$$\begin{eqnarray}z & = & \Big(cos(x) + i\ sin(x)\Big) \cdot \Big(cos(\frac{a}{2}) + i\ sin(\frac{a}{2})\Big) \\
\phantom{z} & = & \big(cos(x) cos(\frac{a}{2}) - sin(x) sin(\frac{a}{2}) \Big) + i \Big(
cos(x) sin(\frac{a}{2}) + sin(x) cos(\frac{a}{2}) \Big) 
\end{eqnarray}
$$
Hence, $\operatorname{Re}(f(x)) = 2cos(\frac{a}{2})\operatorname{Re}(z) = 2cos(\frac{a}{2}) \Big(cos(x) cos(\frac{a}{2}) - sin(x) sin(\frac{a}{2})\Big)$
