22.07.2013 Views

Trapezoidal Rule Integration

Trapezoidal Rule Integration

Trapezoidal Rule Integration

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Integration</strong><br />

Topic: <strong>Trapezoidal</strong> <strong>Rule</strong><br />

Major: General Engineering<br />

Author: Autar Kaw, Charlie Barker<br />

http://numericalmethods.eng.usf.edu 1


<strong>Integration</strong>:<br />

The process of measuring<br />

the area under a function<br />

plotted on a graph.<br />

Where:<br />

f(x) is the integrand<br />

a= lower limit of integration<br />

b= upper limit of integration<br />

2<br />

What is <strong>Integration</strong><br />

http://<br />

numericalmethods.eng.usf.edu


3<br />

Basis of <strong>Trapezoidal</strong> <strong>Rule</strong><br />

<strong>Trapezoidal</strong> <strong>Rule</strong> is based on the Newton-Cotes<br />

Formula that states if one can approximate the<br />

integrand as an n th order polynomial…<br />

and<br />

where<br />

http://<br />

numericalmethods.eng.usf.edu


4<br />

Basis of <strong>Trapezoidal</strong> <strong>Rule</strong><br />

Then the integral of that function is approximated<br />

by the integral of that n th order polynomial.<br />

<strong>Trapezoidal</strong> <strong>Rule</strong> assumes n=1, that is, the area<br />

under the linear polynomial,<br />

http://<br />

numericalmethods.eng.usf.edu


Derivation of the <strong>Trapezoidal</strong> <strong>Rule</strong><br />

5<br />

http://<br />

numericalmethods.eng.usf.edu


6<br />

Method Derived From Geometry<br />

The area under the<br />

curve is a trapezoid.<br />

The integral<br />

http://<br />

numericalmethods.eng.usf.edu


7<br />

Example 1<br />

The vertical distance covered by a rocket from t=8 to<br />

t=30 seconds is given by:<br />

a) Use single segment <strong>Trapezoidal</strong> rule to find the distance covered.<br />

b) Find the true error, for part (a).<br />

c) Find the absolute relative true error, for part (a).<br />

http://<br />

numericalmethods.eng.usf.edu


a)<br />

8<br />

Solution<br />

http://<br />

numericalmethods.eng.usf.edu


a)<br />

9<br />

Solution (cont)<br />

b) The exact value of the above integral is<br />

http://<br />

numericalmethods.eng.usf.edu


)<br />

10<br />

Solution (cont)<br />

c) The absolute relative true error, , would be<br />

http://<br />

numericalmethods.eng.usf.edu


11<br />

Multiple Segment <strong>Trapezoidal</strong> <strong>Rule</strong><br />

In Example 1, the true error using single segment trapezoidal rule was<br />

large. We can divide the interval [8,30] into [8,19] and [19,30] intervals<br />

and apply <strong>Trapezoidal</strong> rule over each segment.<br />

http://<br />

numericalmethods.eng.usf.edu


Hence:<br />

12<br />

With<br />

Multiple Segment <strong>Trapezoidal</strong> <strong>Rule</strong><br />

http://<br />

numericalmethods.eng.usf.edu


13<br />

Multiple Segment <strong>Trapezoidal</strong> <strong>Rule</strong><br />

The true error is:<br />

The true error now is reduced from -807 m to -205 m.<br />

Extending this procedure to divide the interval into equal<br />

segments to apply the <strong>Trapezoidal</strong> rule; the sum of the<br />

results obtained for each segment is the approximate<br />

value of the integral.<br />

http://<br />

numericalmethods.eng.usf.edu


14<br />

Multiple Segment <strong>Trapezoidal</strong> <strong>Rule</strong><br />

Divide into equal segments<br />

as shown in Figure 4. Then<br />

the width of each segment is:<br />

The integral I is:<br />

Figure 4: Multiple (n=4) Segment <strong>Trapezoidal</strong> <strong>Rule</strong><br />

http://<br />

numericalmethods.eng.usf.edu


15<br />

Multiple Segment <strong>Trapezoidal</strong> <strong>Rule</strong><br />

