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.Â
The area under the curve
The Simpson’s rule formula is a mathematical formula given by British mathematician Thomas Simpson, which approximates the value of a definite integral. The rule states that :
[Tex]\int_{a}^{b} f(x) \,dxÂ
[/Tex] ≈ Sn
Where Sn =Â [Tex]\frac{\Delta}{3}[f(x_0)+4f(x_1)+2f(x_2)+4f(x_3)+…+2f(x_{n-2})+4f(x_{n-1})+f(x_n)]Â Â Â Â Â
[/Tex]Â Â .
Here [Tex]\Delta=b-aÂ
[/Tex] , a=x0 and b = xn, [Tex]\Delta=\frac{b-a}{n}Â
[/Tex], n = any even integer.
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 [Tex]\int_{a}^{b}{f(x)dx}Â
[/Tex]Â by dividing the area under the curve into parabolas. For doing this divide the interval [a,b] into sub-intervals [x0, x1], [x1, x2], [x2, x3],…,[xn-2, xn-1], [xn-1, xn] each of width[Tex]\DeltaÂ
[/Tex]. Here x0 = a and xn = 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 (x0, f(x0)), (x1, f(x1)), (x2, f(x2)).Â
Parabola passing through three points taken out of the curve
Next we make this parabola symmetric along the y-axis. Lets assume the equation of this parabola to be px2 + qx + r.
Parabola made symmetric along the y-axis
Now the area from x0 to x2 can be found by the definite integral [Tex]\int_{-\Delta}^{\Delta}Â
[/Tex]Â (px2 + qx + r)dx.
[Tex]Â \int_{-\Delta}^{\Delta} (px^2 +qx+r)dx = \frac{px^3}{3}+\frac{qx^2}{2} +rx |^{\Delta}_{-\Delta}Â Â Â Â
[/Tex].
=Â [Tex]2p\frac{\Delta^3}{3}Â
[/Tex]Â +0 +2r[Tex]\DeltaÂ
[/Tex].
=[Tex]\frac{\Delta}{3}[2p{\Delta}^2 +6r]Â
[/Tex]⇢ (1)
Also, f(x0) =[Tex]Â p(\Delta)^2 -q(\Delta) +rÂ
[/Tex].
f(x1) = Â r [since x1 = 0]
f(x2) =[Tex]Â p(\Delta)^2 +q(\Delta) +rÂ
[/Tex].
Now [Tex]f(x_0) +4f(x_1) +f(x_2) = [2p{\Delta}^2 +6r]Â
[/Tex]. ⇢  (2)
Compare (1) and (2),
[Tex]\int_{-\Delta}^{\Delta} (px^2 +qx+r)dx = f(x_0) +4f(x_1) +f(x_2)
[/Tex]
This means that, Area between x₀ and x₂ = f(x0​)+4f(x1​)+f(x2​)
Similarly we can find the area between the points x2 and x4. =  [Tex]\Delta/3 (f(xâ‚‚) + 4f(x₃) + f(xâ‚„))   Â
[/Tex].
We can now calculate the other areas in a similar way. Â Â Â Â Â Â
[Tex]\frac{\Delta}{3}[f(x_0)+4f(x_1)+2f(x_2)+4f(x_3)+…+2f(x_{n-2})+4f(x_{n-1})+f(x_n)]. Â
[/Tex]
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Â
 [Tex]\frac{M(b-a)^5}{180n^4}
