0% found this document useful (0 votes)
1 views

Num.tech.for Engin.problems- Numerical Integration Class Notes

Uploaded by

can6199
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Num.tech.for Engin.problems- Numerical Integration Class Notes

Uploaded by

can6199
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

Numerical Integration

Dr.U.Oral Ünal
Introduction
Let us first recall the three most fundamental Newton-Cotes closed integration
formulas:
1. Trapezoidal Rule

2. Simpson’s Rule

3. Simpson’s Second Rule


Error Estimation and Richardson's Extrapolation
 Even when one has no information about high-order derivatives, it may be
possible to estimate the error if the integral is computed using two different
integration formulas with comparable degrees of precision.

 Let I* be the analytical solution and I1 and I2 the estimate of I* resulting from
the use of Simpson’s first and second rules.
 E1 and E2 are the corresponding error terms.

If ≅ This kind of approach in


which two
approximations to an
integral are used to get a
third approximation is
E2=4(I2-I1)/5 called Richardson's
extrapolation
Error Estimation and Richardson's Extrapolation
 In a similar manner one can estimate the integral and the associated error
for n applications of composite formula. For example, for the trapezoidal
rule:

𝑏−𝑎
ℎ=
𝑛

Substitution of this into the first equation leads to:

For n2=2n1 this becomes


En2=I*-In2=(In2-In1)/3
Error Estimation and Richardson's Extrapolation
For the Simpson’s rule the same approach would give:

And the error can be estimated as: En2=I*-In2=(16/15)In2 – (1/15) In1 – In2=(In2-In1)/15
Example
Let us evaluate the following integral

Let n1=2 and n2=4 and apply Trapezoidal rule


Repeated Interval-Halving and
Romberg Integration
Let us compute the estimate of an integral by using the composite trapezoidal
rule with 𝑛 = 2𝑁 . 𝑇𝑁,1 involves twice as many subintervals as 𝑇𝑁−1,1 .

The general recursion relation can be given as:

The error term corresponding to 𝑇𝑁,1 is:


Repeated Interval-Halving and
Romberg Integration
Let us now apply the Richardson's extrapolation technique to each pair of
adjacent elements in the sequence:

For example

 This is just the integral predicted by one


application of the Simpson’s rule!

The error term corresponding to 𝑇𝑁,2 is:


Repeated Interval-Halving and
Romberg Integration
The Richardson's extrapolation technique can now be applied to each pair of
adjacent elements in the sequence 𝑇0,2 … 𝑇𝑁,2 :

 Investigation of the new sequence shows that 𝑇𝑁,3 is the estimate of the
integral that would be computed by using the composite version of the five-
point Newton-Cotes closed formula!

The error term corresponding to 𝑇𝑁,3 is:

The general extrapolation formula is credited to Romberg:

The sequences TN,j for j>3 do not correspond to


composite rules for Newton-Cotes closed integration as
they do for j≤3.
Repeated Interval-Halving and
Romberg Integration
The Romberg sequences can be arranged in simple tabular for as follows:

The error term corresponding to 𝑇𝑁,𝑗 is:

k(j) is a constant that depends on a, b, j

Example:
Use the Romberg integration scheme to estimate the following integral:
Repeated Interval-Halving and
Romberg Integration

The true value is 4.92144


Gaussian Quadrature
will have a degree of precision m, if 𝐸 𝑥 𝑘 = 0 for
k=0,1, 2, … , m and 𝐸 𝑥 𝑚+1 ≠ 0 where E(f) =I(f)-
Example:

The error is:

should be satisfied. We have:


Gaussian Quadrature
Hence the coefficients may be determined:

The quadrature formula is:

Since the degree of precision is 2.

 Repeat the same exercise with

Can you guess the result?


Gauss-Legendre Quadrature
With the following transformation

The integral becomes,

Since the standard Gauss-Legendre quadrature is given by

the integral can be approximated by


Gauss-Legendre Quadrature
Gauss-Legendre Quadrature
Without proof, the error term for the Gauss-Legendre quadrature can be given
as

The Gauss-Legendre formulas are significantly more accurate than the equal-
interval formulas.

The approximations obtained for various functions:


Gauss-Legendre Quadrature
For comparison the approximations produced by Romberg
integration for :

Gauss-Legendre yields excellent results with less computational effort.


Gauss-Laguerre Quadrature
The Laguerre polynomials can be used to generate a Gaussian
quadrature formula to evaluate integrals of the form:
The first few Laguerre
polynomials are:

The error term is:


Gauss-Laguerre Quadrature
• Example:
Use Gauss-Laguerre quadrature to estimate Γ(1.8)

Since x0.8 is not a polynomial the


quadrature wil be inexact.

The true value is 0.931384


Gauss-Chebyshev Quadrature
It can be applied to the integrals of the following form:

The corresponding error term is:


Gauss-Hermite Quadrature
It can be applied to the integrals of the following form:

The corresponding error term is:


