Disclaimer: This should be "easy" but, I'm startled by the explosion of subcases.
Question. What is an analytic formula for $\sup_{|x| \le 1} ax + |x-b|$ as a function of $a,b \in \mathbb R$.
Disclaimer: This should be "easy" but, I'm startled by the explosion of subcases.
Question. What is an analytic formula for $\sup_{|x| \le 1} ax + |x-b|$ as a function of $a,b \in \mathbb R$.
Copyright © 2021 JogjaFile Inc.
By simplifying the apparent explosion of subcases, it turns out that the problem has a nice analytic solution.
Proof. Let $f(a,b):=\sup_{|\theta| \le 1}a\theta+|\theta-b|$. First, suppose $b \le -1$. Then, $|\theta-b| = \theta-b$ for all $\theta \in [-1,1]$, and so $f(a,b) = \sup_{|\theta| \le 1}(a+1)\theta-b = |a+1|-b$. Next, suppose $b \ge 1$. Then $|\theta-b|=b-\theta$, and so $f(a,b) = \sup_{|\theta| \le 1}(a-1)\theta+b = |a-1|+b$. Finally, suppose $|b| < 1$. One computes \begin{eqnarray*} \begin{split} f(a,b) &= \max((1+a)b-b,1+a-b,b-(a-1),b+b(a-1))\\ &=\max(ab,1+a-b,b-a+1,ab)\\ &=\max(ab,1+a-b,1-a+b)\\ &= \max(ab,|a-b|+1)\\ &= |a-b|+1, \end{split} \end{eqnarray*} where the last step is because $ab \le |ab| \le |a| \le |a-b|+1$, since $|b| \le 1$. Putting things together then gives the result. $\quad\quad\Box$