7.5 Gauss-Legendre Integration

Similar documents
4.3 Lagrange Approximation

Integration. Topic: Trapezoidal Rule. Major: General Engineering. Author: Autar Kaw, Charlie Barker.

4.5 Chebyshev Polynomials

Piecewise Cubic Splines

Estimating the Average Value of a Function

7.6 Approximation Errors and Simpson's Rule

Lesson 3. Numerical Integration

Numerical integration of a function known only through data points

3.3. Solving Polynomial Equations. Introduction. Prerequisites. Learning Outcomes

Representation of functions as power series

MATH 132: CALCULUS II SYLLABUS

Numerical Analysis An Introduction

a 1 x + a 0 =0. (3) ax 2 + bx + c =0. (4)

AP CALCULUS AB 2009 SCORING GUIDELINES

Zeros of Polynomial Functions

5 Numerical Differentiation

METNUMER - Numerical Methods

About the Gamma Function

1 Cubic Hermite Spline Interpolation

Zeros of Polynomial Functions

JUST THE MATHS UNIT NUMBER 1.8. ALGEBRA 8 (Polynomials) A.J.Hobson

AP CALCULUS AB 2008 SCORING GUIDELINES

9.2 Summation Notation

Nonhomogeneous Linear Equations

Review of Fundamental Mathematics

b) since the remainder is 0 I need to factor the numerator. Synthetic division tells me this is true

Calculus AB 2014 Scoring Guidelines

INTERPOLATION. Interpolation is a process of finding a formula (often a polynomial) whose graph will pass through a given set of points (x, y).

Efficient Curve Fitting Techniques

MATHEMATICS FOR ENGINEERING INTEGRATION TUTORIAL 3 - NUMERICAL INTEGRATION METHODS

Sequences and Series

Student Performance Q&A:

1 Review of Newton Polynomials

2.5 Zeros of a Polynomial Functions

As we have seen, there is a close connection between Legendre symbols of the form

Don't Forget the Differential Equations: Finishing 2005 BC4

Zero: If P is a polynomial and if c is a number such that P (c) = 0 then c is a zero of P.

Arithmetic and Algebra of Matrices

Techniques of Integration

Figure 2.1: Center of mass of four points.

correct-choice plot f(x) and draw an approximate tangent line at x = a and use geometry to estimate its slope comment The choices were:

The Method of Partial Fractions Math 121 Calculus II Spring 2015

1.7. Partial Fractions Rational Functions and Partial Fractions. A rational function is a quotient of two polynomials: R(x) = P (x) Q(x).

Taylor and Maclaurin Series

MA107 Precalculus Algebra Exam 2 Review Solutions

Mark Howell Gonzaga High School, Washington, D.C.

Probability and Statistics Prof. Dr. Somesh Kumar Department of Mathematics Indian Institute of Technology, Kharagpur

The Fourth International DERIVE-TI92/89 Conference Liverpool, U.K., July Derive 5: The Easiest... Just Got Better!

0.4 FACTORING POLYNOMIALS

Application. Outline. 3-1 Polynomial Functions 3-2 Finding Rational Zeros of. Polynomial. 3-3 Approximating Real Zeros of.

SOLUTIONS. f x = 6x 2 6xy 24x, f y = 3x 2 6y. To find the critical points, we solve

The degree of a polynomial function is equal to the highest exponent found on the independent variables.

An important theme in this book is to give constructive definitions of mathematical objects. Thus, for instance, if you needed to evaluate.

6 EXTENDING ALGEBRA. 6.0 Introduction. 6.1 The cubic equation. Objectives

Section 4.4. Using the Fundamental Theorem. Difference Equations to Differential Equations

Polynomials. Dr. philippe B. laval Kennesaw State University. April 3, 2005

Equations, Inequalities & Partial Fractions

Lectures 5-6: Taylor Series

3.2 The Factor Theorem and The Remainder Theorem

Zeros of Polynomial Functions

Integrals of Rational Functions

PRACTICE FINAL. Problem 1. Find the dimensions of the isosceles triangle with largest area that can be inscribed in a circle of radius 10cm.

