GATE [ME, 2017, 2 marks]
Question : $P(0.3)$, $Q(0.5,4)$ and $R(1,5)$ are three points on the curve defined by $f(x)$. Numerical integration is carried out using both Trapezoidal rule and Simpson's rule within limits $x=0$ and $x=1$ for the curve. The difference between the two results will be
(a) $0$
(b) $0.25$
(c) $0.5$
(d) $1$
Solution :
$x$ | $0$ | $0.5$ | $1$ |
$y$ | $3$ | $4$ | $5$ |
$h=\dfrac{1}{2}$
Using Trapezoidal rule
$\displaystyle\int\limits_{a}^{b}F(x)dx=\dfrac{h}{2}[(y_0+y_{n})+2(y_1+y_2+\cdots+y_{n-1})]$
$\displaystyle\int\limits_{0}^{1}F(x)dx=\dfrac{1/2}{2}[(3+5)+2(4)]$
$\displaystyle\int\limits_{0}^{1}F(x)dx=4$
Using Simpson's rule
$\displaystyle\int\limits_{a}^{b}F(x)dx=\dfrac{h}{3}[(y_0+y_n)+4(y_1+y_3+\cdots+y_{n-1})+2(y_2+y_4+\cdots+y_{n-2})]$
$\displaystyle\int\limits_{0}^{1}F(x)dx=\dfrac{1/2}{3}[(8+16)+4(4)]$
$\displaystyle\int\limits_{0}^{1}F(x)dx=4$
Difference between two results $=0$
CORRECT ANSWER : A
Comments
Post a Comment