Solution
= Solution
Conjugating the first <vector> gives
$$
\langle a,b\rangle=ie^{-ix}+(1-i)e^{inx},\qquad
\operatorname{Re}\langle a,b\rangle=\sin x+\cos(nx)+\sin(nx).
$$
Their squared <norms> are $3$ and $2$, independently of $x,n$. Thus the specified <real angle in a complex inner product space> obeys
$$
\boxed{\cos\theta=\frac{\sin x+\cos(nx)+\sin(nx)}{\sqrt6}.}
$$
The complex <Cauchy-Schwarz inequality> ensures that this real quotient lies in $[-1,1]$.