Improper Integrals
The integrals involving singularities

The integration over an infinite interval


Improper Integrals
- end-point singularities-
Let us analytically evaluate the integral

Hence the integral does exist

However, consider this case:

No numerical technique can handle this integral

Since the limit does not exist


Improper Integrals
- end-point singularities-
 A change of variable may help:

• For example:
Improper Integrals
- end-point singularities-
• Let us look at another example:

We have left end-point singularity

Now, any numerical method can be


applied

• Another example:

We have right end-point singularity

Now, any numerical method can be


applied
Improper Integrals
- end-point singularities-
• We have seen the Gauss-Chebyshev quadrature with both end points
singularities:

Change of variable:

The integral becomes:

Now, any numerical method can be applied.


Improper Integrals
- end-point singularities-
• For example:

Change of variable:

The integral becomes:

The composite trapezoidal rule with 16 subintervals gives 3.977464.


Improper Integrals
- end-point singularities-
• Integration by parts may also be helpful.
1
cos 𝑥
න 𝑑𝑥
0 𝑥

Now let us apply composite Simpsons’s rule for the remaining


integral.
Improper Integrals
- end-point singularities-
Improper Integrals
- end-point singularities-
 Successive integrations can also be performed to reach to an integration limit

If the integral for example has a singularity at x=0:

The integration steps can be taken as rn=2-n

The integration can be stopped when the following condition is satisfied:

Each integral should be evaluated with a particular accuracy. Romberg


integration may be, for instance, applied.
Improper Integrals
- singular point inside the interval -
 When there is a singular point inside the interval (a,b), it is necessary to split
the integral:

For example the following integral has a singularity at x=0.6

The two integrals with end-point singularities can be evaluated with the techniques
presented.
Improper Integrals
- singular point inside the interval -
 If the singularity is removable which means that the integrant has a limit at
the singularity point, the integral may be evaluated as it is:

There is a singularity at x=0. However the limit of the integrant is 1 at x=0. It


may be evaluated as
Improper Integrals
- Infinite Intervals-
 Gauss-Laguerre integration is useful for integrals over (0, ∞)
 One should transform the integral to the required form
Let us evaluate the following improper integral:

The exact value is

Transforming the integral

Gauss-Laguerre quadrature can be applied

The result is 1.64483 which corresponds to an absolute


error of approximately 10-4
Improper Integrals
- Infinite Intervals-
 Gauss-Laguerre quadrature can also be used to evaluate integrals of the form

By means of linear transformation x=z+a the integral becomes

The general formulation of the quadrature is:


Improper Integrals
- Infinite Intervals-
 Let us evaluate the following integral

The exact value is 5/e

The integral can be approximated by using linear transformation x=z+1

Referring to the related table:

I= 5/e

The result is exact, since f(x) is a polynomial of degree less than 2n+1 for all n
Improper Integrals
- Infinite Intervals-
 By using successive integrations an integration limit can be reached

The integration can be terminated when

The integration steps can be taken as rn=2n

Example:
Improper Integrals
- Infinite Intervals-

Normally, each integral should be


evaluated with a particular accuracy!
Improper Integrals
- Infinite Intervals-
 A change of variable can also be used for the integrals over (a, ∞)
for a >0

For example:

𝑥
න 𝑑𝑥
1 𝑒𝑥 − 1
Improper Integrals
- Infinite Intervals-
Multiple Integrals
The numerical evaluation of integrals of the following is considered
Multiple Integrals

Example:
Multiple Integrals

using the Simpson’s rule:

g(x) should also be evaluated. Once again with the Simpson’s rule:

Similarly:

The exact value could be obtained since the Simpson’s rule has a degree of
precision of 3.
Multiple Integrals
Now we consider the use of the Gauss-Legendre quadrature for the same integral

After the change of variable:

Let us define q:

By using two-point quadrature formula the integral becomes:

The components are to be calculated separately, once again using two-point formula:
Multiple Integrals
Similarly, the other term can be calculated

Hence:

Another example in which the limits are not constants:

then:
Multiple Integrals
By using the Simpsons rule the approximation is:

Similarly:

and hence:

which is equal to the analytical result.


Adaptive Quadrature
Length of the subintervals can adapt to local behaviour of the integrand. We will
try to find an approximation for the integral within a prescribed error tolerance.

Let us recall the mid-point rule:

Let M[α,β] denote the approximation obtained for the integral

Thus,

ℎ = (𝛽 − 𝛼)/2
Adaptive Quadrature
The error level is similar to that obtained for the trapezoidal rule:

Let us find an approximation for the following integral satisfying

Hence the approximation is not satisfied. Halving the interval we obtain:


Adaptive Quadrature

Proceeding similarly, finally:

Therefore 0.0480788 can be accepted as an approximation to I[0,0.125]

Calculation the acceptable approximation of the other subintervals we can find the
overall approximation for the integral I[0,1]

0.7519827

You might also like