CS321. Numerical Analysis

Similar documents
CS321. Introduction to Numerical Methods

Mathematically, integration is just finding the area under a curve from one point to another. It is b

Chapter 12-b Integral Calculus - Extra

In Calculus I you learned an approximation method using a Riemann sum. Recall that the Riemann sum is

Chapter Simpson s 1/3 Rule of Integration. ( x)

Numerical differentiation (Finite difference)

Numerical Differentiation and Integration

MTH 146 Class 7 Notes

Area and the Definite Integral. Area under Curve. The Partition. y f (x) We want to find the area under f (x) on [ a, b ]

this is the indefinite integral Since integration is the reverse of differentiation we can check the previous by [ ]

Integration by Parts for D K

Differential Entropy 吳家麟教授

under the curve in the first quadrant.

12 Iterative Methods. Linear Systems: Gauss-Seidel Nonlinear Systems Case Study: Chemical Reactions

14.2 Line Integrals. determines a partition P of the curve by points Pi ( xi, y

Chapter 2 Intro to Math Techniques for Quantum Mechanics

4. Runge-Kutta Formula For Differential Equations. A. Euler Formula B. Runge-Kutta Formula C. An Example for Fourth-Order Runge-Kutta Formula

UNIVERSITI KEBANGSAAN MALAYSIA PEPERIKSAAN AKHIR SEMESTER I SESI AKADEMIK 2007/2008 IJAZAH SARJANAMUDA DENGAN KEPUJIAN NOVEMBER 2007 MASA : 3 JAM

Strategies for the AP Calculus Exam

ICS141: Discrete Mathematics for Computer Science I

Calculating the Values of Multiple Integrals by Replacing the Integrands Interpolation by Interpolation Polynomial

Roberto s Notes on Integral Calculus Chapter 4: Definite integrals and the FTC Section 2. Riemann sums

4. Runge-Kutta Formula For Differential Equations

Chapter Simpson s 1/3 Rule of Integration. ( x)

DATA FITTING. Intensive Computation 2013/2014. Annalisa Massini

ITERATIVE METHODS FOR SOLVING SYSTEMS OF LINEAR ALGEBRAIC EQUATIONS

Outline. Finite Difference Grids. Numerical Analysis. Finite Difference Grids II. Finite Difference Grids III

The z-transform. LTI System description. Prof. Siripong Potisuk

. The set of these sums. be a partition of [ ab, ]. Consider the sum f( x) f( x 1)

FORMULAE FOR FINITE DIFFERENCE APPROXIMATIONS, QUADRATURE AND LINEAR MULTISTEP METHODS

The definite Riemann integral

i+1 by A and imposes Ax

MATLAB PROGRAM FOR THE NUMERICAL SOLUTION OF DUHAMEL CONVOLUTION INTEGRAL

CS473-Algorithms I. Lecture 3. Solving Recurrences. Cevdet Aykanat - Bilkent University Computer Engineering Department

Lecture 3-4 Solutions of System of Linear Equations

UNIT I. Definition and existence of Riemann-Stieltjes

Some Unbiased Classes of Estimators of Finite Population Mean

Spectrum Estimation by Several Interpolation Methods

ENGI 4430 Numerical Integration Page 5-01

Advanced Algorithmic Problem Solving Le 3 Arithmetic. Fredrik Heintz Dept of Computer and Information Science Linköping University

Numerical Methods. Lecture 5. Numerical integration. dr hab. inż. Katarzyna Zakrzewska, prof. AGH. Numerical Methods lecture 5 1

Asymptotic Dominance Problems. is not constant but for n 0, f ( n) 11. 0, so that for n N f

Chapter 1. Infinite Sequences and Series. 1.1 Sequences. A sequence is a set of numbers written in a definite order

Chapter Gauss-Seidel Method

МИНИСТЕРСТВО ОБРАЗОВАНИЯ И НАУКИ РОССИЙСКОЙ ФЕДЕРАЦИИ. Численные методы. Учебно-методическое пособие

A Technique for Constructing Odd-order Magic Squares Using Basic Latin Squares

3/20/2013. Splines There are cases where polynomial interpolation is bad overshoot oscillations. Examplef x. Interpolation at -4,-3,-2,-1,0,1,2,3,4

1. (25 points) Use the limit definition of the definite integral and the sum formulas to compute. [1 x + x2

Sequences and summations

INTRODUCTION ( ) 1. Errors

Module 2: Introduction to Numerical Analysis

Complex Variables. Chapter 19 Series and Residues. March 26, 2013 Lecturer: Shih-Yuan Chen

SOME REMARKS ON HORIZONTAL, SLANT, PARABOLIC AND POLYNOMIAL ASYMPTOTE

19 22 Evaluate the integral by interpreting it in terms of areas. (1 x ) dx. y Write the given sum or difference as a single integral in

Numerical Integration - (4.3)

20 23 Evaluate the integral by interpreting it in terms of areas. (1 x ) dx. y 2 2

Numerical Integration

Introduction to Numerical Integration Part II

SUM PROPERTIES FOR THE K-LUCAS NUMBERS WITH ARITHMETIC INDEXES

The proof is a straightforward probabilistic extension of Palfrey and Rosenthal (1983). Note that in our case we assume N

Approximate Integration

Chapter Runge-Kutta 2nd Order Method for Ordinary Differential Equations

Numerical Analysis Topic 4: Least Squares Curve Fitting

Basics of Information Theory: Markku Juntti. Basic concepts and tools 1 Introduction 2 Entropy, relative entropy and mutual information

Simpson s 1/3 rd Rule of Integration

Chapter Trapezoidal Rule of Integration

CHAPTER 6 CURVE FITTINGS

6.6 Moments and Centers of Mass

Level-2 BLAS. Matrix-Vector operations with O(n 2 ) operations (sequentially) BLAS-Notation: S --- single precision G E general matrix M V --- vector

Rendering Equation. Linear equation Spatial homogeneous Both ray tracing and radiosity can be considered special case of this general eq.

Mu Sequences/Series Solutions National Convention 2014

Chapter 2 Intro to Math Techniques for Quantum Mechanics

On Several Inequalities Deduced Using a Power Series Approach

ME 501A Seminar in Engineering Analysis Page 1

Available online through

INTERPOLATION(2) ELM1222 Numerical Analysis. ELM1222 Numerical Analysis Dr Muharrem Mercimek

Topic 6b Finite Difference Approximations

PubH 7405: REGRESSION ANALYSIS REGRESSION IN MATRIX TERMS

A Brief Introduction to Olympiad Inequalities

UNIVERSITY OF BRISTOL. Examination for the Degrees of B.Sc. and M.Sci. (Level C/4) ANALYSIS 1B, SOLUTIONS MATH (Paper Code MATH-10006)

Fast Fourier Transform 1) Legendre s Interpolation 2) Vandermonde Matrix 3) Roots of Unity 4) Polynomial Evaluation

