# How do you Use Simpson's rule with n=8 to approximate the integral int_0^2root4(1+x^2)dx?

Aug 19, 2014

For any numerical approximation of a function, you always start with a table of values. For your problem, we have:

$a = 0$
$b = 2$
$n = 8$

So,

$\Delta x = \frac{b - a}{n} = \frac{1}{4}$
${x}_{i} = a + i \Delta x , i \in \left\{0 , 1 , \ldots , 8\right\}$

Now it is a matter of applying Simpson's Rule:

${\int}_{0}^{2} {\left(1 + {x}^{2}\right)}^{\frac{1}{4}} \mathrm{dx} = {\int}_{0}^{2} f \left(x\right) \mathrm{dx} \approx \frac{\Delta x}{3} \left(f \left({x}_{0}\right) + 4 f \left({x}_{1}\right) + 2 f \left({x}_{2}\right) + 4 f \left({x}_{3}\right) + \ldots + 2 f \left({x}_{6}\right) + 4 f \left({x}_{7}\right) + f \left({x}_{8}\right)\right)$

I'll skip the substitution of values because it's messy.
We get 2.41223163 as the approximation.

Using numerical integration on a calculator gets a value of 2.412231919 which means the approximation is good to 6 decimal places.

Notice the pattern of the coefficients for the sum is: 1, 4, 2, 4, ..., 2, 4, 1. This means that to use Simpson's Rule, we need an odd number of values or an even number of intervals; $n$ is even.