User Tools

Site Tools


gibson:teaching:fall-2016:math753:quadrature

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== Quadrature ====== Quadrature is the numerical approximation of definite integrals of functions evaluated at discrete gridpoints. There are many, many quadrature formulae. We will start with the Trapezoid Rule and Simpson's Rule. In both cases we will assume we have an evenly spaced set of $N+1$ gridpoints $\{x_i, i=0,\ldots,N\}$ on the interval $[a,b]$, with $x_0 = a$, $x_n = b$, and $x_i = x_0 + i h$, where $h = (b-a)/N$ is the gridspacing. We also assume we know the value of the function evaluated at the gridpoints, i.e. we have a vector of values $\{y_i = f(x_i), i=0,\ldots,N\}$. ==== Trapezoid Rule==== The Trapezoid rule approximates the definite integral of $f(x)$ over $[a,b]$ as \begin{equation*} \int_a^b f(x) \, dx = h \left( \frac{1}{2} y_0 + \sum_{i=1}^{N-1} y_i + \frac{1}{2} y_N\right) - \frac{b-a}{12} h^2 f''(c) \end{equation*} for some $c$ where $a<c<b$. e.g. for $N=5$ we would have \begin{equation*} \int_a^b f(x) \, dx = h \left( \frac{1}{2} y_0 + y_1 + y_2 + y_3 + y_4 + \frac{1}{2} y_5\right) \end{equation*} ==== Trapezoid Rule====

gibson/teaching/fall-2016/math753/quadrature.1479394315.txt.gz · Last modified: 2016/11/17 06:51 by gibson