# Simpson’s Rule Formula

A way of finding the area of any figure is by integrating the function of that curve within the required limits which gives the area under that curve. However, there is a problem with this approach as in some cases the integral of the function can not be calculated or is difficult to find. It should also be noted that in many real-life engineering situations finding an approximate value of the area can be sufficient. This is where Simpson’s formula comes into the picture.

### Simpson’s Rule Formula

The Simpson’s rule formula is a mathematical formula given by British mathematician Thomas Simpson which is used for approximating the value of a definite integral. The rule states that :

≈ S

_{n}Where S

_{n}= .Here , a=x

_{0}and b = x_{n}, , n = any even integer.

**Derivation of Simpson’s rule formula**

For a better understanding of how Simpson’s formula helps in approximating the area let’s derive the actual formula. Consider a function y = f(x) which is continuous in the closed interval [a, b]. We are going to approximate the value of integral by dividing the area under the curve into parabolas. For doing this divide the interval [a,b] into sub-intervals [x_{0}, x_{1}], [x_{1}, x_{2}], [x_{2}, x_{3}],…,[x_{n-2}, x_{n-1}], [x_{n-1}, x_{n}] each of width. Here x_{0 }= a and x_{n }= b. Now for finding the area let’s suppose that a parabola passes through every three consecutive points on the curve, i.e. there is a parabola that passes through points (x_{0}, f(x_{0})), (x_{1}, f(x_{1})), (x_{2}, f(x_{2})).

Next we make this parabola symmetric along the y-axis. Lets assume the equation of this parabola to be px^{2} + qx + r.

Now the area from x_{0 }to x_{2} can be found by the definite integral (px^{2 }+ qx + r)dx.

.

= +0 +2r.

=⇢ (1)

Also, f(x

_{0}) =.f(x

_{1}) = r [since x_{1 }= 0]f(x

_{2}) =.Now . ⇢ (2)

Compare (1) and (2),

This means that, Area between x₀ and x₂ = f(x

_{0})+4f(x_{1})+f(x_{2})Similarly we can find the area between the points x

_{2 }and x_{4}. = .We can now calculate the other areas in a similar way.

**Error bound in Simpson’s Rule**

As mentioned earlier Simpson’s rule is helpful only for finding the approximate value of the integral. there is always an error bound in the calculation which is given by

Here M>|f

^{4}(x)|

### Sample problems

**Question 1: Find the integral **** for n = 4**.

**Solution:**

Here f(x) = x

^{4}, a = 0, b = 4 and n = 4, .By Simpson’s formula, .

= (1 + 4 + 32 + 324 + 256)/3 = 205.66

Note:This solution provided by Simpson’s formula is only an approximation the actual value of the integral will be 204.8. In later examples, we will see how this rule is helpful for finding the definite integral of functions whose integral we are unable to find.

**Question 2: Find the integral **** for n = 4**

**Solution:**

Here f(x) = cos x a = 0, b = π, n = 4 and .

By Simpson’s formula .

= 0/3 = 0.

**Question 3: Solve for the integral **** for n = 2.**

**Solution:**

Here f(x)= , a = 0, b = 2, n = 2 and = 2 – 0/2 = 1.

Using Simpson’s formula .

=.

= 2988.6762/3 = 995.8920

Note:The indefinite integral of the function, in this case, cannot be found. However, we could have used the limit of sums method for finding the integral but since it requires a lot more calculations, therefore, Simpson’s formula is preferred.

**Question 4: Solve for the integral **** where n = 4.**

**Solution:**

Here f(x) = ln x, a= e

^{2}, b = 2e^{2}, n = 4 and^{\Delta= \frac{e^2}{4}.}Applying the Simpson’s formula .

=[2 + 4ln5 – 4ln4 + 8 + 2ln3 – 2ln2 + 4 + 4ln7 – 4ln4 + 8 + 2ln2 + 4].

= 15.3159106.

**Question 5: Find the integral **** where n = 4.**

**Solution:**

Here f(x) = sin

^{2}x, a = 0, b = π, n = 4 and = π/4.Using Simpson’s formula .

= π/12[2 + 2 + 2]

= π/2

**Question 6: Integrate the function x cos x between the limits 0 to **** using Simpson’s rule and check the accuracy by calculating the actual integral. (Take n = 4).**

**Solution:**

We need to find the integral .

Using Simpson’s formula for n = 4.

.

= 0.89

Now

.

.

= – 1 = 0.57 .

So the difference between the Simpson value and the actual value of the integral = 0.89-0.57 = 0.32.

**Question 7: Given a function f(x) = x cos (x) check the accuracy of Simpson’s rule formula for n = 2 and n = 4 within the limits 0 and π/2.**

**Solution:**

Let’s check the value of the integral by using Simpson’s formula for n = 4

.

= 0.8879

Now let’s apply the Simpson’s rule on the same integral but this time for n=2

.

= .

= 0.583

Now the value of the integral varies significantly as you change the value of n. The accuracy of the Simpson’s rule depends on the value of n. This shows that Simpson’s rule depends on the value of n it is mostly advised to take the value of n = 4.

## Please

Loginto comment...