MATRIX AND VECTOR NORMS

Asymptotic Formulas Composite Numbers II

f(t)dt 2δ f(x) f(t)dt 0 and b f(t)dt = 0 gives F (b) = 0. Since F is increasing, this means that

Systems of second order ordinary differential equations

Chapter 5. The Riemann Integral. 5.1 The Riemann integral Partitions and lower and upper integrals. Note: 1.5 lectures

Mathematics HL and further mathematics HL formula booklet

Optimality of Strategies for Collapsing Expanded Random Variables In a Simple Random Sample Ed Stanek

CURVE FITTING LEAST SQUARES METHOD

LECTURE 8: Topics in Chaos Ricker Equation. Period doubling bifurcation. Period doubling cascade. A Quadratic Equation Ricker Equation 1.0. x x 4 0.

Math 2414 Activity 16 (Due by end of class August 13) 1. Let f be a positive, continuous, decreasing function for x 1, and suppose that

Trapezoidal Rule of Integration

Trapezoidal Rule of Integration

Computer Programming

#A79 INTEGERS 16 (2016) ROUND FORMULAS FOR EXPONENTIAL POLYNOMIALS AND THE INCOMPLETE GAMMA FUNCTION

( a n ) converges or diverges.

4 Round-Off and Truncation Errors

MATH 104 FINAL SOLUTIONS. 1. (2 points each) Mark each of the following as True or False. No justification is required. y n = x 1 + x x n n

Analytical Approach for the Solution of Thermodynamic Identities with Relativistic General Equation of State in a Mixture of Gases

Convergence of the FEM. by Hui Zhang Jorida Kushova Ruwen Jung

Transcription:

CS Numercl Alyss Lecture 4 Numercl Itegrto Proessor Ju Zg Deprtmet o Computer Scece Uversty o Ketucky Legto, KY 456 6 Octoer 6, 5

Dete Itegrl A dete tegrl s tervl or tegrto. For ed tegrto tervl, te result s umer A dete tegrl does ot ve tegrto tervl. Te result o dete tegrl tdervtve s clss o uctos Numercl tegrto s or computg dete tegrls Fudmetl Teorem o Clculus: s d s d cos C F' d F F' t dt F F F

