Maximizing/minimizing $f(\theta) = \sqrt{2}\cos(\theta)-4\sin(\theta)$ 
Assume that $f : [0, 2\pi]\rightarrow \mathbb{R}$ is a function such that $f(\theta) = \sqrt{2}\cos(\theta)-4\sin(\theta)$. Then, how can we maximize/minimize $f$?

We can re-parametrize our function $f$ by defining another function $g : [-1, 1]\rightarrow \mathbb{R}$ function such that for every $t\in [-1, 1]$,
$$g(t) = \sqrt{2}\sqrt{1-t^2}-4t$$
$$\frac{dg}{dt} = \frac{d}{dt}\left(\sqrt{2}\sqrt{1-t^2}-4t\right) = \frac{\sqrt{2}t}{\sqrt{1-t^2}} + 4 = 0$$
From which we conclude that $g$ attains its maximum/minimum at $\left(-\frac{2\sqrt{2}}{3}, g\left(-\frac{2\sqrt{2}}{3}\right)\right), (1, g(1))\in \mathbb{R}^2$ respectively.
 A: Use Cauchy-Schwarz inequality: $f^2(\theta) = \left(\sqrt{2}\cos\theta - 4\sin\theta\right)^2\le ((\sqrt{2})^2+4^2)(\cos^2\theta+\sin^2\theta)=18\implies -3\sqrt{2} \le f(\theta) \le 3\sqrt{2}$. Can you conclude the min and max for $f$?
A: $f(\theta) = \sqrt{2}\cos(\theta)-4\sin(\theta) = \sqrt{18}( \sin\alpha \cos \theta  - \cos \alpha \sin \theta)$ where $\sin \alpha = \frac{\sqrt{2}}{\sqrt{18}}$ and $\cos \alpha = \frac{4}{\sqrt{18}}$ and hence $\alpha = arctan \frac{\sqrt{2}}{4}$. Thus
$$f(\theta) = \sqrt{18}\sin(\alpha - \theta) \le \sqrt{18}$$ and the estimate is best possible.
A: I think, re-parametrazing is waste of time. $f'(\theta)=-\sqrt2\sin\theta-4\cos\theta=0$ gives $\tan\theta=-2\sqrt2$ which has two solutions $\frac{\pi} {2}<\theta_1=\pi+\arctan(-2\sqrt2)<\pi$ and $\pi<\theta_2=\pi+\theta_1<2\pi$ in $[0,2\pi].$
$f(\theta_1)=\sqrt2(-\frac13)-4\frac{2\sqrt2}{3}=-3\sqrt2$ and similarly $f(\theta_2)=3\sqrt2$. We need to compare these values with the boundry value(s) $f(0)=f(\pi)=\sqrt2$. Overall: $(\theta_1,-3\sqrt2)$ is global minumum and $(\theta_2,3\sqrt2)$ is global maximum.
A: I haven't gone through the details of your answer with a fine-toothed comb, but assuming your calculations are correct, you still haven't convinced me that those values are the maximum/minimum values of $f$ in the interval $[0,2\pi]$.
As well as looking at the stationary points, you need to look at the end points also: that is, $f(0)$ and $f(2\pi)$, or $g(-1)$ and $g(1)$, as maximum or minimum might happen at these points rather than the stationary points.
Basically there is a theorem that says that the maximum and minimum of a continuous real function $\ f: [a,b]\to\mathbb{R}\ $ must occur either at a stationary point or at one of the end points.
