PYQs / GATE ME / 2016 / Set 2 / Q39 GATE ME 2016 Set 2 — Question 39 Go beyond PYQs with Success Tracker AI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply. NAT +2 / -0 Medium Trapezoidal & Simpson's Rules Numerical Methods Engineering Mathematics Error Analysis
Engineering Mathematics → Numerical Methods → Error Analysis
Last updated 5 September 2026
Question The error in numerically computing the integral
∫ 0 π ( sin x + cos x ) d x \int_0^\pi (\sin x + \cos x) dx ∫ 0 π ( sin x + cos x ) d x using the trapezoidal rule with three intervals of equal length between 0 and
π \pi π is
___________ Correct answer 0.175 to 0.195
Solution 1. Exact Value of the Integral:
I e x a c t = ∫ 0 π ( sin x + cos x ) d x = [ − cos x + sin x ] 0 π I_{exact} = \int_0^\pi (\sin x + \cos x) dx = [-\cos x + \sin x]_0^\pi I e x a c t = ∫ 0 π ( sin x + cos x ) d x = [ − cos x + sin x ] 0 π I e x a c t = ( − cos π + sin π ) − ( − cos 0 + sin 0 ) = ( 1 + 0 ) − ( − 1 + 0 ) = 2 I_{exact} = (-\cos \pi + \sin \pi) - (-\cos 0 + \sin 0) = (1 + 0) - (-1 + 0) = 2 I e x a c t = ( − cos π + sin π ) − ( − cos 0 + sin 0 ) = ( 1 + 0 ) − ( − 1 + 0 ) = 2 2. Trapezoidal Rule Approximation:
Number of intervals
n = 3 n = 3 n = 3 , limits
a = 0 , b = π a = 0, b = \pi a = 0 , b = π .
Step size
h = π − 0 3 = π 3 h = \frac{\pi - 0}{3} = \frac{\pi}{3} h = 3 π − 0 = 3 π .
x 0 = 0 , x 1 = π 3 , x 2 = 2 π 3 , x 3 = π x_0 = 0, x_1 = \frac{\pi}{3}, x_2 = \frac{2\pi}{3}, x_3 = \pi x 0 = 0 , x 1 = 3 π , x 2 = 3 2 π , x 3 = π y = f ( x ) = sin x + cos x y = f(x) = \sin x + \cos x y = f ( x ) = sin x + cos x y 0 = f ( 0 ) = sin 0 + cos 0 = 1 y_0 = f(0) = \sin 0 + \cos 0 = 1 y 0 = f ( 0 ) = sin 0 + cos 0 = 1 y 1 = f ( π 3 ) = sin π 3 + cos π 3 = 3 2 + 1 2 ≈ 1.366 y_1 = f(\frac{\pi}{3}) = \sin \frac{\pi}{3} + \cos \frac{\pi}{3} = \frac{\sqrt{3}}{2} + \frac{1}{2} \approx 1.366 y 1 = f ( 3 π ) = sin 3 π + cos 3 π = 2 3 + 2 1 ≈ 1.366 y 2 = f ( 2 π 3 ) = sin 2 π 3 + cos 2 π 3 = 3 2 − 1 2 ≈ 0.366 y_2 = f(\frac{2\pi}{3}) = \sin \frac{2\pi}{3} + \cos \frac{2\pi}{3} = \frac{\sqrt{3}}{2} - \frac{1}{2} \approx 0.366 y 2 = f ( 3 2 π ) = sin 3 2 π + cos 3 2 π = 2 3 − 2 1 ≈ 0.366 y 3 = f ( π ) = sin π + cos π = − 1 y_3 = f(\pi) = \sin \pi + \cos \pi = -1 y 3 = f ( π ) = sin π + cos π = − 1 I t r a p = h 2 [ y 0 + y 3 + 2 ( y 1 + y 2 ) ] = π / 3 2 [ 1 − 1 + 2 ( 3 + 1 2 + 3 − 1 2 ) ] I_{trap} = \frac{h}{2} [y_0 + y_3 + 2(y_1 + y_2)] = \frac{\pi/3}{2} [1 - 1 + 2(\frac{\sqrt{3}+1}{2} + \frac{\sqrt{3}-1}{2})] I t r a p = 2 h [ y 0 + y 3 + 2 ( y 1 + y 2 )] = 2 π /3 [ 1 − 1 + 2 ( 2 3 + 1 + 2 3 − 1 )] I t r a p = π 6 [ 2 3 ] = π 3 3 = π 3 ≈ 1.8138 I_{trap} = \frac{\pi}{6} [2\sqrt{3}] = \frac{\pi\sqrt{3}}{3} = \frac{\pi}{\sqrt{3}} \approx 1.8138 I t r a p = 6 π [ 2 3 ] = 3 π 3 = 3 π ≈ 1.8138 3. Error Calculation:
Error =
∣ I e x a c t − I t r a p ∣ = ∣ 2 − 1.8138 ∣ = 0.1862 |I_{exact} - I_{trap}| = |2 - 1.8138| = 0.1862 ∣ I e x a c t − I t r a p ∣ = ∣2 − 1.8138∣ = 0.1862 Turn this into a strength. Explore AI-powered practice and doubt support with Success Tracker. Review answer and solution without JavaScript Interactive answer checking needs JavaScript. The published solution is available below.
Correct answer 0.175 to 0.195
Solution 1. Exact Value of the Integral:
I e x a c t = ∫ 0 π ( sin x + cos x ) d x = [ − cos x + sin x ] 0 π I_{exact} = \int_0^\pi (\sin x + \cos x) dx = [-\cos x + \sin x]_0^\pi I e x a c t = ∫ 0 π ( sin x + cos x ) d x = [ − cos x + sin x ] 0 π I e x a c t = ( − cos π + sin π ) − ( − cos 0 + sin 0 ) = ( 1 + 0 ) − ( − 1 + 0 ) = 2 I_{exact} = (-\cos \pi + \sin \pi) - (-\cos 0 + \sin 0) = (1 + 0) - (-1 + 0) = 2 I e x a c t = ( − cos π + sin π ) − ( − cos 0 + sin 0 ) = ( 1 + 0 ) − ( − 1 + 0 ) = 2 2. Trapezoidal Rule Approximation:
Number of intervals
n = 3 n = 3 n = 3 , limits
a = 0 , b = π a = 0, b = \pi a = 0 , b = π .
Step size
h = π − 0 3 = π 3 h = \frac{\pi - 0}{3} = \frac{\pi}{3} h = 3 π − 0 = 3 π .
x 0 = 0 , x 1 = π 3 , x 2 = 2 π 3 , x 3 = π x_0 = 0, x_1 = \frac{\pi}{3}, x_2 = \frac{2\pi}{3}, x_3 = \pi x 0 = 0 , x 1 = 3 π , x 2 = 3 2 π , x 3 = π y = f ( x ) = sin x + cos x y = f(x) = \sin x + \cos x y = f ( x ) = sin x + cos x y 0 = f ( 0 ) = sin 0 + cos 0 = 1 y_0 = f(0) = \sin 0 + \cos 0 = 1 y 0 = f ( 0 ) = sin 0 + cos 0 = 1 y 1 = f ( π 3 ) = sin π 3 + cos π 3 = 3 2 + 1 2 ≈ 1.366 y_1 = f(\frac{\pi}{3}) = \sin \frac{\pi}{3} + \cos \frac{\pi}{3} = \frac{\sqrt{3}}{2} + \frac{1}{2} \approx 1.366 y 1 = f ( 3 π ) = sin 3 π + cos 3 π = 2 3 + 2 1 ≈ 1.366 y 2 = f ( 2 π 3 ) = sin 2 π 3 + cos 2 π 3 = 3 2 − 1 2 ≈ 0.366 y_2 = f(\frac{2\pi}{3}) = \sin \frac{2\pi}{3} + \cos \frac{2\pi}{3} = \frac{\sqrt{3}}{2} - \frac{1}{2} \approx 0.366 y 2 = f ( 3 2 π ) = sin 3 2 π + cos 3 2 π = 2 3 − 2 1 ≈ 0.366 y 3 = f ( π ) = sin π + cos π = − 1 y_3 = f(\pi) = \sin \pi + \cos \pi = -1 y 3 = f ( π ) = sin π + cos π = − 1 I t r a p = h 2 [ y 0 + y 3 + 2 ( y 1 + y 2 ) ] = π / 3 2 [ 1 − 1 + 2 ( 3 + 1 2 + 3 − 1 2 ) ] I_{trap} = \frac{h}{2} [y_0 + y_3 + 2(y_1 + y_2)] = \frac{\pi/3}{2} [1 - 1 + 2(\frac{\sqrt{3}+1}{2} + \frac{\sqrt{3}-1}{2})] I t r a p = 2 h [ y 0 + y 3 + 2 ( y 1 + y 2 )] = 2 π /3 [ 1 − 1 + 2 ( 2 3 + 1 + 2 3 − 1 )] I t r a p = π 6 [ 2 3 ] = π 3 3 = π 3 ≈ 1.8138 I_{trap} = \frac{\pi}{6} [2\sqrt{3}] = \frac{\pi\sqrt{3}}{3} = \frac{\pi}{\sqrt{3}} \approx 1.8138 I t r a p = 6 π [ 2 3 ] = 3 π 3 = 3 π ≈ 1.8138 3. Error Calculation:
Error =
∣ I e x a c t − I t r a p ∣ = ∣ 2 − 1.8138 ∣ = 0.1862 |I_{exact} - I_{trap}| = |2 - 1.8138| = 0.1862 ∣ I e x a c t − I t r a p ∣ = ∣2 − 1.8138∣ = 0.1862 Understand the concept, then try another question Revisit Engineering Mathematics with concept notes, common mistakes and an original worked example before your next attempt.
More questions on Numerical Methods ← Q38 Full paper Q40 →