The integral I can be broken into h integrals as:<br />

Applying <strong>Trapezoidal</strong> rule on each segment gives:<br />

http://<br />

numericalmethods.eng.usf.edu


16<br />

Example 2<br />

The vertical distance covered by a rocket from to seconds is<br />

given by:<br />

a) Use two-segment <strong>Trapezoidal</strong> rule to find the distance covered.<br />

b) Find the true error, for part (a).<br />

c) Find the absolute relative true error, for part (a).<br />

http://<br />

numericalmethods.eng.usf.edu


17<br />

Solution<br />

a) The solution using 2-segment <strong>Trapezoidal</strong> rule is<br />

http://<br />

numericalmethods.eng.usf.edu


18<br />

Then:<br />

Solution (cont)<br />

http://<br />

numericalmethods.eng.usf.edu


19<br />

Solution (cont)<br />

b) The exact value of the above integral is<br />

so the true error is<br />

http://<br />

numericalmethods.eng.usf.edu


20<br />

Solution (cont)<br />

c) The absolute relative true error, , would be<br />

http://<br />

numericalmethods.eng.usf.edu


Table 1 gives the values<br />

obtained using multiple<br />

segment <strong>Trapezoidal</strong> rule<br />

for:<br />

21<br />

Solution (cont)<br />

n Value E t<br />

1 11868 -807 7.296 ---<br />

2 11266 -205 1.853 5.343<br />

3 11153 -91.4 0.8265 1.019<br />

4 11113 -51.5 0.4655 0.3594<br />

5 11094 -33.0 0.2981 0.1669<br />

6 11084 -22.9 0.2070 0.09082<br />

7 11078 -16.8 0.1521 0.05482<br />

8 11074 -12.9 0.1165 0.03560<br />

Table 1: Multiple Segment <strong>Trapezoidal</strong> <strong>Rule</strong> Values<br />

http://<br />

numericalmethods.eng.usf.edu


.<br />

22<br />

Example 3<br />

Use Multiple Segment <strong>Trapezoidal</strong> <strong>Rule</strong> to find<br />

the area under the curve<br />

from<br />

Using two segments, we get and<br />

to<br />

http://<br />

numericalmethods.eng.usf.edu


23<br />

Then:<br />

Solution<br />

http://<br />

numericalmethods.eng.usf.edu


24<br />

Solution (cont)<br />

So what is the true value of this integral?<br />

Making the absolute relative true error:<br />

http://<br />

numericalmethods.eng.usf.edu


25<br />

Solution (cont)<br />

Table 2: Values obtained using Multiple Segment<br />

<strong>Trapezoidal</strong> <strong>Rule</strong> for:<br />

n Approximate<br />

Value<br />

1 0.681 245.91 99.724%<br />

2 50.535 196.05 79.505%<br />

4 170.61 75.978 30.812%<br />

8 227.04 19.546 7.927%<br />

16 241.70 4.887 1.982%<br />

32 245.37 1.222 0.495%<br />

64 246.28 0.305 0.124%<br />

http://<br />

numericalmethods.eng.usf.edu


26<br />

Error in Multiple Segment<br />

<strong>Trapezoidal</strong> <strong>Rule</strong><br />

The true error for a single segment <strong>Trapezoidal</strong> rule is given by:<br />

where is some point in<br />

What is the error, then in the multiple segment <strong>Trapezoidal</strong> rule? It will<br />

be simply the sum of the errors from each segment, where the error in<br />

each segment is that of the single segment <strong>Trapezoidal</strong> rule.<br />

The error in each segment is<br />

http://<br />

numericalmethods.eng.usf.edu


Similarly:<br />

It then follows that:<br />

27<br />

Error in Multiple Segment<br />

<strong>Trapezoidal</strong> <strong>Rule</strong><br />

http://<br />

numericalmethods.eng.usf.edu


.<br />

28<br />

Error in Multiple Segment<br />

<strong>Trapezoidal</strong> <strong>Rule</strong><br />