Planar Curve Intersection

ALGEBRA 2 CRA 2 REVIEW - Chapters 1-6 Answer Section

Calculus with Parametric Curves

3.3 Real Zeros of Polynomials

Math 370, Spring 2008 Prof. A.J. Hildebrand. Practice Test 1 Solutions

Solutions to Homework 10

Linear and quadratic Taylor polynomials for functions of several variables.

QUADRATIC, EXPONENTIAL AND LOGARITHMIC FUNCTIONS

Slope and Rate of Change

AN INTRODUCTION TO NUMERICAL METHODS AND ANALYSIS

5. Factoring by the QF method

the points are called control points approximating curve

Particular Solutions. y = Ae 4x and y = 3 at x = 0 3 = Ae = A y = 3e 4x

1 Error in Euler s Method

Homework # 3 Solutions

Stirling s formula, n-spheres and the Gamma Function

Derive 5: The Easiest... Just Got Better!

March 29, S4.4 Theorems about Zeros of Polynomial Functions

CHAPTER 7 APPLICATIONS TO MARKETING. Chapter 7 p. 1/54

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, Notes on Algebra

CORRELATED TO THE SOUTH CAROLINA COLLEGE AND CAREER-READY FOUNDATIONS IN ALGEBRA

H/wk 13, Solutions to selected problems

Chapter 7 Numerical Differentiation and Integration

8 Polynomials Worksheet

Parametric Curves. (Com S 477/577 Notes) Yan-Bin Jia. Oct 8, 2015

Approximating functions by Taylor Polynomials.

TOPIC 4: DERIVATIVES

y cos 3 x dx y cos 2 x cos x dx y 1 sin 2 x cos x dx

Integer roots of quadratic and cubic polynomials with integer coefficients

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)

Solutions to old Exam 1 problems

2013 MBA Jump Start Program

2008 AP Calculus AB Multiple Choice Exam

Higher. Polynomials and Quadratics 64

FIRST YEAR CALCULUS. Chapter 7 CONTINUITY. It is a parabola, and we can draw this parabola without lifting our pencil from the paper.

Section 3.2 Polynomial Functions and Their Graphs

Math 1B, lecture 5: area and volume

Transcription:

38 CHAP. 7 NUMERICAL INTEGRATION 7.5 Gauss-Legendre Integration We wish to find the area under the curve y = f (x), x 1. What method gives the best answer if only two function evaluations are to be made? We have already seen that the trapezoidal rule is a method for finding the area under the curve and that it uses two function evaluations at the end points (, f ()), and (1, f (1)). But if the graph of y = f (x) is concave down, the error in approximation is the entire region that lies between the curve and the line segment joining the points; another instance is shown in Figure 7.10(a). If we can use nodes x 1 and x that lie inside the interval [, 1], the line through the two points (x 1, f (x 1 )) and (x, f (x )) crosses the curve, and the area under the line more closely approximates the area under the curve (see Figure 7.10(b)). The equation of the line is (1) y = f (x 1 ) + (x x 1)( f (x ) f (x 1 )) x x 1 and the area of the trapezoid under the line is () A trap = x f (x 1 ) x 1 f (x ). x x 1 x x 1 Notice that the trapezoidal rule is a special case of (). When we choose x 1 =, x = 1, and h =, then

SEC. 7.5 GAUSS-LEGENDRE INTEGRATION (OPTIONAL) 3 y y y = f(x) y = f(x) x 0 1 (a) x 1 0 x 1 Figure 7.10 (a) Trapezoidal approximation using the abscissas and 1. (b) Trapezoidal approximation using the abscissas x 1 and x. (b) x T ( f, h) = f (x 1) f (x ) = f (x 1 ) + f (x ). We shall use the method of undetermined coefficients to find the abscissas x 1, x and weights w 1, w so that the formula (3) f (x) dx w 1 f (x 1 ) + w f (x ) is exact for cubic polynomials (i.e., f (x) = a 3 x 3 + a x + a 1 x + a 0 ). Since four coefficients w 1, w, x 1, and x need to be determined in equation (3), we can select four conditions to be satisfied. Using the fact that integration is additive, it will suffice to require that (3) be exact for the four functions f (x) = 1, x, x, x 3. The four integral conditions are (4) f (x) = 1: f (x) = x : f (x) = x : f (x) = x 3 : 1 dx = = w 1 + w xdx= 0 = w 1 x 1 + w x x dx = 3 = w 1x 1 + w x x 3 dx = 0 = w 1 x 3 1 + w x 3.

