IAE Academy

GATE 2022 CS GA Q.2: solution and answer

GATE 2022 · CSGA Q.2 · 1 mark · MCQ

A function y(x) is defined in the interval [0, 1] on the x-axis as

y(x) = 2 if 0 ≤ x < 1/3; 3 if 1/3 ≤ x < 3/4; 1 if 3/4 ≤ x ≤ 1.

Which one of the following is the area under the curve for the interval [0, 1] on the x-axis?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

See the question in the paper

Answer and solution

ANSWER

The area under the curve on is , option (C).

Official answer: CSource: Official answer key, GATE 2022 CS (IIT Kharagpur)

  1. The function is piecewise constant, so the area under the curve is the sum of the areas of three rectangles (height times width).

  2. Piece 1: height on , width , area .

  3. Piece 2: height on , width , area .

  4. Piece 3: height on , width , area .

  5. Total area:

  6. Check: the widths , so the pieces cover exactly. The area is , option (C).

KEY IDEA

For a piecewise-constant function, the area is the sum of height times width over each piece. Use a common denominator, and check that the widths add up to the full interval.

WATCH OUT FOR

Taking the middle width as and getting it wrong, for example or . Another slip is averaging the heights, , instead of weighting each by its width.

From the GATE 2022 CS paper. Every question of this paper · Download the full paper · All 103 Numerical questions, with notes

More Numerical questions