Hence the total error in multiple segment <strong>Trapezoidal</strong> rule is<br />

The term<br />

Hence:<br />

is an approximate average value of the<br />

http://<br />

numericalmethods.eng.usf.edu


Below is the table for the integral<br />

29<br />

Error in Multiple Segment<br />

<strong>Trapezoidal</strong> <strong>Rule</strong><br />

as a function of the number of segments. You can visualize that as the number<br />

of segments are doubled, the true error gets approximately quartered.<br />

n Value<br />

2 11266 -205 1.854 5.343<br />

4 11113 -51.5 0.4655 0.3594<br />

8 11074 -12.9 0.1165 0.03560<br />

16 11065 -3.22 0.02913 0.00401<br />

http://<br />

numericalmethods.eng.usf.edu


<strong>Integration</strong><br />

Topic: Simpson’s 1/3 rd <strong>Rule</strong><br />

Major: General Engineering<br />

http://numericalmethods.eng.usf.edu 30


31<br />

Basis of Simpson’s 1/3 rd <strong>Rule</strong><br />

<strong>Trapezoidal</strong> rule was based on approximating the integrand by a first<br />

order polynomial, and then integrating the polynomial in the interval of<br />

integration. Simpson’s 1/3rd rule is an extension of <strong>Trapezoidal</strong> rule<br />

where the integrand is approximated by a second order polynomial.<br />

Hence<br />

Where is a second order polynomial.<br />

http://<br />

numericalmethods.eng.usf.edu


32<br />

Basis of Simpson’s 1/3 rd <strong>Rule</strong><br />

Choose<br />

and<br />

as the three points of the function to evaluate a 0 , a 1 and a 2 .<br />

http://<br />

numericalmethods.eng.usf.edu


33<br />

Basis of Simpson’s 1/3 rd <strong>Rule</strong><br />

Solving the previous equations for a 0 , a 1 and a 2 give<br />

http://<br />

numericalmethods.eng.usf.edu


34<br />

Then<br />

Basis of Simpson’s 1/3 rd <strong>Rule</strong><br />

http://<br />

numericalmethods.eng.usf.edu


35<br />

Basis of Simpson’s 1/3 rd <strong>Rule</strong><br />

Substituting values of a 0 , a 1 , a 2 give<br />

Since for Simpson’s 1/3rd <strong>Rule</strong>, the interval [a, b] is broken<br />

into 2 segments, the segment width<br />

http://<br />

numericalmethods.eng.usf.edu


Hence<br />

36<br />

Basis of Simpson’s 1/3 rd <strong>Rule</strong><br />

Because the above form has 1/3 in its formula, it is called Simpson’s 1/3rd <strong>Rule</strong>.<br />

http://<br />

numericalmethods.eng.usf.edu


37<br />

Example 1<br />

The distance covered by a rocket from t=8 to t=30 is given by<br />

a) Use Simpson’s 1/3rd <strong>Rule</strong> to find the approximate value of x<br />

b) Find the true error,<br />

c) Find the absolute relative true error,<br />

http://<br />

numericalmethods.eng.usf.edu


a)<br />

38<br />

Solution<br />

http://<br />

numericalmethods.eng.usf.edu


39<br />

Solution (cont)<br />

b) The exact value of the above integral is<br />

True Error<br />

http://<br />

numericalmethods.eng.usf.edu


40<br />

a)c) Absolute relative true error,<br />

Solution (cont)<br />

http://<br />

numericalmethods.eng.usf.edu


41<br />

Multiple Segment Simpson’s<br />

1/3rd <strong>Rule</strong><br />

http://<br />

numericalmethods.eng.usf.edu


42<br />

Multiple Segment Simpson’s 1/3 rd<br />

<strong>Rule</strong><br />

Just like in multiple segment <strong>Trapezoidal</strong> <strong>Rule</strong>, one can subdivide the interval<br />

[a, b] into n segments and apply Simpson’s 1/3rd <strong>Rule</strong> repeatedly over<br />

every two segments. Note that n needs to be even. Divide interval<br />

[a, b] into equal segments, hence the segment width<br />