400 CHAP. 7 NUMERICAL INTEGRATION Now solve the system of nonlinear equations (5) (6) (7) (8) w 1 + w = w 1 x 1 = w x w 1 x1 + w x = 3 w 1 x1 3 = w x 3 We can divide (8) by (6) and the result is () x1 = x or x 1 = x. Use () and divide (6) by x 1 on the left and x on the right to get (10) w 1 = w. Substituting (10) into (5) results in w 1 + w =. Hence (11) w 1 = w = 1. Now using (11) and () in (7), we write (1) w 1 x 1 + w x = x + x = 3 or x = 1 3. Finally, from (1) and () we see that the nodes are x 1 = x = 1/3 1/ 0.5773506. We have found the nodes and weights that make up the two-point Gauss-Legendre rule. Since the formula is exact for cubic equations, the error term will involve the fourth derivative. Theorem 7.8 (Gauss-Legendre Two-Point Rule). If f is continuous on [, 1], then (13) ( ) ( ) 1 f (x) dx G ( f ) = f + f 3. 3 The Gauss-Legendre rule G ( f ) has degree of precision n = 3. If f C 4 [, 1], then ( ) ( ) 1 (14) f (x) dx = f + f + E ( f ), 3 3 where (15) E ( f ) = f (4) (c) 135.

SEC. 7.5 GAUSS-LEGENDRE INTEGRATION (OPTIONAL) 401 Example 7.17. Use the two-point Gauss-Legendre rule to approximate dx = ln(3) ln(1) 1.0861 x + and compare the result with the trapezoidal rule T ( f, h) with h = and Simpson s rule S( f, h) with h = 1. Let G ( f ) denote the two-point Gauss-Legendre rule; then G ( f ) = f ( 0.57735) + f (0.57735) = 0.701 + 0.38800 = 1.001, T ( f, ) = f (.00000) + f (1.00000) = 1.00000 + 0.33333 = 1.33333, S( f, 1) = f () + 4 f (0) + f (1) 3 = 1 + + 1 3 3 = 1.11111. The errors are 0.00770, 0.347, and 0.0150, respectively, so the Gauss-Legendre rule is seen to be best. Notice that the Gauss-Legendre rule required only two function evaluations and Simpson s rule required three. In this example the size of the error for G ( f ) is about 61% of the size of the error for S( f, 1). The general N-point Gauss-Legendre rule is exact for polynomial functions of degree N 1, and the numerical integration formula is (16) G N ( f ) = w N,1 f (x N,1 ) + w N, f (x N, ) + +w N,N f (x N,N ). The abscissas x N,k and weights w N,k to be used have been tabulated and are easily available; Table 7. gives the values up to eight points. Also included in the table is the form of the error term E N ( f ) that corresponds to G N ( f ), and it can be used to determine the accuracy of the Gauss-Legendre integration formula. The values in Table 7. in general have no easy representation. This fact makes the method less attractive for humans to use when hand calculations are required. But once the values are stored in a computer it is easy to call them up when needed. The nodes are actually roots of the Legendre polynomials, and the corresponding weights must be obtained by solving a system of equations. For the three-point Gauss-Legendre rule the nodes are (0.6) 1/,0,and(0.6) 1/, and the corresponding weights are 5/, 8/, and 5/.

