SlideServe
Menu
Préférences
© SlideServe · v2026

Understanding Simpson’s and Trapezoid Methods for Numerical Integration

nuncio avatar
6 diapositives · 215 Views · Oct 05, 2014

This article explores Simpson's method and the trapezoidal rule for numerical integration. The trapezoidal method approximates the area under a curve by fitting polygonal lines and calculating the area of connected line segments. On the other hand, Simpson’s method employs a second-degree polynomial to estimate the integral of a curve, requiring even partitions. This guide outlines the algorithms for both methods, provides examples, and emphasizes the importance of partition sizes and index handling when implementing these numerical integration techniques.

Understanding Simpson’s and Trapezoid Methods for Numerical Integration - slide 1
01 / 6Understanding Simpson’s and Trapezoid Methods for Numerical Integration
1 / 17

Télécharger la présentation

Understanding Simpson’s and Trapezoid Methods for Numerical Integration
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Numerical Integration Simpson’s Method

  2. Trapezoid Method & Polygonal Lines One way to view the trapezoid method for integration is that the curves that you are attempting to estimate the integral of is being fitted with a polygonal line (a bunch of connected line segments) and then you compute the area under (or above) each line segment. f(x) b a Simpson’s Method Simpson’s method uses a second degree polynomial (i.e. a quadratic) to estimate the curve you are trying to find the integral of. This is a curve of the form y= c2x2+c1x+c0. The points are assumed to be evenly spaced. To get the estimate for the integral we will write out the 2nd degree polynomial using the data below to the right and then integrate it. c a c-h b c+h h h

  3. We will begin with the special case with the value of c being zero. We begin by integrating the 2nd degree polynomial p(t)=c2t2+c1t+c0. We will simplify it some after integrating it. Substitute c0 and c2 values.

  4. Shifting this over on any closed interval [a,b] we are interested in this becomes the same formula. On 2 partitions this formula becomes: f(x) b a In general this will become a kind of strange sum. Each of the function values will either be multiplied by 4 or 2 except for the first or the last. The number of subinterval points will need to be even.

  5. Example Estimate the integral to the right with 4 subintervals. A partition with 3 subintervals can not be used here since 3 is odd. Partition size 2 In general the sum to estimate the integral can be split into 3 parts. One is the value at the two endpoints, the other two are the odd indexes and the even indexes. This is something important when it comes to implementation. even index odd index odd index even index

  6. even index odd index odd index even index Algorithm for Simpson’s Method function intf( a, b, n) deltax = (b-a)/n isum = f(a)+f(b) oddsum=0 evensum=0 xodd=a+deltax xeven=xodd+deltax for(i=1,i(n/2)-1, i++, evensum = evensum + f(xeven) oddsum = oddsum + f(xodd) xodd = xodd + 2*deltax xeven = xodd + deltax) oddsum = oddsum + f(b-deltax) intf = (1/3)*deltax * (intsum+4*oddsum+2*evensum) prevint = intf(a, b, 2) nextint = intf(a, b, 4) for( i = 3, imaximum iterations && |prevint – nextint|  error, i++, prevint = nextint nextint = intf(a , b, 2i)