where<br />

http://<br />

numericalmethods.eng.usf.edu


.<br />

.<br />

43<br />

Multiple Segment Simpson’s 1/3 rd<br />

<strong>Rule</strong><br />

Apply Simpson’s 1/3rd <strong>Rule</strong> over each interval,<br />

f(x)<br />

. . .<br />

x 0 x 2 x n-2 x n<br />

http://<br />

numericalmethods.eng.usf.edu<br />

x


Since<br />

44<br />

Multiple Segment Simpson’s 1/3 rd<br />

<strong>Rule</strong><br />

http://<br />

numericalmethods.eng.usf.edu


Then<br />

45<br />

Multiple Segment Simpson’s 1/3 rd<br />

<strong>Rule</strong><br />

http://<br />

numericalmethods.eng.usf.edu


46<br />

Multiple Segment Simpson’s 1/3 rd<br />

<strong>Rule</strong><br />

http://<br />

numericalmethods.eng.usf.edu


47<br />

Example 2<br />

Use 4-segment Simpson’s 1/3rd <strong>Rule</strong> to approximate the distance<br />

covered by a rocket from t= 8 to t=30 as given by<br />

a) Use four segment Simpson’s 1/3rd <strong>Rule</strong> to find the approximate<br />

value of x.<br />

b) Find the true error, for part (a).<br />

c) Find the absolute relative true error, for part (a).<br />

http://<br />

numericalmethods.eng.usf.edu


a)<br />

48<br />

Solution<br />

Using n segment Simpson’s 1/3rd <strong>Rule</strong>,<br />

So<br />

http://<br />

numericalmethods.eng.usf.edu


49<br />

Solution (cont.)<br />

http://<br />

numericalmethods.eng.usf.edu


cont.<br />

50<br />

Solution (cont.)<br />

http://<br />

numericalmethods.eng.usf.edu


)<br />

c)<br />

51<br />

In this case, the true error is<br />

The absolute relative true error<br />

Solution (cont.)<br />

http://<br />

numericalmethods.eng.usf.edu


52<br />

Solution (cont.)<br />

Table 1: Values of Simpson’s 1/3rd <strong>Rule</strong> for Example 2 with multiple segments<br />

n Approximate Value E t |Є t |<br />

2<br />

4<br />

6<br />

8<br />

10<br />

11065.72<br />

11061.64<br />

11061.40<br />

11061.35<br />

11061.34<br />

4.38<br />

0.30<br />

0.06<br />

0.01<br />

0.00<br />

0.0396%<br />

0.0027%<br />

0.0005%<br />

0.0001%<br />

0.0000%<br />

http://<br />

numericalmethods.eng.usf.edu


53<br />

Error in the Multiple Segment<br />

Simpson’s 1/3 rd <strong>Rule</strong><br />

The true error in a single application of Simpson’s 1/3rd <strong>Rule</strong> is given as<br />

In Multiple Segment Simpson’s 1/3rd <strong>Rule</strong>, the error is the sum of the errors<br />

in each application of Simpson’s 1/3rd <strong>Rule</strong>. The error in n segment Simpson’s<br />

1/3rd <strong>Rule</strong> is given by<br />

http://<br />

numericalmethods.eng.usf.edu


54<br />

Error in the Multiple Segment<br />

Simpson’s 1/3 rd <strong>Rule</strong><br />

.<br />

.<br />

.<br />

http://<br />

numericalmethods.eng.usf.edu


55<br />

Error in the Multiple Segment<br />

Simpson’s 1/3 rd <strong>Rule</strong><br />

Hence, the total error in Multiple Segment Simpson’s 1/3rd <strong>Rule</strong> is<br />

http://<br />

numericalmethods.eng.usf.edu


56<br />

Error in the Multiple Segment<br />

Simpson’s 1/3 rd <strong>Rule</strong><br />

The term is an approximate average value of<br />

Hence<br />

where<br />

http://<br />

numericalmethods.eng.usf.edu


<strong>Integration</strong><br />

Topic: Romberg <strong>Rule</strong><br />

