Find the maximum and minimum values of $A \cos t + B \sin t$ Let $A$ and $B$ be constants. Find the maximum and minimum values of $A \cos t + B \sin t$.
I differentiated the function and found the solution to it as follows: 
$f'(x)= B \cos t - A \sin t$
$B \cos t - A \sin t = 0 $
$t = \cot^{-1}(\frac{A}{B})+\pi n$
However, I got stuck here on how to formulate the minimum and maximum points. Any explanation would be appreciated.

If $A=B=0$, then
$$
\min_t(A\cos t+B\sin t)=\max_t(A\cos t+B\sin t)=0.
$$
If $(A,B) \ne (0,0)$, let $\theta \in [0,2\pi)$ such that
$$
\cos\theta=\frac{A}{\sqrt{A^2+B^2}},\quad \sin\theta=\frac{B}{\sqrt{A^2+B^2}}.
$$
Then
$$
A\cos t+B\sin t=\sqrt{A^2+B^2}(\cos t\cos\theta+\sin t\sin\theta)=\sqrt{A^2+B^2}\cos(t-\theta).
$$
Hence
$$
\min_t(A\cos t+B\sin t)=-\sqrt{A^2+B^2},\quad \max_t(A\cos t+B\sin t)=\sqrt{A^2+B^2}.
$$
