Supremum and infimum of asinx + bcosx I am trying to draw conclusions about the supremum and infimum of $F=\{a\sin x+b\cos x: x \in \mathbb{R}\}$ where $a,b \in \mathbb{R}$ are parameters. I am able to rewrite the function as
$$\sqrt{a^2+b^2}\left(\frac{a}{\sqrt{a^2+b^2}}sinx+\frac{b}{\sqrt{a^2+b^2}}cosx\right).$$
Notice that $\left(\frac{a}{\sqrt{a^2+b^2}}\right)^2 + \left(\frac{b}{\sqrt{a^2+b^2}}\right)^2=1$, so $\frac{a}{\sqrt{a^2+b^2}}$ and $\frac{b}{\sqrt{a^2+b^2}}$ can be rewritten as $\cos\theta$ and $\sin\theta$, respectively. Then I continue $\sqrt{a^2+b^2}\left(\cos\theta \sin x + \sin\theta \cos x\right)$ which is $\sqrt{a^2+b^2}\sin(x+\theta)$. I conclude that $F=\left[-\sqrt{a^2+b^2};\sqrt{a^2+b^2}\right]$, and so:
1) $F$ is bounded both from above and below.
2) $\text{sup } F=\sqrt{a^2+b^2}, \text{inf }F=-\sqrt{a^2+b^2}$.
3) $\text{sup }F \in F, \text{inf }F \in F$.
Is this work correct?
 A: Your approach is fine, but you may also consider that if $f(x)=a\sin x+b\cos x$ and $a,b\neq 0$, the Cauchy-Schwarz inequality ensures
$$ |f(x)|\leq \sqrt{a^2+b^2}\sqrt{\sin^2 x+\cos^2 x} = \sqrt{a^2+b^2} $$
with equality attained at the points for which $|\tan x|=\left|\frac{a}{b}\right|$. Since $f(x)=-f(x+\pi)$, the range of $f$ is the closed interval $\left[-\sqrt{a^2+b^2},\sqrt{a^2+b^2}\right]$. If $a$ or $b$ equal zero, the question is trivial.
A: Checking with calculus, we have the extreme point of
\begin{align}
f(x) = a \cos x + b\sin x \ \ \Rightarrow \ \ f'(x) = -a\sin x + b\cos x.
\end{align}
Solving for the critical points
\begin{align}
b\cos x - a\sin x = 0
\end{align}
leads to the cases
Case 1: $a\neq 0$
Then it follows
\begin{align}
\tan x = \frac{\sin x}{\cos x}=\frac{ kb/\sqrt{a^2+b^2}}{ ka/\sqrt{a^2+b^2}}=\frac{b}{a}
\end{align}
where $|k|=1$ which means either
\begin{align}
f(x) = \frac{a^2k}{\sqrt{a^2+b^2}}+\frac{b^2k}{\sqrt{a^2+b^2}}=\sqrt{a^2+b^2}
\end{align}
or
\begin{align}
f(x) = \frac{a^2k}{\sqrt{a^2+b^2}}+\frac{b^2k}{\sqrt{a^2+b^2}}=-\sqrt{a^2+b^2}
\end{align}
Case 2 $a = 0$ We immediately have the maximum is $|b|$ and min is $-|b|$. 