Major: General Engineering<br />

http://numericalmethods.eng.usf.edu 57


58<br />

What is The Romberg <strong>Rule</strong>?<br />

Romberg <strong>Integration</strong> is an extrapolation formula of<br />

the <strong>Trapezoidal</strong> <strong>Rule</strong> for integration. It provides a<br />

better approximation of the integral by reducing the<br />

True Error.<br />

http://<br />

numericalmethods.eng.usf.edu


59<br />

Error in Multiple Segment<br />

<strong>Trapezoidal</strong> <strong>Rule</strong><br />

The true error in a multiple segment <strong>Trapezoidal</strong><br />

<strong>Rule</strong> with n segments for an integral<br />

Is given by<br />

where for each i, is a point somewhere in the<br />

domain , .<br />

http://<br />

numericalmethods.eng.usf.edu


60<br />

Error in Multiple Segment<br />

<strong>Trapezoidal</strong> <strong>Rule</strong><br />

The term can be viewed as an<br />

approximate average value of in .<br />

This leads us to say that the true error, E t<br />

previously defined can be approximated as<br />

http://<br />

numericalmethods.eng.usf.edu


Table 1 shows the results<br />

obtained for the integral<br />

using multiple segment<br />

<strong>Trapezoidal</strong> rule for<br />

61<br />

Error in Multiple Segment<br />

<strong>Trapezoidal</strong> <strong>Rule</strong><br />

n Value E t<br />

1 11868 807 7.296 ---<br />

2 11266 205 1.854 5.343<br />

3 11153 91.4 0.8265 1.019<br />

4 11113 51.5 0.4655 0.3594<br />

5 11094 33.0 0.2981 0.1669<br />

6 11084 22.9 0.2070 0.09082<br />

7 11078 16.8 0.1521 0.05482<br />

8 11074 12.9 0.1165 0.03560<br />

Table 1: Multiple Segment <strong>Trapezoidal</strong> <strong>Rule</strong> Values<br />

http://<br />

numericalmethods.eng.usf.edu


62<br />

Error in Multiple Segment<br />

<strong>Trapezoidal</strong> <strong>Rule</strong><br />

The true error gets approximately quartered as<br />

the number of segments is doubled. This<br />

information is used to get a better approximation<br />

of the integral, and is the basis of Richardson’s<br />

extrapolation.<br />

http://<br />

numericalmethods.eng.usf.edu


63<br />

Richardson’s Extrapolation for<br />

<strong>Trapezoidal</strong> <strong>Rule</strong><br />

The true error, in the n-segment <strong>Trapezoidal</strong> rule<br />

is estimated as<br />

where C is an approximate constant of<br />

proportionality. Since<br />

Where TV = true value and = approx. value<br />

http://<br />

numericalmethods.eng.usf.edu


64<br />

Richardson’s Extrapolation for<br />

<strong>Trapezoidal</strong> <strong>Rule</strong><br />

From the previous development, it can be shown<br />

that<br />

when the segment size is doubled and that<br />

which is Richardson’s Extrapolation.<br />

http://<br />

numericalmethods.eng.usf.edu


65<br />

Example 1<br />

The vertical distance covered by a rocket from 8 to 30<br />

seconds is given by<br />

a) Use Richardson’s rule to find the distance covered.<br />

Use the 2-segment and 4-segment <strong>Trapezoidal</strong><br />

rule results given in Table 1.<br />

b) Find the true error, E t for part (a).<br />

c) Find the absolute relative true error, for part (a).<br />

http://<br />

numericalmethods.eng.usf.edu


a)<br />

66<br />

Solution<br />

Using Richardson’s extrapolation formula<br />

for <strong>Trapezoidal</strong> rule<br />

and choosing n=2,<br />

http://<br />

numericalmethods.eng.usf.edu


Hence<br />

67<br />

Solution (cont.)<br />

b) The exact value of the above integral is<br />

http://<br />

numericalmethods.eng.usf.edu


68<br />

Solution (cont.)<br />

c) The absolute relative true error would then be<br />

