12.07.2015 Views

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6IntegrationIn this chapter we discuss numerical integration, a basic tool of scientific computation.We derive the Simpson and trapezoid rules but just sketch the basis of Gaussianquadrature, which, though our standard workhorse, is long in derivation. We dodiscuss Gaussian quadrature in its various forms and indicate how to transform theGauss points to a wide range of intervals. We end the chapter with a discussion ofMonte Carlo integration, which is fundamentally different from other integrationtechniques.6.1 Integrating a Spectrum (Problem)Problem: An experiment has measured dN(t)/dt, the number of particles per unittime entering a counter. Your problem is to integrate this spectrum to obtain thenumber of particles N(1) that entered the counter in the first second for an arbitrarydecay rate∫ 1dN(t)N(1) = dt. (6.1)0 dt6.2 Quadrature as Box Counting (Math)The integration of a function may require some cleverness to do analytically but isrelatively straightforward on a computer. A traditional way to perform numericalintegration by hand is to take a piece of graph paper and count the number of boxesor quadrilaterals lying below a curve of the integrand. For this reason numerical integrationis also called numerical quadrature even when it becomes more sophisticatedthan simple box counting.The Riemann definition of an integral is the limit of the sum over boxes as thewidth h of the box approaches zero (Figure 6.1):∫ ba⎡⎤(b−a)/h∑f(x) dx = lim ⎣h f(x i ) ⎦ . (6.2)h→0i=1−101<strong>COPYRIGHT</strong> <strong>2008</strong>, PRINCET O N UNIVE R S I T Y P R E S SEVALUATION COPY ONLY. NOT FOR USE IN COURSES.ALLpup_06.04 — <strong>2008</strong>/2/15 — Page 123

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!