What is Numerical Integration?

In a mathematical investigation, numerical integration comprises a wide group of calculations for computing the mathematical estimation of definite integral, and likewise, the term is moreover in some cases used to depict the numerical solution of differential equations. The most important aspect of this theory is error analysis.

Important Aspects of Numerical Integration

The term was coined in 1656, by the mathematician John Wallis in his series ‘Arithmetical Infinitorum’.

The term is abbreviated as quadrature. The set of techniques to execute the process of integration are grouped under Newton-Cotes formulas. The aim is to evaluate the integrand using midpoint, trapezoidal, and Simpson’s rule.

When do we use Numerical Integration?

  • Sometimes, we may find that the integrand is either regularly or irregularly spaced or some data values are missing when we are working on experimental data.
  • The upper or lower limit of integration is infinite. There are some points where the function is discontinuous.

How Numerical Integration is different from Analytical Integration?

  • The analytic integration is computed below,
0 1 x 5 dx = x 6 6 0 1 = 1 6

The motivation behind introducing the concept of mathematics is some integrals like 8 12 e x 3 dx .

  • Analytical integration always gives an exact answer whereas, numerical integration is an approximation of definite integral.
  • This only gives the approximate area under the curve.
  • The objective is to find the approximate area between the graph of continuous function and the x-axis.

Newton-Cotes Formula

We utilize the concept of interpolation in order to integrate the function and it is approximated by n th degree polynomial.

Consider a function f x that is approximated by a polynomial over a closed interval a,b .

a b f x dx a b a 0 + a 1 x++ a n x n dx

On further simplification we get,

a b f x dx = a 0 x+ a 1 x 2 2 ++ a n x n+1 n+1 a b = a 0 ba + a 1 b 2 a 2 2 ++ a n b n+1 a n+1 n+1

Euler’s Method

The Euler method (also known as the forward Euler method) is a first-order numerical technique for solving ODEs with a given initial value. It's the most fundamental explicit approach for numerically integrating ordinary differential equations.

We use Euler's Method to produce a numerical solution to a problem with an initial value of the form:

y'=f x,y

y x 0 = y 0

We decide on what interval we want to find the solution in, starting with the initial condition. This interval is divided into h-sized subdivisions. Then, using the iterative formulas, we produce the rest of the solution, beginning with the initial condition:

x n+1 = x n +h

y n+1 = y n +hf x n , y n

To determine the points' coordinates in our numerical solution when we hit the right end of the desired interval, we stop the process.

Techniques of Numerical Integration

Midpoint Rule

Let a function g x be defined on the closed and continuous interval a,b . We partition a,b in form of rectangles into n subintervals where the length of each subinterval is denoted by Δxand mathematically this length is expressed as Δx= ba n .

For an arbitrary i th interval if m i is the midpoint, then midpoint rule is expressed as,

M n = i=1 n g m i Δx

As the number of rectangles becomes large in number, that is n, the definite integral is expressed as:

lim n M n = a b g x dx

The definite error bound for the midpoint rule is expressed as:

M n M ba 3 24 n 2

Since we don’t use the endpoints of a,b in computing the value, this method is known as an open method.

Trapezoidal Rule

Let a function g x be defined on the closed and continuous interval a,b . We partition a,b in form of trapezoid into n subintervals where the length of each subinterval is denoted by Δxand mathematically this length is expressed as Δx= ba n .

We can label the points on the x-axis as P= x 0 , x 1 , x 2 ,, x n .

The area of a trapezoid is half times the sum of parallel side times the distance between them.

We can express the area of the first trapezoid as,

A 1 = Δx 2 g x 0 +g x 1

Similarly, the area of the second trapezoid is expressed as,

A 2 = Δx 2 g x 1 +g x 2

And continuing the pattern, the area of the n th trapezoid is expressed as,

A n = Δx 2 g x n1 +g x n

Summing up the area of all the trapezoids, the trapezoidal rule approximation is expressed as,

T n = Δx 2 g x 0 +2g x 1 +2g x 2 ++2g x n1 +g x n

