Find the smallest maximum of $2|\sin x+a|+|\cos 2x+\sin x+b|$ 
Let $f(x)=2|\sin x+a|+|\cos 2x+\sin x+b|$ where $a,b \in \mathbb{R}$.
  Denote the maximum of $f(x)$ as $M(a,b)$. Find the minimum value of
  $M(a,b)$

Let $\sin x=t$. Then $f(x)=2|t+a|+|1-2t^2+t+b|=:g(t)$ where $t\in [-1,1]$. But how to go on with this?
 A: Okay, this is not exactly elegant, but here goes for a mechanical approach. 
For any fixed values of $a$ and $b$, $\max_t g(t)$ is the max of:


*

*$g(1) = 2|a+1| + |b|$

*$g(-1)=2|a-1| + |b-2|$

*$\max_t \left\{2(t+a) + (-2t^2+t+1+b)\right\} = \frac{17}{8}+2a+b$

*$\max_t \left\{-2(t+a) + (-2t^2+t+1+b)\right\} = \frac{9}{8}-2a+b$
Can you see why this is true? It requires a few considerations. Looking at the possible values for the absolute values, we can reduce this to:
$$
\max_t g(t) = \max \begin{cases}
2+2a-b \\ 4-2a-b \\ \frac{17}{8}+2a+b \\ \frac{9}{8}-2a+b
\end{cases}
$$
From this we can work out that for a given value of $a$, the max is minimized with:
$$
\operatorname*{argmin}_b\max_tg(t) = \begin{cases}
\frac{23}{16} & a\le-\frac14 \\ 
\frac{15}{16}-2a & -\frac14\le a\le \frac12 \\
-\frac{1}{16} & \frac12 \le a
\end{cases}
$$
Plugging in these values of $b$, we get:
$$
\min_b \max_t g(t) = \begin{cases}
\frac{41}{16}-2a & a\le-\frac14 \\
\frac{49}{16} & -\frac14\le a\le \frac12 \\
\frac{33}{16} + 2a & \frac12 \le a
\end{cases}
$$
And from this we have:
$$
\min_{a,b}\max_t g(t) = \frac{49}{16},
$$
which is attained with $-\frac14\le a\le \frac12$, $b=\frac{15}{16}-2a$ at both $t=-1$ and $t=\frac34$. It is also attained at $(a, b, t)=(-\frac14,\frac{23}{16},-\frac14)$ and at $(a, b, t)=(\frac12,-\frac{1}{16},1)$. 
I am sure there are better ways to do this. But at least this doesn't require any good ideas.