Table 2 shows the Richardson’s extrapolation<br />

results using 1, 2, 4, 8 segments. Results are<br />

compared with those of <strong>Trapezoidal</strong> rule.<br />

.<br />

http://<br />

numericalmethods.eng.usf.edu


.<br />

69<br />

Solution (cont.)<br />

Table 2: The values obtained using Richardson’s<br />

extrapolation formula for <strong>Trapezoidal</strong> rule for<br />

n <strong>Trapezoidal</strong><br />

<strong>Rule</strong><br />

1<br />

2<br />

4<br />

8<br />

11868<br />

11266<br />

11113<br />

11074<br />

for <strong>Trapezoidal</strong><br />

<strong>Rule</strong><br />

7.296<br />

1.854<br />

0.4655<br />

0.1165<br />

Richardson’s<br />

Extrapolation<br />

--<br />

11065<br />

11062<br />

11061<br />

Table 2: Richardson’s Extrapolation Values<br />

for Richardson’s<br />

Extrapolation<br />

--<br />

0.03616<br />

0.009041<br />

0.0000<br />

http://<br />

numericalmethods.eng.usf.edu


70<br />

Romberg <strong>Integration</strong><br />

Romberg integration is same as Richardson’s<br />

extrapolation formula as given previously. However,<br />

Romberg used a recursive algorithm for the<br />

extrapolation. Recall<br />

This can alternately be written as<br />

http://<br />

numericalmethods.eng.usf.edu


Note that the variable TV is replaced by as the<br />

value obtained using Richardson’s extrapolation formula.<br />

Note also that the sign is replaced by = sign.<br />

Hence the estimate of the true value now is<br />

71<br />

Romberg <strong>Integration</strong><br />

Where Ch 4 is an approximation of the true error.<br />

http://<br />

numericalmethods.eng.usf.edu


72<br />

Romberg <strong>Integration</strong><br />

Determine another integral value with further halving<br />

the step size (doubling the number of segments),<br />

It follows from the two previous expressions<br />

that the true value TV can be written as<br />

http://<br />

numericalmethods.eng.usf.edu


73<br />

Romberg <strong>Integration</strong><br />

A general expression for Romberg integration can be<br />

written as<br />

The index k represents the order of extrapolation.<br />

k=1 represents the values obtained from the regular<br />

<strong>Trapezoidal</strong> rule, k=2 represents values obtained using the<br />

true estimate as O(h 2 ). The index j represents the more and<br />

less accurate estimate of the integral.<br />

http://<br />

numericalmethods.eng.usf.edu


74<br />

Example 2<br />

The vertical distance covered by a rocket from<br />

to seconds is given by<br />

Use Romberg’s rule to find the distance covered. Use<br />

the 1, 2, 4, and 8-segment <strong>Trapezoidal</strong> rule results as<br />

given in the Table 1.<br />

http://<br />

numericalmethods.eng.usf.edu


75<br />

Solution<br />

From Table 1, the needed values from original<br />

<strong>Trapezoidal</strong> rule are<br />

where the above four values correspond to using 1, 2,<br />

4 and 8 segment <strong>Trapezoidal</strong> rule, respectively.<br />

http://<br />

numericalmethods.eng.usf.edu


Similarly,<br />

76<br />

Solution (cont.)<br />

To get the first order extrapolation values,<br />

http://<br />

numericalmethods.eng.usf.edu


77<br />

Solution (cont.)<br />

For the second order extrapolation values,<br />

Similarly,<br />

http://<br />

numericalmethods.eng.usf.edu


78<br />

Solution (cont.)<br />

For the third order extrapolation values,<br />

Table 3 shows these increased correct values in a tree<br />

graph.<br />

http://<br />

numericalmethods.eng.usf.edu


79<br />

Solution (cont.)<br />

Table 3: Improved estimates of the integral value using Romberg <strong>Integration</strong><br />

1-segment<br />

2-segment<br />

4-segment<br />

8-segment<br />

11868<br />

1126<br />

11113<br />

11074<br />

First Order Second Order Third Order<br />

11065<br />

