Numerically integration

Numerically integrate f(x) = 0.2 + 25x − 200x 2 + 675x 3 − 900x 4 + 400x 5 from a = 0 to b = 0.8 using Trapezoidal rule applying over 1, 2, 4 and 8 segments, Simpson 1/3rd rule applying over 2, 4, 6 and 8 segments and Simpson 3/8th rule applying over 3 and 6 segments. Use Romberg method to improve accuracy of the result. Determine the exact value of the integral analytically to compute true error in different methods.

Sample Solution