Maximum Value of Modulus Function

CAT 2022 Slot 1 · QA · Hard · Functions

Let 0ax1000 \le a \le x \le 100 and f(x)=xa+x100+xa50f(x) = |x - a| + |x - 100| + |x - a - 50|. Then the maximum value of f(x)f(x) becomes 100 when aa is equal to

  1. A.

    100

  2. B.

    25

  3. C.

    0

  4. D.

    50

Answer

D

Explanation

We are given 0ax1000 \le a \le x \le 100. Since xax \ge a, xa=xa|x - a| = x - a. Since x100x \le 100, x100=100x|x - 100| = 100 - x.

So f(x)=(xa)+(100x)+xa50=100a+xa50f(x) = (x - a) + (100 - x) + |x - a - 50| = 100 - a + |x - a - 50|.

For f(x)f(x) to achieve a maximum value of 100100 over x[a,100]x \in [a, 100]: Note that xa50|x - a - 50| varies as xx ranges from aa to 100100. When x=ax = a: xa50=50|x - a - 50| = 50, so f(a)=100a+50=150af(a) = 100 - a + 50 = 150 - a. When x=a+50x = a + 50 (if a+50100a + 50 \le 100): f(x)=100af(x) = 100 - a. When x=100x = 100: f(100)=100a+50af(100) = 100 - a + |50 - a|.

For the maximum value of f(x)f(x) over the allowed range of xx to be equal to 100: If a=50a = 50: Range of xx is [50,100][50, 100]. Then f(x)=10050+x100=50+100x=150xf(x) = 100 - 50 + |x - 100| = 50 + 100 - x = 150 - x. For x[50,100]x \in [50, 100], the maximum value occurs at x=50x = 50, where f(50)=100f(50) = 100.

Thus, a=50a = 50.

Practise this under exam conditions

Sign in to solve it with a live timer, the on-screen CAT calculator, and streak and accuracy tracking across every question you attempt.

Solve in the workspace