The GATE Grind

GATE 2016 ME (ME2) – Question 39

Engineering Mathematics · Numerical Methods: Algebraic equations, integration by trapezoidal and Simpson rules, ODE methods · 2 marks · Numerical answer

The error in numerically computing $\int_0^\pi(\sin x+\cos x)\,dx$ by the trapezoidal rule with three equal intervals is ______.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 0.175 to 0.195

Explanation

Exact integral from0 toπ of sinx+cosx is2. Step size isπ/3; the endpoint sum is zero and the two interior values sum tosqrt3. Thus trapezoidal estimate isπsqrt3/3=1.813799. The absolute error is2−1.813799=**0.18620**.