1 / 17

Quadrature rules

Learn about quadrature rules, trapezoidal rule, composite midpoint rule, Simpson rule, Gauss quadrature, degree of exactness, and more. Understand numerical methods for integrating functions efficiently.

clydej
Download Presentation

Quadrature rules

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Quadrature rules Tommaso MarcatoETH Zurich, Institut für Chemie- und BioingenieurwissenschaftenETH Hönggerberg / HCI E120 – ZürichE-Mail: tommaso.marcato@chem.ethz.chhttps://shihlab.ethz.ch/education/Snm/numerics Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  2. Quadrature methods Single Step Trapezoidal Rule Composite Trapezoidal Rule Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  3. Composite Midpoint Rule Constant function for each step xn-1 b a x1 x2 Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  4. Composite Trapezoidal rule Linear function for each step xn-1 b a x1 x2 Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  5. Composite Simpson rule The interval is split up and the areas are integrals of quadratic functions Parabola through f(a), f(x1), f(x2) b xn-1 a x1 x2 Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  6. Gauss Quadrature Depending on the polynomial order n nodes xj and weights wj are used To approximate the area under a function. n = 3 Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  7. Degree of exactness • Trapezoids are areas under linear functions •  Linear functions are approximated exactly; q = 1 • Simpson uses the area under quadratic functions •  Polynomials up to order three are approximated exactly! q = 3 • Even degree interpolation polynomials get one degree of exactness for free • Example Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  8. Degree of exactness vs. order of accuracy • When a non-exact result is obtained, the error is proportional to the step size to a certain power s, the order of accuracy • It can be shown that s = q + 1 for sufficiently smooth f Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  9. Solution of Nonlinear Functions Michael SokolovETH Zurich, Institut für Chemie- und BioingenieurwissenschaftenETH Hönggerberg / HCI F135 – ZürichE-Mail: michael.sokolov@chem.ethz.chhttp://www.morbidelli-group.ethz.ch/education/index Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  10. Zero of a Nonlinear Function • Problem definition: • Find the solution of the equation f(x) = 0for scalar valued f and x; Look for the solution either in • An interval, generally –∞ < x < ∞ • In the uncertainty interval [a, b], where f(a)f(b) < 0 • Types of algorithms available: • Bisection method • Substitution methods • Methods based on function approximation • Assumptions: • In the defined intervals, at least one solution exists • We are looking for one solution, not all of them Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  11. Fixed point iterations • Fixed point iterations generally have the form • A fixed point of F is a point x*, where • A fixed point iteration is called consistent with a non-linear equation f(x), if Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  12. Convergence order of fixed point iterations • For any (converging) fixed point iteration, we can write • whereC is the rate of convergence and p is the convergence order • If we take the logarithm on both sides, we get • Which we can use to fit an average p • The equationsforp and Cfromthelecturegivemoreprecisesolutions (also seeExercise 2, assignment 2) Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  13. Assignment 1: Quadrature method comparison Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  14. Assignment 1: Quadrature method comparison Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  15. Assignment 1: Quadrature method comparison Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  16. Assignment 2: Fixed pointiteration 2. 3. 4. Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

  17. Assignment 2: Fixed pointiteration 5. Tommaso Marcato/ Numerical Methods for Chemical Engineers / Numerical Quadrature

More Related