Show that the sum of trigonometric functions
$$ f(x,y,z)=\cos(x+y+\alpha_1)+\cos(x-y+\alpha_2)+\cos(y+z+\alpha_3)\\+\cos(y-z+\alpha_4)+\cos(x+z+\alpha_5)+ \cos(x-z+\alpha_6) $$
where the $\alpha_i$ are arbitrary angles, does not have any local-but-not-global maximum or minimum.
The same result seems true for the more general case $\sum_{i=1}^n\cos(\vec{v}_i.\vec{x}+\alpha_i)$ where $\vec{x}=(x_1,x_2,\ldots)$ are the variables and $\vec{v}_i$ are vectors with entries equal to $0$, $1$ or $-1$.
Consider $y, z$ fixed.
Then $f(x,)=\cos(x+\beta_1)+\cos(x+\beta_2)+\cos(\beta_3)+\cos(\beta_4)+\cos(x+\beta_5)+ \cos(x+\beta_6)$
We know that $\cos(x+\theta)$ can be written $A\cos x+B\sin x$,
so $f(x)=A_1\cos x+B_1\sin x + A_2\cos x+B_2\sin x+ C_3+C_4+A_5\cos x+B_5\sin x+A_6\cos x+B_6\sin x$
Then $f(x)=K\cos x+L\sin x + M= R\cos(x+\gamma)+M$
We know from the properties of the $\cos$ function that this has no local-but-not-global maximum or minimum.
Extend in other directions.