25.08.2021 Views

082-Engineering-Mathematics-Anthony-Croft-Robert-Davison-Martin-Hargreaves-James-Flint-Edisi-5-2017

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

17 Numericalintegration

Contents 17.1 Introduction 496

17.2 Trapeziumrule 496

17.3 Simpson’srule 500

Reviewexercises17 505

17.1 INTRODUCTION

Many functions, for example sinx 2 and ex

, cannot be integrated analytically. Integrationofsuchfunctionsmustbeperformednumerically.Thissectionoutlinestwosimple

x

numericaltechniques--thetrapeziumruleandSimpson’srule.Moresophisticatedones

exist and there are many excellent software packages available which implement these

methods.

17.2 TRAPEZIUMRULE

We wish to find the area undery(x), fromx = a tox = b, that is we wish to evaluate

∫ b

ydx. The required area is divided intonstrips, each of widthh. Note that the width,

a

h, of each strip is given byh = b −a . Each strip is then approximated by a trapezium.

n

AtypicaltrapeziumisshowninFigure17.1.Theareaofthetrapeziumis 1 2 h[y i +y i+1 ].

Summing the areas of all the trapezia will yield an approximation tothe total area:

area oftrapezia = h 2 (y 0 +y 1 )+h 2 (y 1 +y 2 )+···+h 2 (y n−1 +y n )

= h 2 (y 0 +2y 1 +2y 2 +2y 3 +···+2y n−1 +y n )

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

Saved successfully!

Ooh no, something went wrong!