0

Let X be the set of all values of x for which $ f(x;a_{1},a_{2})$ achieves its maximum. Find the values that x can take:

a)$x\in \left \{ \frac{a_{1}}{2},\frac{1+a_{2}}{2} \right \}$

b)$x\in \left \{ a_{1},a_{2} \right \}$

c) $x\in \left \{0,\frac{a_{1}+a_{2}}{2},1 \right \}$

d)$x\in\left [ a_{1},a_{2} \right ]$

I could solve this problem with a very complicated elimination method, can someone show me how to solve it using a graph and plotting? Or some other easier method.

Any help will be appreciated, thankyou.

Idkwoman
  • 181
  • 1
  • 11

2 Answers2

1

You are trying to minimize

$$|x-a_1|+|x-a_2|$$

of which it's physical meaning is to minimize the sum of the distance of $x$ to $a_1$ and the distance from $x$ to $a_2$.

If $x$ is between $a_1$ and $a_2$, the distance will be $a_2-a_1$.

If $x$ is outside $[a_1, a_2]$, the distance will be more than $a_2-a_1$ as the distance from the point that is further away from $x$ would be more than that.

Siong Thye Goh
  • 149,520
  • 20
  • 88
  • 149
0

Let's have $\begin{cases}\sigma_1=\operatorname{signum}(x-a_1)\in\{-1,0,1\} \\ \sigma_2=\operatorname{signum}(x-a_2)\in\{-1,0,1\}\end{cases}$

$f(x)=-\sigma_1(x-a_1)-\sigma_2(x-a_2)$

$\forall x\neq a_1,x\neq a_2$ we have $f'(x)=-\sigma_1-\sigma_2$

If $f$ has a maximum on $\mathbb R$ then $f'(x)=0$, this is realized for $\sigma_1=-\sigma_2$.

But since $a_2>a_1$ then $\sigma_2<\sigma_1$ the only possibility is $\sigma_1=+1,\ \sigma_2=-1$.

For such $x\in]a_1,a_2[$ we have $f(x)=-(+1)(x-a_1)-(-1)(x-a_2)=a_2-a_1$

We verify in the points where $f$ is not derivable that $f(a_1)=f(a_2)=a2-a1$ also.

$\begin{array}{|l|lcr|c|lcr|} \hline x & -\infty && a_1 && a_2 && +\infty \\ \hline f' & & +1 && 0 && -1 \\ \hline f && \nearrow && \longrightarrow && \searrow \\ & -\infty &&& a_2-a_1 &&& -\infty \\ \hline \end{array}$

zwim
  • 28,563