Numercl Itegrto

Prtto 4 Te dete tegrl o ucto c e vewed s te re uder curve. Ts pot o vew leds us mes to compute dete tegrl Let P e prtto o te tervl o [,] s We ve sutervls s [, + ]. Let m e te gretest lower oud o oegtve ucto o [, + ] s d M s te lest upper oud o te sme sutervl P : m : sup M

Prtto

Lower d Upper Sums 6 Te lower sums d upper sums o correspodg to te gve prtto P s I we cosder te dete tegrl o oegtve s te re uder te curve, we ve or ll prttos P I s cotuous o [,], te te ove equlty dees te dete tegrl. Te tegrl lso ests s mootoe eter cresg or decresg o [,] ; ; M P U m P L P U d P L ; ;

Upper d Lower Bouds

Rem Itegrle Fuctos I te gretest lower oud equls te lest upper oud or ll prttos o [,],.e., U ; P sup L, P Te s sd to e Rem tegrle Every cotuous ucto deed o closed d ouded tervl o te rel le s Rem tegrle We ve lm were P, P,.., P, re sequece o prttos suc tt te legt o te lrgest sutervl P coverges to s We c costruct ested reed prttos P L ; P P d lm U ; P 8

Computto. eed procedure to evlute. determe prtto ow my sutervls o te tervl [,]. compute m d M o ec sutervl 4. compute te sums L; P d U; P 5. ppromte vlue s oted ; P L P d U ; 6. te error o ts ppromto s ouded y ; P L P U ; 9

Trpezod Rule A strtegy tt s etter t estmtg ot te upper d te lower ouds o te re eet te curve s to use trpezods Te tervl [,] s rst dvded to sutervls [, + ],. A typcl trpezod s te sutervl [, + ] s ts se, d te two vertcl sdes re d +. Te re s gve y te se tmes te verge egt. Te sc trpezod rule or te sutervl [, + ] s Te totl re uder te curve s d d T ; P A [ ]

Trpezod Rule

Uorm Spcg Te legts o te sutervls prtto c e deret. For st computto, uorm prtto o te tervl my e dvtgeous Let e te umer o sutervls, te = / s te uorm tervl spcg. Te odl pots re = +, =,,,. Hece te composte trpezod rule s T ; P [ ] Note tt te ed pot o tervl s te strtg pot o te et tervl. Ts ct c sve lmost l o te computto, d [ ]

Trpezod Rule wt Uorm Spcg

Error Alyss I ests d s cotuous o [,], te error o te composte trpezod rule T s or some ξ, d T " O Proo. We rst prove te result or =, = d =. Tt s " d Ts smpled ormul wll e proved wt te elp o polyoml terpolto Dee polyoml o degree oe tt terpoltes t d p [ ] 4

Error Alyss It ollows tt p d [ [ ] ] Usg te error ormul or te polyoml terpolto, we ve Itegrte t o ot sdes, p "[ ] d p d "[ ] d 5

Error Alyss Usg te Me Vlue Teorem or Itegrls So we ve "[ ] d We te do cge o vrle, d let g t d g" t d [ "[ [ t dt, g' t t "[ s] ], 6 ] ] " '[ d t " t ] 6