As the number of trapezoids becomes large in number, that is n, the definite integral is expressed as,

lim n T n = a b g x dx

The expression that gives an error bound for the trapezoidal rule is provided below.

T n M ba 3 12 n 2

Here M is the maximum value of the second derivative of the function g x over a,b , that is M=max g'' x .

Let’s practice an example based on this methodology.

Problem 1:

The objective is to compute the area under the curve of the function g x = 1 2+x over 0,1 and partitioning 0,1 into four subintervals using trapezoidal rule approximation.

Answer: First, we partition 0,1 into four subintervals of equal length.

The length of each interval is expressed as Δx= ba n .

Substituting b as 1, a as 0, and n as 4 in the above expression,

Δx= 10 4 =0.25

Therefore, the partition is P= 0,0.25,0.5,0.75,1 .

The sub-intervals are: 0,0.25 , 0.25,0.5 , 0.5,0.75  and  0.75,1 .

Let y= 1 2+x . Construct a table of values by estimating the value of the function at the endpoints of the sub-intervals of 0,1 .

x00.250.50.751
y0.50.44440.40.36360.333

Applying the trapezoidal rule we have,

g x dx = Δx 2 y 0 +2 y 1 + y 2 + y 3 + y 4

= 0.25 2 0.5+2 0.4444+0.4+0.3636 +0.3333

= 0.25 2 0.5+2 1.2081 +0.3333

=0.4062

Thus, the approximate area under the curve of the function g x = 1 2+x using trapezoidal rule over 0,1 is 0.4062 square units.

Simpson’s One-Third Rule

Let a function g x be defined on the closed and continuous interval a,b . We partition this interval in form of piecewise quadratic functions into n subintervals where the length of each subinterval is denoted by Δxand mathematically this length is expressed as Δx= ba n .

Summing up the area of all the quadratic functions, Simpson’s one-third rule approximation is expressed as,

S n = Δx 3 f x 0 +4f x 1 +2f x 2 +4f x 3 ++2f x n2 +4f x n1 +f x n

Similarly, we can express Simpson’s three-eighth rule approximation as,

S n = 3Δx 8 f x 0 +3f x 1 +3f x 2 +2f x 3 ++3f x n2 +3f x n1 +f x n

As the number of quadratic functions becomes large in number, that is n, the definite integral is expressed as,

lim n S n = a b g x dx

The expression that gives an error bound for Simpson’s rule is provided below.

S n M ba 5 180 n 4

Here M is the maximum value of the fourth derivative of the function g x over a,b , that is M=max g 4 x .

Since we use the endpoints of the interval in computing the value, this method is known as a closed method.

Problem 2:

The objective is to compute the area under the curve of the function g x = 1 x 2 +2x+3 over 0,1 and partitioning the interval into four subintervals using Simpson’s one-third rule approximation.

Answer: First we partition the interval 0,1 into four subintervals of equal length.

The length of each interval is expressed as Δx= ba n .

Substituting b as 1, a as 0, and n as 4 in the above expression,

Δx= 10 4 =0.25

Therefore, the 0,1 is partitioned as P= 0,0.25,0.5,0.75,1 .

The sub-intervals are: 0,0.25 , 0.25,0.5 , 0.5,0.75  and  0.75,1 .

Let g x = 1 x 2 +2x+3 . Construct a table of values by estimating the value of the function at the endpoints of the sub-intervals of 0,1 .

x00.250.50.751
y0.33330.28070.23530.19750.1667

Applying Simpson’s rule we have,

g x dx = Δx 3 y 0 +2 y 2 +4 y 1 + y 3 + y 4

= 0.25 2 0.3333+2 0.2353 +4 0.2807+0.1975 +0.1667

=0.2403

Thus, the approximate area under the curve of the function g x = 1 x 2 +2x+3 over 0,1 is 0.2403square units.

Problem 3:

The objective is to compute the area under the curve of the function g x =3 x 3 5x+1 over the interval 2,4 and partitioning it into four subintervals using Simpson’s three-eighth rule approximation.

Answer: First, we partition 2,4 into four sub-intervals of equal length.

