Maximum Value of Modulus Function

CAT 2022 Slot 1 · Quantitative Ability · Hard · Functions

Let 0≤a≤x≤1000 \le a \le x \le 100 and f(x)=∣x−a∣+∣x−100∣+∣x−a−50∣f(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 0≤a≤x≤1000 \le a \le x \le 100. Since x≥ax \ge a, ∣x−a∣=x−a|x - a| = x - a. Since x≤100x \le 100, ∣x−100∣=100−x|x - 100| = 100 - x.

So f(x)=(x−a)+(100−x)+∣x−a−50∣=100−a+∣x−a−50∣f(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 ∣x−a−50∣|x - a - 50| varies as xx ranges from aa to 100100. When x=ax = a: ∣x−a−50∣=50|x - a - 50| = 50, so f(a)=100−a+50=150−af(a) = 100 - a + 50 = 150 - a. When x=a+50x = a + 50 (if a+50≤100a + 50 \le 100): f(x)=100−af(x) = 100 - a. When x=100x = 100: f(100)=100−a+∣50−a∣f(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)=100−50+∣x−100∣=50+100−x=150−xf(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.

Related Functions questions

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