Error Alyss 4 7 Te usg te result or te specl cse, Ts s te error ormul or te trpezod rule wt oly oe sutervl. Let [,] e dvded to equl sutervls y pots " ] [ " ] [ ] [ g g g dt t g dt t d ], wt sutervl[,,...,,

Error Alyss 5 8 Let e te tervl legt Sum over ll sutervls to get te composte trpezod rule Note tt =-/, we use Itermedte-Vlue Teorem o Cotuous Fuctos, " ] [ d " " " " ] [ d

Emple Sow tt d " Need to dee F t t We c epd F+ usg Tylor seres d F F F' F" F"'! Te y te Fudmetl Teorem o Clculus, we ve F t = t. Note tt F =, F t= t, F t= t, d so o. 9

We ve Emple We c lso pply te Tylor seres drectly o t s ' " "'! Addg o ot sdes o d multplyg t y /, we ot [ d ' "! ] ' " 4 Sutrctg rom, we lly get d [ ] "

Estmte Grd Spcg Emple. I te composte trpezod rule s used to compute e wt error o t most.5-4, wt s te uorm grd spcg? From te grp o te secod dervtve decresg ucto " 4 d e We d tt " " We eed " 6.5 4 It ollows tt.7. Te umer o sutervls s [/] = 58

Recursve Trpezod Ide Wt c we do te tl prtto o tervl s ot e eoug?

Recursve Trpezod Formul Gve prmeter, dvdg [,] to eqully spced sutervls, we ve Note tt = d = / Notce tt R, c e vewed s dvdg ec sutervl o R,to two equl su sutervls. I we lredy computed R,, ow c we compute R, ceply? ; P T, R

4 Recursve Formul I R,s vlle, R, c e computed s For usg = /. Itl strtg vlue s Te trck s to oly sum te ucto vlues t every oter grd pots Proo. Note tt wt C = [ + ]/ d ] [,, k k R R ] [, R, C R, j C j R

Recursve Formul Hece, we ve R, R, j j Ec term te rst sum tt correspods to eve vlue o de s ccelled y term te secod term. Te l result s oly te odd vlues o de We c use te recursve trpezod ormul to compute sequece o ppromtos to dete tegrl usg te trpezod rule, wtout recomputg te vlues t pots tt ve lredy ee computed te prevous step k [ k ] 5

6 Two Dmesol Itegrto For oe dmesol umercl tegrto o [,], usg uorm spce = / For two dmesol tegrto o ut squre A d ] [ j j j j j A A j A A dy y A dy y A dy d y,,,,,

Romerg Algortm Recursve composte trpezod metod For = / d R, R, [ ] R, Usg Rcrdso etrpolto, we c ve R, j R, j 4 For j d j. Ts s te Romerg lgortm, wc my yeld etter ppromte vlues or lrger j k [ k [ R, j R, j ] j ] 7

Dervg Romerg Algortm Composte trpezod rule o - sutervls wt = / - d te coecets deped o ut ot o Ater oe reemet d replcg wt d wt /, we ve Sutrctg te st equto rom 4 tmes te d equto were or d R, d R, 4 6 4 4 4 4 64 4 4 6 6 6 6 6 4 5 d R, 6 R, R, [ R, R,] 6 8

More Romerg Algortm We could pply te etrpolto de repetedly to get were 6 d R, 4 6 4 5 8 8 R, R, 5 [ R, R,] Ts tme, te tructo error s o st order A ew steps o etrpolto my geerte very ccurte ppromtos Too my etrpoltos my mke te computto tedous 9

Geerl Etrpolto Etrpolto processes c e ppled more geerl cses were te error term c e represeted s wt < α < β < γ, we sow ow te rst term o te error epso s lted. Let Replcg y / yelds Multplyg y α c E c L c L c L

Geerl Etrpolto Cot. Sutrctg te prevous two equtos, we c remove te α term L We c wrte te ew ppromto ormul s L Ts ppromto ormul rses te order o tructo error rom O α to O β wt α < β c Plese red te ook o p. 7 or cocrete emple to sow ow te ppromto ccurcy s mproved usg etrpolto c

Bsc Smpso s Rule Smple trpezod rule uses two pots or ppromtos C we get more ccurte ppromto usg more pots?

Bsc Smpso s Rule A tree pot umercl tegrto rule usg te mddle pot o te tervl s kow s te Smpso s rule wt deret wegts or ec pot d 4 Usg Tylor s epso, we c d te error term o ts ppromto s 5 4 9 For some pot ξ,+. Ts sould e compred to te error term o te smple trpezod rule O It s desrle to sudvde te tervl dptvely so tt reemet s oly plced te re o lrge luctuto o ucto vlue

Bsc Smpso s Rule Comprg composte trpezod rule d Smpso s rule 4

Bsc Smpso s Rule Usg Tylor seres or t, we ve '! "! I we replce te tervl sze y, we ot ' By comg tese two epsos, we get 4 6 6' 4 "' 4! 4 4 " F"' 4! " 4 4 4 4 "' 4! 4 4 5

Bsc Smpso s Rule O te oter d, dee We epd F+ s F t dt 4 F F F' F" F"' Note tt F =, F=, F =, F =, we ve d 4 ' From te prevous pge, we ve [ 4 ] " 4 4 "' 4 4 5 "' 54! ' 4! 5 5 F 5! 4 5 5 4 4 " 5 6

7 Bsc Smpso s Rule Sutrctg te prevous two equtos, we ve We ve te Smpso s rule s Te error term o te Smpso s rule s d 4 5 9 ] 4 [ 9 4 5 d ] 4 [ 6

Adptve Smpso s Algortm Reduce te sze o te tervls to get more ccurte ppromtos 8

Adptve Smpso s Algortm Gve tervl [,], we c use te sc Smpso s rule to compute ppromto to te tegrl s were te ppromto prt s I d S, E, S, 4 6 d te error term s E, 5 4 9 For smplcty, we ssume 4 rems costt o,. Let =, we ve I S E For te rst step ppromto wt S S, 9

Adptve Smpso II Ad E 9 5 4 We te sudvde te tervl [,] d pply te sc Smpso s rule o te sutervls [,c] d [c,] respectvely. We ve ew ppromto o [,] s te sum o two seprte ppromtos were c = + / wt d E 9 S / 5 I S Ts s certly etter ppromto sce te sutervls re smller t te orgl tervl S, c 4 9 E S c, / 5 4 6 E

Adptve Smpso III Sutrctg te two ppromtos yelds Hece te umercl tegrto c e I S S S E E Te error term s te computle d c e used or uldg te dptve process S S 5 I ts test sows tt te error s lrger t ε, te tervl [,] c e splt to two sutervls [,c] d [c,] wt c = + /. Te prevously descred procedure s replced y ε/ to mke sure tt te error sum s smller t ε S E 5 5E S S 4

Adptve Smpso s Algortm Ree te tervls t te plces were te ucto cges quckly 4

Adptve Smpso IV Numercl tegrto o sutervls c I d d d c I L I Let S e tesumo S L o[,c] d S R o[ c,],weve I S I I S S L R L R R I L S L I R S R I we wt to ve 5 S L I S L S 5 S R S R It s more t eoug to ve d S 5 L S L S 5 R S R 4

Adptve Smpso s Algortm Oe decso to mke s to coose were to ree te tervl 44

45 Computtol Procedure Te tervl [,] s dvded to our sutervls o equl legt. Two Smpso ppromtos re computed usg two doule wdt sutervls d our sgle wdt sutervls I S -S 5ε, we ve doe, d set Oterwse te tervl [,] s dvded l d te recursve procedure s ppled o te two sutervls [,c] d [c,], utl eter te error tolerce s stsed or te mmum umer o sudvsos s reced 4 4 4 6 c c c S S 6 5 S S S

Adptve Smpso s Algortm Wc su tervl or ot to dvde or reemet 46

Guss Qudrture Formuls A geerl umercl tegrto ormul s It suces to kow te odes,,, d te wegts A, A,, A. For mportt specl uctos, tey re lsted some reerece ooks Suppose set o odes s gve, ow to d te wegts. Ts c e doe usg Lgrge terpolto polyoml s Wt d A A A p l jo, j I p s good ppromte to, we tcpte ppromte to d l j j p d s good 47

We tegrte over p s were we c compute d p d Guss Qudrture l l A d Note tt te polyoml terpolto s ect or polyoml o degree t most. It ollows tt te tegrto wll e ect or suc polyomls I te odes c e cose creully, t s possle to crese te order o polyoml wt te ect tegrto remrkly. Ts ws dscussed y Krl Guss d A 48

49 A Emple Determe qudrture ormul we te tervl s [,] d te odes re,, d. We rst eed to compute te crdl uctos Te wegts re computed y tegrtg tese uctos, l j j j 8 d d l A, l j j j, l j j j

A Emple Smlrly, we ve A l d d A l d d So te qudrture ormul deed o te tervl [,] d usg te ode,,, s d 8 4 8 It c e vered tt ts ormul gves ect vlues or te tree uctos,, 8 4 5

Guss Qudrture Teorem Let q e otrvl polyoml o degree + suc tt q d k Let,,, e zeroes o q. Te we dee te ormul Wt tese s s odes, te ppromto wll e ect or ll polyomls o degree t most +. All tese odes le te ope tervl, We c rst gure out te qudrture or k d A t dt Te use te trsormto t = [ ]/ or Guss qudrture o te geerl tervl [,], A A t l d 5

Te trsormed tegrl s d Guss Teorem Proo Proo o Guss Qudrture Teorem: Let e y polyoml o degree t most +. Dvdg y q wt quotet p d remder r p q r Bot p d r re polyomls o degree t most t dt By ypotess, we ve q p d Sce re roots o q, we ve p q r r 5

Guss Teorem Proo II Sce te degree o r s t most, te tegrto r d s ect d r d p q d A r Guss Qudrture Teorem gurtees g ccurcy umercl tegrto wt just ew odes. However, dg tese odes s ot esy tsk. Te roots o Legedre polyomls re te odes or Guss qudrture o te tervl [-,]. Wt q =, q =, we ve or q q r d A q 5