11062<br />

11061<br />

11062<br />

11061<br />

11061<br />

http://<br />

numericalmethods.eng.usf.edu


<strong>Integration</strong><br />

Topic: Gauss Quadrature <strong>Rule</strong> of<br />

<strong>Integration</strong><br />

Major: General Engineering<br />

http://numericalmethods.eng.usf.edu 80


Two-Point Gaussian<br />

Quadrature <strong>Rule</strong><br />

http://numericalmethods.eng.usf.edu 81


82<br />

Basis of the Gaussian<br />

Quadrature <strong>Rule</strong><br />

Previously, the <strong>Trapezoidal</strong> <strong>Rule</strong> was developed by the method<br />

of undetermined coefficients. The result of that development is<br />

summarized below.<br />

http://<br />

numericalmethods.eng.usf.edu


83<br />

Basis of the Gaussian<br />

Quadrature <strong>Rule</strong><br />

The two-point Gauss Quadrature <strong>Rule</strong> is an extension of the<br />

<strong>Trapezoidal</strong> <strong>Rule</strong> approximation where the arguments of the<br />

function are not predetermined as a and b but as unknowns<br />

x 1 and x 2 . In the two-point Gauss Quadrature <strong>Rule</strong>, the<br />

integral is approximated as<br />

http://<br />

numericalmethods.eng.usf.edu


84<br />

Basis of the Gaussian<br />

Quadrature <strong>Rule</strong><br />

The four unknowns x 1 , x 2 , c 1 and c 2 are found by assuming that<br />

the formula gives exact results for integrating a general third<br />

order polynomial,<br />

Hence<br />

http://<br />

numericalmethods.eng.usf.edu


It follows that<br />

85<br />

Basis of the Gaussian<br />

Quadrature <strong>Rule</strong><br />

Equating Equations the two previous two expressions yield<br />

http://<br />

numericalmethods.eng.usf.edu


86<br />

Basis of the Gaussian<br />

Quadrature <strong>Rule</strong><br />

Since the constants a 0 , a 1 , a 2 , a 3 are arbitrary<br />

http://<br />

numericalmethods.eng.usf.edu


87<br />

Basis of Gauss Quadrature<br />

The previous four simultaneous nonlinear Equations have<br />

only one acceptable solution,<br />

http://<br />

numericalmethods.eng.usf.edu


88<br />

Basis of Gauss Quadrature<br />

Hence Two-Point Gaussian Quadrature <strong>Rule</strong><br />

http://<br />

numericalmethods.eng.usf.edu


Higher Point Gaussian<br />

Quadrature Formulas<br />

http://numericalmethods.eng.usf.edu 89


90<br />

Higher Point Gaussian Quadrature<br />

Formulas<br />

is called the three-point Gauss Quadrature <strong>Rule</strong>.<br />

The coefficients c 1 , c 2 , and c 3 , and the functional arguments x 1 , x 2 , and x 3<br />

are calculated by assuming the formula gives exact expressions for<br />

integrating a fifth order polynomial<br />

General n-point rules would approximate the integral<br />

http://<br />

numericalmethods.eng.usf.edu


91<br />

Arguments and Weighing Factors<br />

for n-point Gauss Quadrature<br />

In handbooks, coefficients and<br />

arguments given for n-point<br />

Gauss Quadrature <strong>Rule</strong> are<br />

given for integrals<br />

as shown in Table 1.<br />

Formulas<br />

Table 1: Weighting factors c and function<br />

arguments x used in Gauss Quadrature<br />

Formulas.<br />

Points Weighting<br />

Factors<br />

2 c 1 = 1.000000000<br />

c 2 = 1.000000000<br />

3 c 1 = 0.555555556<br />

c 2 = 0.888888889<br />

c 3 = 0.555555556<br />

4 c 1 = 0.347854845<br />

c 2 = 0.652145155<br />

c 3 = 0.652145155<br />

c 4 = 0.347854845<br />

Function<br />

Arguments<br />

x 1 = -0.577350269<br />

x 2 = 0.577350269<br />

