Discussion
Let \(f(x) = |x| + |x - 1| + |x - 2|\), \(x \in [-1, 2]\). Which one of the following numerical integration rules gives the exact value of the integral
\(\int_{-1}^{2} f(x)\,dx\)
Answer: D
The exact rule is the composite trapezoidal rule by dividing [-1, 2] into 3 equal subintervals.
\(f(x) = |x| + |x - 1| + |x - 2|\) is piecewise linear on [-1, 2], with corners only at \(x = 0\) and \(x = 1\). Dividing [-1, 2] into three equal parts puts the nodes at -1, 0, 1, 2, so on each subinterval \(f\) is linear and the trapezoidal rule is exact.
Check: \(f(-1) = 6, f(0) = 3, f(1) = 2, f(2) = 3\), so the composite rule gives \(\frac{1}{2}(6 + 3) + \frac{1}{2}(3 + 2) + \frac{1}{2}(2 + 3) = 9.5\), the exact integral. The single trapezoid and single Simpson's rule ignore the corners, and the four-subinterval Simpson's rule places nodes at -0.25 and 1.25 with panels straddling the corners, where a quadratic cannot match a kink.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development