Gauss Quadrature: Theory, Formulas, and Examples

gauss quadrature n.w
1 / 18
Embed
Share

Explore the theory and applications of Gauss quadrature for numerical integration, deriving weights from linear equations, extending Simpson's rule, and utilizing cubic polynomials for enhanced performance. Witness the proof, analysis, and an example showcasing the methodology behind Gauss quadrature.

  • Gauss Quadrature
  • Integration
  • Numerical Methods
  • Polynomial Approximation
  • Cubic Polynomials

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Gauss Quadrature

  2. Let {x0, x1, , xn} be n+1 points on [a, b] where integrand evaluated, then the numerical integration formula n f(x)dx a Will be exact for polynomials of degree at least n. Derive weights by a system of n+1 linear equations obtained by requiring the formula to be exact for f(x) = 1, x, x2, xn b = = k ( ) f x k k 0 Trapezoid rule: (n = 1) exact for a line In general, error proportional to |f ( )| Simpson s rule: (n = 2) exact for a cubic In general, error proportional to |f(4)( )| How is this extra performance (cubic) possible?

  3. Gauss quadrature Gauss quadrature extents the idea of Simpson s rule to its logical extreme: Give up all freedom about where the integrand will be evaluated to maximize the degree of polynomial for which formula is exact. Theorem: nodes {x0, x1, , xn} exist on [a, b] such that b n = = k ( ) f(x)dx f x a k k 0 is exact for polynomials of degree at most 2n+1 Nodes are zeros of polynomial g(x) of degree n+1 defined by b g(x)xk = 0 dx a for 0 < k < n How many coefficients are in a polynomial of degree n+1?

  4. Proof of Gauss quadrature theorem

  5. Write p(x) as c0 + c1x ++ cnxn Exact for polynomial degree 2n+1

  6. Example of Gauss quadrature 3 nodes on [-1, 1] gives approximation 1 2 = k -1 A ( ) f(x)dx f x k k 0 Steps in deriving this quadrature result (finding xk and Ak) 1.Find cubic g(x) such that 1 -1 for 0 < k < 2 Is this enough information to define a cubic? 2. Find roots of g(x) (values of xk ) = g(x)xk 0 dx 3. Find the weights A0, A1 and A2 Do on board

  7. Degree of g(x) = number of nodes conditions on g(x) Number of conditions not sufficient to determine all the coefficients Terms with odd powers of x in g(x) do not contribute to these integrals due to symmetry

  8. Determines ratio of C1 and C3 only. As noted before, number of conditions on g(x) insufficient to determine all 4 coefficients of a cubic but are sufficient to determine the zeros b n = a = f(x)dx A f(x ) i i i 0

  9. Using plan (b) Compare with table 6.1, text p236

  10. Table from C&K 6th ed. p236 We derived the result for n=2 (aka 3 points) Note symmetry of points and weights 1.odd number always contains 0 2.nonzero points, symmetric about origin, always have same weight

  11. Points and weights of Gauss quadrature are determined for 1 1 - ( dx x ) f To use these points and weights for an integral from a to b, we make a change of integration variable that transformed the integral from a to b into an integral from -1 to 1 Do on board

  12. Given values of y from table, this x(y) determines values on [a,b] where integrand will be evaluated

  13. Gauss quadrature with n+1 points b ( ) n b a 0 = k a = ( ( ) ) k f(x)dx f x y k 2 Points and weights from 2, 3, 4, and 5 points: table 6.1, text p236 + ( ) ( ) b a a b = + ( ) x y y 2 2 2 2) exp( x dx 0 Example: Do on board

  14. (no anti-derivative) with 2 nodes

  15. Assignment 9 Find functions for Gauss quadrature with 2, 3, 4 and 5 points on the class web page. Apply these functions to the integral 3 100 10 1 sin( )dx x x Take -18.79829683678703 as the exact value. Hand in a copy of the command window where you called the Gauss functions and calculated the absolute percent differences from the exact value 100abs((exact-Gauss)/exact).

  16. fh(x); fh(x); Arguments of functions are function handle and range of integration. No vector input.

  17. These functions take advantage of the symmetry of points and weights. For loop is shorter than number of points Contribution from y=0 used to initialize sum.

  18. More extensive tables of nodes and weights than given in text. Note that symmetry has been used to compress the table. Verify that values for n = 2 to 5 are the same as n = 1 to 4 in table from text. Watch out for data entry errors.

More Related Content