The length of each interval is expressed as Δx= ba n .

Substituting b as 4, a as 2, and n as 4 in the above expression,

Δx= 42 4 =0.5

Therefore, the interval 2,4 is partitioned as P= 2,2.5,3,3.5,4 .

The sub-intervals are: 2,2.5 , 2.5,3 , 3,3.5  and  3.5,4 .

Let g x =3 x 3 5x+1. Construct a table of values by estimating the value of the function at the endpoints of the sub-intervals of 2,4 .

x22.533.54
y1535.37567112.125173

Applying the Simpson’s three-eighth rule we have,

g x dx = 3Δx 8 y 0 +2 y 3 +3 y 1 + y 2 + y 4

= 3 0.5 8 15+2 112.125 +3 35.375+67 +173

=134.8828

Thus, the approximate area under the curve of the function g x =3 x 3 5x+1 over 2,4 is 134.8828 square units.

Formulas

  • Newton-Cotes formula for the approximation of a function by a polynomial:

a b f x dx a b a 0 + a 1 x++ a n x n dx

  • The trapezoidal rule approximation for a function g x on the interval a,b is evaluated as:

T n = Δx 2 g x 0 +2g x 1 +2g x 2 ++2g x n1 +g x n , where lim n T n = a b g x dx .

  • The Simpson’s one third rule approximation for a function g x on the interval a,b is evaluated as:

S n = Δx 3 f x 0 +4f x 1 +2f x 2 +4f x 3 ++2f x n2 +4f x n1 +f x n , where lim n S n = a b g x dx .

  • The length of each of the sub-intervals is evaluated as: Δx= ba n , where a and b are the endpoints of the original interval and n is the number of partitions.

Context and Applications

The demand for the techniques of this field is very high because of the high-tech software available to compute them. We can convert the real-life problem into mathematical expression and apply the techniques of numerical integration for better results to the problems.

  • One of the first applications of integration was in determining the volume of wine casks (with curved surfaces). Other applications of integration include finding areas under curved surfaces, finding centers of mass, displacement and velocity, and fluid flow.
  • In Geology, to estimate the volume of hydrocarbon reservoirs that are in form of close structural traps the techniques of this field of mathematics are used.
  • The main goal of meteorological stations is to create a framework that allows for effective climate change monitoring. The mathematical investigation using these techniques is of utmost importance.

Practice Problem

Question: Compute the approximate value at x=0.5for the differential equation y'=5x+2y with step size as 0.1 and initial condition y 0 =3 using Euler method approximation.

Solution: The objective is to estimate the value of y 0.5 .

We are provided that f x,y =5x+2y and h=0.1. Applying the Euler method:

The first iteration is,

y 1 = y 0 +hf x 0 , y 0

=3+0.1f 0,3

=3+0.1 6

=3.6

Second iteration:

y 2 = y 1 +hf x 1 , y 1

=3.6+0.1f 0.1,3.6

=3.6+0.1 7.7

=4.37

Third iteration:

y 3 = y 2 +hf x 2 , y 2

=4.37+0.1f 0.2,4.37

=4.37+0.1 9.74

=5.34

Fourth iteration:

y 4 = y 3 +hf x 3 , y 3

=5.34+0.1f 0.3,5.34

=5.34+0.1 12.19

=6.56

Fifth iteration:

y 5 = y 4 +hf x 4 , y 4

=6.56+0.1f 0.4,6.56

=6.56+0.1 15.13

=8.08

Thus, the value at x=0.5 is 8.08 that is y 0.5 =8.08.

Want more help with your calculus homework?

We've got you covered with step-by-step solutions to millions of textbook problems, subject matter experts on standby 24/7 when you're stumped, and more.
Check out a sample calculus Q&A solution here!

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.

Search. Solve. Succeed!

Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.

Tagged in
MathCalculus

Integration

Numerical Integration

Numerical Integration Homework Questions from Fellow Students

Browse our recently answered Numerical Integration homework questions.

Search. Solve. Succeed!

Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.

Tagged in
MathCalculus

Integration

Numerical Integration