You are on page 1of 6

Divyansh Krishana

(2019MEP2832)

MATLAB (Assignment 5)
Answer 1:

Divyansh Krishana (2019MEP2832)

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:

Divyansh Krishana (2019MEP2832)

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.

cos(2 cos −1 𝑥) = 2 cos 2 (cos −1 𝑥) − 1 = 2𝑥 2 − 1

__________________________________________________________________________________________
Answer 3:

Divyansh Krishana (2019MEP2832)

The solution obtained through in-built function and the trapezoid rule matches exactly.

_________________________________________________________________________________________
Answer 4:

Divyansh Krishana (2019MEP2832)

Higher the order of Gaussian quadrate, better is the accuracy of integration.

__________________________________________________________________________________________
Answer 5:

Divyansh Krishana (2019MEP2832)


As you can see from the graph, the function is of higher order. So, the whole curve is broken down into the
panels of size 0.5 and each part is integrated separately and then added. The analytical solution matches with the
answer obtained through Gaussian quadrate of 3rd and 4th order.

__________________________________________________________________________________________

Divyansh Krishana (2019MEP2832)

You might also like