TITLE: An upper bound on certain finite trigonometric series given a lower bound
QUESTION [17 upvotes]: Let $f$ be the function $f(x)=1+a\sin{x}+b\cos x+c\sin{(2x)}+d\cos{(2x)}$, where $a,b,c,d$ are arbitrary real numbers. Prove that if $f(x)>0$ for all $x\in \mathbb R$, then $f(x)<3$ for all $x\in \mathbb R$.

My try: 
\begin{align*}f(x)&=1+a\dfrac{e^{ix}-e^{-ix}}{2i}+b\dfrac{e^{ix}+e^{-ix}}{2}+c\dfrac{e^{2ix}-e^{-2ix}}{2i}+d\dfrac{e^{2ix}+e^{-2ix}}{2}\\
&=1+e^{ix}\left(\dfrac{a}{2i}+\dfrac{b}{2}\right)+e^{-ix}\left(-\dfrac{a}{2i}+\dfrac{b}{2}\right)+e^{2ix}\left(\dfrac{c}{2i}+\dfrac{d}{2}\right)+e^{-2ix}\left(\dfrac{d}{2}-\dfrac{c}{2i}\right).
\end{align*}
I don't see a way to proceed from there. Thank you very much.

REPLY [5 votes]: As obareey mentioned in the comments to the question, a (finite) sum of sine waves of the same frequency is again a sine wave of that frequency. In particular, we have 
$$\begin{align}
  a \sin x + b \cos x &= \sqrt{a^2 + b^2} \cos(x + \phi_1)
  \\
  c \sin 2x + d \cos 2x &= \sqrt{c^2 + d^2} \cos(2x + \phi_2)
\end{align}$$
for some $\phi_1, \phi_2 \in \mathbb R$. Denote $\alpha := \sqrt{a^2 + b^2}$, $\beta := \sqrt{c^2 + d^2}$, and
$$
  g(x) := \alpha \cos(x + \phi_1) + \beta \cos(2x + \phi_2) = f(x) - 1.
$$
It suffices to show that if there exists an $x^* \in \mathbb R$ such that $g(x^*) \geq 2$, then there exists an $x' \in \mathbb R$ such that $g(x') \leq -1$.
To prove, first note that since $\alpha, \beta \geq 0$ and $\cos \leq 1$, we have $\alpha + \beta \geq g(x^*) \geq 2$. Next, consider the sets
$$\textstyle
S := \{ x \in \mathbb{R} : \cos(x + \phi_1) \leq -\frac{1}{2}\}
= \bigcup_{k \in \mathbb{Z}} \left[2\pi k - \phi_1 + \frac{2\pi}{3}, 2\pi k - \phi_1 + \frac{4\pi}{3}\right]
\\\textstyle
T := \{ x \in \mathbb{R} : \cos(2x + \phi_2) \leq -\frac{1}{2}\}
= \bigcup_{k \in \mathbb{Z}} \left[\pi k - \frac{\phi_2}{2} + \frac{\pi}{3}, \pi k - \frac{\phi_2}{2} + \frac{2\pi}{3}\right].
$$
Observe that $S$ is composed of closed intervals of length $2\pi/3$, while
$$\textstyle
\mathbb R \setminus T = \bigcup_{k \in \mathbb{Z}} \left(\pi k - \frac{\phi_2}{2} - \frac{\pi}{3}, \pi k - \frac{\phi_2}{2} + \frac{\pi}{3}\right)
$$
is composed of open intervals of length $2\pi/3$. Thus $S \not\subseteq \mathbb{R} \setminus T$, meaning that $S \cap T \neq \varnothing$. If we now choose an $x' \in S \cap T$, then $g(x') \leq -\frac{1}{2}(\alpha + \beta) \leq -1$, as desired.