How to find the Absolute Minimum of this Type of Function I have been working on this question:
Question:
Given positive numbers $λ_{1}$,…, $λ_{n}$. Find the absolute minimum of $f(x)$ = $\max_{1≤i≤n}$$\frac{|x−λi|}{x+λi}$,  $x$$≥$$0$.
Justify your solution.
I solve maximum and minimum problems by determining the critical points of the derivative of the function. However, the MAX function here throws me off balance.
This is my attempt on the question so far:
Attempt
f(x) = $\max_{1≤i≤n}$$\frac{|x−λi|}{x+λi}$
Since $\frac{|x−λi|}{x+λi}$ is negative for $x$$<$ ${λ_i}$ for each $i$, then the absolute minimum would be $-1$ for ${λ_i}$$=$$0$ for some $i$.
The problem here is that ${λ_i}$ is positive. Hence, there seems to be no lower bound. This means the absolute minimum does not exist.
Does this line of reasoning make sense or is there something I am missing out?
Thanks.
 A: Note that
$$\frac{x-\lambda_i}{x+\lambda_i} = 1 - \frac{2\lambda_i}{x+\lambda_i}
= 1 - \frac{2}{1 + x/\lambda_i}.$$
WLOG assume $0 < \lambda_1 < \cdots < \lambda_n$.
If $x$ were bigger than all the $\lambda_i$, then $\frac{|x-\lambda_i|}{x+\lambda_i} = 1 - \frac{2}{1+x/\lambda_i}$, so the maximum would be attained by $\lambda_1$
If $x$ were smaller than all the $\lambda_i$, then
$\frac{|x-\lambda_i|}{x+\lambda_i}= - 1 + \frac{2}{1+x/\lambda_i}$, so the maximum would be attained by $\lambda_n$.
If $\lambda_1 < x < \lambda_n$ is among the $\lambda_i$, we have a mixture of the above two cases:
$f(x) = \max\left\{
1-\frac{2}{1+x/\lambda_1},
-1 + \frac{2}{1+x/\lambda_n}\right\}$.
So in summary,
$$f(x) = \begin{cases}
-1 + \frac{2}{1+x/\lambda_n} & 0 \le x \le \lambda_1
\\
\max\left\{
1-\frac{2}{1+x/\lambda_1},
-1 + \frac{2}{1+x/\lambda_n}\right\}
& \lambda_1 < x < \lambda_n
\\
1 - \frac{2}{1+x/\lambda_1}  & x \ge \lambda_n
\end{cases}$$
Since $x \mapsto -1 + \frac{2}{1+x/\lambda_n}$ is decreasing and $x \mapsto 1 - \frac{2}{1-x/\lambda_n}$ is increasing, you can show that that $f$ is actually
$$f(x) = \begin{cases}
-1 + \frac{2}{1+x/\lambda_n} & 0 \le x \le x^*
\\
1 - \frac{2}{1+x/\lambda_1}  & x \ge x^*
\end{cases}$$
where $x^*$ satisfies $\lambda_1 < x^* < \lambda_n$ and is the solution to
$$1-\frac{2}{1+x/\lambda_1}
= -1 + \frac{2}{1+x/\lambda_n}.$$
After some manipulations you obtain $x^* = \sqrt{\lambda_1 \lambda_n}$. So $f$ is decreasing on $[0, \sqrt{\lambda_1 \lambda_n}]$ and increasing on $[\sqrt{\lambda_1 \lambda_n}, \infty)$
with a minimum value of
$$f(\sqrt{\lambda_1 \lambda_n})
= 1 - \frac{2}{1+\sqrt{\lambda_n/\lambda_1}}= \frac{\sqrt{\lambda_n}-\sqrt{\lambda_1}}{\sqrt{\lambda_n}+\sqrt{\lambda_1}}.$$
A: Assuming that $x \ge 0$, it is easy to check that, for every individual term, we have
$$\dfrac{|x-\lambda_i|}{x+\lambda_i}\leq 1,$$
So, the same inequality applies to the maximum, yielding $f(x)\leq 1$. Since $f(0)=1$, we know that the maximum is exactly $1$.
Regarding the minimum, it is easy to see that only two of the functions $\dfrac{|x-\lambda_i|}{x+\lambda_i}$ dominate over the others.
The global minimum is attained at the turning point, where
$$
\dfrac{|x-\lambda_n|}{x+\lambda_n} = \dfrac{|x-\lambda_1|}{x+\lambda_1}.
$$
Considering that this point satisfies $x \in (\lambda_1, \lambda_n)$, you can get rid of the absolute value and get
$$
\dfrac{-x+\lambda_n}{x+\lambda_n} = \dfrac{x-\lambda_1}{x+\lambda_1},
$$
which leads to the minimum being reached at $x = \sqrt{\lambda_1 \lambda_n}$.