[/Tex]
Here M>|f4(x)|
Related Articles:
Question 1: Find the integral [Tex]\int_{0}^{4} x^4 dxÂ
[/Tex]Â for n = 4.Â
Solution:Â
Here f(x) = x4, a = 0, b = 4 and n = 4, [Tex]\Delta=1Â
[/Tex].
By Simpson’s formula, [Tex]\int_{0}^{4} x^4dx =\frac{\Delta}{3}[0^4+4(1^4)+2(2^4)+4(3^4)+(4^4)]     Â
[/Tex].
= (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  [Tex]\int_{0}^{Ï€} cosx dxÂ
[/Tex]Â for n = 4
Solution:
 Here f(x) = cos x a = 0, b = Ï€, n = 4 and [Tex]\Delta =Ï€/4Â
[/Tex].
By Simpson’s formula [Tex]\int_{0}^{Ï€}cos(x)dx =\frac{\Delta}{3}[cos(0)+4cos(Ï€/4)+2cos(Ï€/2)+4cos(3Ï€/4)+cos(Ï€)]Â
[/Tex].
= 0/3 = 0.
Question 3: Solve for the integral [Tex]\int_{0}^{2} e^{x^3} dxÂ
[/Tex]Â for n = 2.
Solution:Â
Here f(x)=[Tex]Â e^{x^3}Â
[/Tex] , a = 0, b = 2, n = 2 and [Tex]\DeltaÂ
[/Tex]Â = 2 – 0/2 = 1.
Using Simpson’s formula [Tex]\int_{0}^{2}e^{x^3} dx= \frac{\Delta}{3}[e^{0^3}+4e^{1^3}+e^{2^3}]Â
[/Tex].
=[Tex]\frac{[e^0+4e^1+e^8]}{3}Â
[/Tex].
= 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 [Tex]\int_{e^2}^{2e^2} lnx dxÂ
[/Tex]Â where n = 4.
Solution:
Here f(x) = ln x, a= e2, b = 2e2, n = 4 and \Delta= \frac{e^2}{4}.
Applying the Simpson’s formula [Tex]\int_{e^2}^{2e^2}ln x dx =\frac{\Delta}{3}[ln(e^2)+4ln(\frac{5}{4}e^2)+2ln(\frac{3}{2}e^2)+4ln(\frac{7}{4}e^2)+ln(2e^2)]Â
[/Tex].
=[Tex]\frac{e^2}{12}Â
[/Tex][2 + 4ln5 – 4ln4 + 8 + 2ln3 – 2ln2 + 4 + 4ln7 – 4ln4 + 8 + 2ln2 + 4].
= 15.3159106.
Question 5: Find the integral [Tex] \int_{0}^{Ï€} sin^2 x dxÂ
[/Tex]Â where n = 4.
Solution:Â
Here f(x) = sin2x, a = 0, b = Ï€, n = 4 and [Tex]\DeltaÂ
[/Tex]= π/4.
Using Simpson’s formula [Tex]\int_{0}^{Ï€}sin^2(x)dx=\frac{Ï€/4}{3}[sin^2(0)+ 4sin^2(Ï€/4)+ 2sin^2(Ï€/2)+ 4sin^2(3Ï€/4) +sin^2(Ï€)]Â
[/Tex].
= π/12[2 + 2 + 2]
= π/2
Question 6: Integrate the function x cos x between the limits 0 to [Tex]\frac{\pi}{2}Â
[/Tex]Â using Simpson’s rule and check the accuracy by calculating the actual integral. (Take n = 4).
Solution:
We need to find the integral [Tex]\int_{0}^{\frac{\pi}{2}} x cos x dxÂ
[/Tex].
Using Simpson’s formula for n = 4.
[Tex]\int_{0}^{\frac{\pi}{2}}x cos(x)dx=\frac{Ï€/8}{3}[0 \times cos(0)+ 4 \times \frac{\pi}{8} cos(Ï€/8)+ 2 \times \frac{\pi}{4}(Ï€/4)+ 4 \times \frac{3 \pi}{8} cos(3Ï€/8) +\frac{\pi}{2}cos(Ï€/2)]Â
[/Tex]Â .
= 0.89
Now
[Tex]\int_{0}^{\frac{\pi}{2}} x cosx = x sinx +cosxÂ
[/Tex]Â .
[Tex]xsinx +cosx |_{0}^{\frac{\pi}{2}}Â
[/Tex].
=Â [Tex]\frac{\pi}{2}Â
[/Tex]Â – 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
[Tex]\int_{0}^{\frac{\pi}{2}}x cos(x)dx=\frac{Ï€/8}{3}[0 \times cos(0)+ 4 \times \frac{\pi}{8} cos(Ï€/8)+ 2 \times \frac{\pi}{4}(Ï€/4)+ 4 \times \frac{3 \pi}{8} cos(3Ï€/8) +\frac{\pi}{2}cos(Ï€/2)]Â
[/Tex]Â .
= 0.8879
Now let’s apply the Simpson’s rule on the same integral but this time for n=2
[Tex]\int_{0}^{\frac{\pi}{2}}x cos(x)dx=\frac{Ï€/4}{3}[0 \times cos(0)+ 4 \times \frac{\pi}{4} cos(Ï€/4)+ \frac{\pi}{2}cos(Ï€/2)]Â Â Â
[/Tex]Â .
=Â [Tex]\frac {\pi}{12} [\pi \times \sqrt 2]Â Â Â
[/Tex].
= 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.
- Find the integral  [Tex]\int_{0}^{3} x^2 dx[/Tex] using Simpson’s rule for n = 6.
- Calculate [Tex]\int_{1}^{5} e^x dx [/Tex] for n = 4.
- Evaluate [Tex]\int_{0}^{Ï€/2} sinx dx[/Tex]Â using Simpson’s rule with n = 4.
- Find [Tex]\int_{1}^{4} lnx dx[/Tex]Â for n = 4.
- Solve [Tex]\int_{0}^{2} x^3 dx[/Tex]Â using Simpson’s rule for n = 4.
- Calculate [Tex]\int_{0}^{1} 1/1+x^2 dx[/Tex]Â using n = 4.
- Evaluate [Tex]\int_{0}^{Ï€/4} tanx dx[/Tex]Â for n = 4.
- Find [Tex]\int_{0}^{1} e^-x^2 dx[/Tex]Â using Simpson’s rule for n = 4.
- Solve [Tex]\int_{0}^{3} cos^2x dx[/Tex]Â for n = 4.
- Calculate [Tex]\int_{1}^{3} 1/x dx[/Tex]Â using n = 4.
FAQs on Simpson’s Rule
What is Simpson’s Rule?
Simpson’s Rule is a method for numerical integration that approximates the value of a definite integral by using quadratic polynomials.
Why do we use Simpson’s Rule?
Simpson’s Rule is used because it provides a more accurate approximation of integrals compared to the trapezoidal and midpoint rules, especially for functions that can be well-approximately by quadratics.
What are the limitations of Simpson’s Rule?
Simpson’s Rule requires an even number of intervals (n must be even) and can be less accurate for functions that are not smooth or have high oscillations within the interval.
How do you choose the value of n in Simpson’s Rule?
The value of n should be even and is typically chosen based on the desired accuracy. A larger n provides a more accurate approximation but requires more computations.
Can Simpson’s Rule be used for improper integrals?
Simpson’s Rule is generally used for definite integrals with finite limits. For improper integrals, special techniques or transformations are required.
Similar Reads
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
7 min read
Simpson's Rule in MATLAB
Simpson’s 1/3 rule is a numerical method used for the evaluation of definite integrals. MATLAB does not provide an in-built function to find numerical integration using Simpson's rule. However, we can find that using the below formula. The formula for numerical integration using Simpson's rule is: w
2 min read
Snell's Law Formula
Snell's law explains the relationship between the angle of refraction, incidence, and the refractive law of indices for the specified media such as light, glass, and air. It asserts that the ratio of the sines of the angle of incidence 1 and angle of refraction 2 for a given set of media is equal to
4 min read
Reduction Formula
Reduction formula in mathematics is generally used for solving integration of higher order. Integration involving higher-order terms is difficult to handle and solve. So, to simplify the solving process of higher-order terms and get rid of the lengthy expression-solving process of higher-order degre
4 min read
Point Gradient Formula
A straight line in a cartesian plane passes through an infinite number of points. Each of these points has its own x and y- coordinates. The points a line passes through are used to find its slope. Not only that but such points can also be used to write the equation of a line. One such method is dis
4 min read
List of Physics Formulas
Physics is a fundamental branch of science that studies matter, its fundamental constituents, and its motion and behavior through space and time. Physics Formulas are very important during applications of various concepts of physics. In this article, we will cover all important formulas related to p
14 min read
Interpolation Formula
Interpolation formula is a method to find new values of any function using the set of available values through interpolation. It is an important statistical tool used to calculate the value between two points on the curve of a function from the given points which also lie on the same curve. In stati
9 min read
Heron's Formula
Heron's formula is a popular method for calculating the area of a triangle when the lengths of its three sides are known. It was introduced by Heron of Alexandria in his book "Metrica". This formula applies to all types of triangles, including right-angled, equilateral, and isosceles. According to t
9 min read
Vieta's Formula
Algebra is one of the basic topics of mathematics. Polynomials are an essential part of algebra. Vieta's formula is used in polynomials. This article is about Vieta's formula which relates the sum and product of roots to the coefficient of the polynomial. This formula is specifically used in algebra
6 min read
Real Life Applications of Simpsons Rules
Simpson's Rule is like a helpful tool in math that helps solve real-life problems. In this article, we'll talk about how Simpson's Rule is used in the real world. From figuring out stuff in engineering and finance to understanding things in environmental science. Simpson's Rule helps us do accurate
6 min read
Poiseuilles Law Formula
According to Poiseuille's law, the flow of liquid varies depending on the length of the tube, the radius of the tube, the pressure gradient and the viscosity of the fluid. It is a physical law that calculates the pressure drop in an incompressible Newtonian fluid flowing in laminar flow through a lo
4 min read
Product Rule Formula
Product rule is a fundamental principle in calculus used to differentiate the product of two functions. The rule states that the derivative of a product of two differentiable functions is given as, "product of first function with the derivative of second function added with differentiation of first
8 min read
Gas Pressure Formula
Gas Pressure Formula is P = (n/V)RT which is derived from the ideal gas law. This formula assumes that the gas behaves ideally, meaning it obeys the ideal gas law without considering factors such as intermolecular attractions. Gas pressure is the measure of force exerted by gas molecules in a specif
8 min read
Slope Formula
Slope formula is used to determine the steepness or inclination of a line. The x and y coordinates of the points lying on the line are used to calculate the slope of a line. The change in the "y" coordinate concerning the change in the "x" coordinates is called the slope of a line, and it is usually
7 min read
Integration Formulas
Integration Formulas are the basic formulas that are used to solve various integral problems. They are used to find the integration of algebraic expressions, trigonometric ratios, inverse trigonometric functions, and logarithmic and exponential functions. These integration formulas are very useful f
10 min read
Pressure Drop Formula
The pressure drop of a liquid is defined as the resistance shown by it when it is flowing through a pipe. It can be interpreted as the difference in pressure between two sites in a fluid-carrying network. It occurs due to the frictional force created by the resistance to flow acting on the fluid as
4 min read
Quotient Rule Formula
The quotient rule is a fundamental technique in calculus used to differentiate functions that are expressed as the ratio of two other functions. It's especially useful when dealing with more complex expressions that cannot be simplified easily before differentiation. Quotient Rule in CalculusIn calc
6 min read
Heat Load Formula
The heat load is the amount of heat energy that is expected to be injected into a specific space in order to keep the temperature within an acceptable range. The heat load is equal to the product of mass flow rate, specific heat constant and change in temperature. It is denoted by the symbol Q. Its
4 min read
Perfect Square Trinomial Formula
Perfect Square Trinomial is when a binomial is multiplied with itself it gives an expression which consists of three terms and this expression. Perfect square trinomials consist of variable as well as constant terms in their algebraic expression. It can be represented in the form of ax2 + bx +c wher
4 min read