40 CHAP. 7 NUMERICAL INTEGRATION Table 7. Gauss-Legendre Abscissas and Weights N f (x) dx = w N,k f (x N,k ) + E N ( f ) k=1 N Abscissas, x N,k Weights, w N,k E N ( f ) Truncation error, 0.5773506 1.0000000000 f (4) (c) 0.5773506 1.0000000000 135 3 ±0.7745666 0.5555555556 f (6) (c) 0.0000000000 0.8888888888 15,750 4 ±0.8611363116 0.3478548451 f (8) (c) ±0.33810436 0.65145154 3,47,875 5 ±0.0617845 0.3668851 f (10) (c) ±0.538463101 0.478686705 1,37,73,650 0.0000000000 0.5688888888 6 ±0.346514 0.1713444 f (1) (c) 13 (6!) 4 ±0.66103865 0.3607615730 (1!) 3 13! ±0.38611861 0.46713346 7 ±0.410713 0.148466 f (14) (c) 15 (7!) 4 ±0.7415311856 0.7705315 (14!) 3 15! ±0.4058451514 0.3818300505 0.0000000000 0.41751837 8 ±0.6088565 0.10185363 f (16) (c) 17 (8!) 4 ±0.766664774 0.3810345 (16!) 3 17! ±0.555340 0.313706645 ±0.183434645 0.366837834 Theorem 7. (Gauss-Legendre Three-Point Rule). If f is continuous on [, 1], then (17) f (x) dx G 3 ( f ) = 5 f ( 3/5) + 8 f (0) + 5 f ( 3/5). The Gauss-Legendre rule G 3 ( f ) has degree of precision n = 5. If f C 6 [, 1], then (18) where f (x) dx = 5 f ( 3/5) + 8 f (0) + 5 f ( 3/5) (1) E 3 ( f ) = f (6) (c) 15, 750. + E 3 ( f ),

SEC. 7.5 GAUSS-LEGENDRE INTEGRATION (OPTIONAL) 403 Example 7.18. Show that the three-point Gauss-Legendre rule is exact for 5x 4 dx = = G 3 ( f ). Since the integrand is f (x) = 5x 4 and f (6) (x) = 0, we can use (1) to see that E 3 ( f ) = 0. But it is instructive to use (17) and do the calculations in this case. G 3 ( f ) = 5(5)(0.6) + 0 + 5(5)(0.6) = 18 =. The next result shows how to change the variable of integration so that the Gauss- Legendre rules can be used on the interval [a, b]. Theorem 7.10 (Gauss-Legendre Translation). Suppose that the abscissas {x N,k } k=1 N and weights {w N,k} k=1 N are given for the N-point Gauss-Legendre rule over [, 1]. To apply the rule over the interval [a, b], use the change of variable (0) t = a + b Then the relationship b ( a + b (1) f (t) dt = f a is used to obtain the quadrature formula () b a f (t) dt = b a + b a x and dt = b a dx. N ( a + b w N,k f k=1 + b a ) b a x dx + b a ) x N,k. Example 7.1. Use the three-point Gauss-Legendre rule to approximate 5 dt = ln(5) ln(1) 1.60438 1 t and compare the result with Boole s ruleb() with h = 1. Here a = 1 and b = 5, so the rule in () yields G 3 ( f ) = () 5 f (3 (0.6)1/ ) + 8 f (3 + 0) + 5 f (3 + (0.6) 1/ ) 3.44635 +.666667 + 1.006 = () = 1.6064. In Example 7.13 we saw that Boole s rulegaveb() = 1.617778. The errors are 0.006744 and 0.008340, respectively, so that the Gauss-Legendre rule is slightly better in this case. Notice that the Gauss-Legendre rule requires three function evaluations and Boole s rule requires five. In this example the size of the two errors is about the same.

404 CHAP. 7 NUMERICAL INTEGRATION Gauss-Legendre integration formulas are extremely accurate, and they should be considered seriously when many integrals of a similar nature are to be evaluated. In this case, proceed as follows. Pick a few representative integrals, including some with the worst behavior that is likely to occur. Determine the number of sample points N that is needed to obtain the required accuracy. Then fix the value N, and use the Gauss-Legendre rule with N sample points for all the integrals.

Numerical Methods Using Matlab, 4 th Edition, 004 John H. Mathews and Kurtis K. Fink ISBN: 0-13-06548- Prentice-Hall Inc. Upper Saddle River, New Jersey, USA http://vig.prenhall.com/