Computational Physics - Department of Physics

(Axel Boer) #1
110 5 Numerical Integration


f(x)


x


a a+h a+ 2 h a+ 3 h b
Fig. 5.1The area enscribed by the functionf(x)starting fromx=atox=b. It is subdivided in several smaller
areas whose evaluation is to be approximated by the techniques discussed in the text. The areas under the
curve can for example be approximated by rectangular boxes or trapezoids.


  • The strategy then is to find a reliable polynomial approximation forf(x)in the various
    intervals. Choosing a given approximation forf(x), we obtain a specific approximation to
    the integral.

  • With this approximation tof(x)we perform the integration by computing the integrals over
    all subintervals.
    Such a small measure may seemingly allow for the derivation of various integrals. To see this,
    we rewrite the integral as
    ∫b
    a


f(x)dx=

∫a+ 2 h
a

f(x)dx+

∫a+ 4 h
a+ 2 h

f(x)dx+...

∫b
b− 2 h

f(x)dx.

One possible strategy then is to find a reliable polynomial expansion forf(x)in the smaller
subintervals. Consider for example evaluating
∫a+ 2 h
a

f(x)dx,

which we rewrite as ∫a+ 2 h

a

f(x)dx=

∫x 0 +h
x 0 −h

f(x)dx. (5.2)

We have chosen a midpointx 0 and have definedx 0 =a+h. Using Lagrange’s interpolation
formula from Eq. (3.9), an equation we restate here,
Free download pdf