Professional Documents
Culture Documents
(2019MEP2832)
MATLAB (Assignment 5)
Answer 1:
As the number of panels increases, the percentage error in the integral decreases and the solution converges to
2. However, also the rate of decrease is gradual. This is because the error is inversely related to the square of n.
Therefore, doubling the number of segments quarters the error. Increasing the number of panel from 8 to 16
makes the error one-fourth (1.288
4
≅ 0.321).
__________________________________________________________________________________________
Answer 2:
Simpson’s 1/3 rule is third-order accurate even though it is based on only three points. In other words, it yields
exact results for cubic polynomials even though it is derived from a parabola. In our case, the equation is
quadratic. So, it will give the exact solution even with 2 panels (or 3 points). So, the error is zero.
__________________________________________________________________________________________
Answer 3:
The solution obtained through in-built function and the trapezoid rule matches exactly.
_________________________________________________________________________________________
Answer 4:
__________________________________________________________________________________________
Answer 5:
__________________________________________________________________________________________