x 1 = -0.774596669<br />

x 2 = 0.000000000<br />

x 3 = 0.774596669<br />

x 1 = -0.861136312<br />

x 2 = -0.339981044<br />

x 3 = 0.339981044<br />

x 4 = 0.861136312<br />

http://<br />

numericalmethods.eng.usf.edu


92<br />

Arguments and Weighing Factors<br />

for n-point Gauss Quadrature<br />

Points Weighting<br />

Factors<br />

Formulas<br />

Table 1 (cont.) : Weighting factors c and function arguments x used in<br />

Gauss Quadrature Formulas.<br />

5 c 1 = 0.236926885<br />

c 2 = 0.478628670<br />

c 3 = 0.568888889<br />

c 4 = 0.478628670<br />

c 5 = 0.236926885<br />

6 c 1 = 0.171324492<br />

c 2 = 0.360761573<br />

c 3 = 0.467913935<br />

c 4 = 0.467913935<br />

c 5 = 0.360761573<br />

c 6 = 0.171324492<br />

Function<br />

Arguments<br />

x 1 = -0.906179846<br />

x 2 = -0.538469310<br />

x 3 = 0.000000000<br />

x 4 = 0.538469310<br />

x 5 = 0.906179846<br />

x 1 = -0.932469514<br />

x 2 = -0.661209386<br />

x 3 = -0.2386191860<br />

x 4 = 0.2386191860<br />

x 5 = 0.661209386<br />

x http://<br />

6 = 0.932469514<br />

numericalmethods.eng.usf.edu


93<br />

Arguments and Weighing Factors<br />

for n-point Gauss Quadrature<br />

Formulas<br />

So if the table is given for integrals, how does one solve<br />

? The answer lies in that any integral with limits of<br />

can be converted into an integral with limits Let<br />

If then<br />

If then<br />

Such that:<br />

http://<br />

numericalmethods.eng.usf.edu


94<br />

Arguments and Weighing Factors<br />

for n-point Gauss Quadrature<br />

Formulas<br />

Then Hence<br />

Substituting our values of x, and dx into the integral gives us<br />

http://<br />

numericalmethods.eng.usf.edu


95<br />

Example 1<br />

For an integral derive the one-point Gaussian Quadrature<br />

<strong>Rule</strong>.<br />

Solution<br />

The one-point Gaussian Quadrature <strong>Rule</strong> is<br />

http://<br />

numericalmethods.eng.usf.edu


96<br />

Solution<br />

Assuming the formula gives exact values for integrals<br />

and<br />

Since the other equation becomes<br />

http://<br />

numericalmethods.eng.usf.edu


97<br />

Solution (cont.)<br />

Therefore, one-point Gauss Quadrature <strong>Rule</strong> can be expressed as<br />

http://<br />

numericalmethods.eng.usf.edu


a)<br />

b)<br />

c)<br />

98<br />

Example 2<br />

Use two-point Gauss Quadrature <strong>Rule</strong> to approximate the distance<br />

covered by a rocket from t=8 to t=30 as given by<br />

Find the true error, for part (a).<br />

Also, find the absolute relative true error, for part (a).<br />

http://<br />

numericalmethods.eng.usf.edu


99<br />

Solution<br />

First, change the limits of integration from [8,30] to [-1,1]<br />

by previous relations as follows<br />

http://<br />

numericalmethods.eng.usf.edu


.<br />

.<br />

100<br />

Solution (cont)<br />

Next, get weighting factors and function argument values from Table 1<br />

for the two point rule,<br />

http://<br />

numericalmethods.eng.usf.edu


101<br />

Solution (cont.)<br />

Now we can use the Gauss Quadrature formula<br />

http://<br />

numericalmethods.eng.usf.edu


since<br />

102<br />

Solution (cont)<br />

http://<br />

numericalmethods.eng.usf.edu


)<br />

c)<br />

The true error, , is<br />

103<br />

Solution (cont)<br />

The absolute relative true error, , is (Exact value = 11061.34m)<br />

http://<br />

numericalmethods.eng.usf.edu

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!