Difference between revisions of "Numerical Integration"

From Sutherland_wiki
Jump to: navigation, search
Line 3: Line 3:
  
 
== Common Quadrature Formulas ==
 
== Common Quadrature Formulas ==
 +
 +
  
  
 
=== Midpoint Rule ===
 
=== Midpoint Rule ===
 +
 +
==== Example ====
 +
 +
  
  
 
=== Trapezoid Rule ===
 
=== Trapezoid Rule ===
 +
 +
==== Example ====
 +
 +
  
  
 
=== Simpson's 1/3 Rule ===
 
=== Simpson's 1/3 Rule ===
 +
 +
==== Example ====
  
  
Line 44: Line 56:
 
|}
 
|}
 
</center>
 
</center>
 +
 +
 +
 +
 +
== Composite Rules: Quadrature ==
 +
 +
=== Algorithm ===
 +
=== Examples ===
  
  
  
 
== Matlab Tools for Quadrature ==
 
== Matlab Tools for Quadrature ==

Revision as of 06:07, 3 July 2008

Introduction

Common Quadrature Formulas

Midpoint Rule

Example

Trapezoid Rule

Example

Simpson's 1/3 Rule

Example

Summary of Common Quadrature Formulas

Name Formula Comments
Midpoint Rule \int_{a}^{b} f(x) \mathrm{d} x \approx (b-a) f\left(\tfrac{b+a}{2}\right)
  • Requires function values at interval midpoints f\left(\tfrac{b+a}{2}\right)
  • Requires equally spaced data.
Trapezoid Rule \int_{a}^{b} f(x) \mathrm{d} x \approx \tfrac{b-a}{2} \left[ f(b)+f(a) \right]
  • Can be applied to arbitrarily spaced data.
  • Convenient for tabulated data.
Simpson's 1/3 Rule \int_a^b f(x) \mathrm d x \approx \tfrac{\Delta x}{3} \left[ f(a) +4f\left(\tfrac{a+b}{2}\right) + f(b) \right]
  • Requires three equally spaced points on the interval [a,b]
  • On the interval [a,b], we have \Delta x = \tfrac{b-a}{3} and x_i = a + i \Delta x



Composite Rules: Quadrature

Algorithm

Examples

Matlab Tools for Quadrature