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

Similar documents
Simpson s 1/3 rd Rule of Integration

Trapezoidal Rule of Integration

Trapezoidal Rule of Integration

Numerical Integration

Interpolation. 1. What is interpolation?

Approximate Integration

Numerical Solutions of Fredholm Integral Equations Using Bernstein Polynomials

Gauss Quadrature Rule of Integration

Chapter Gauss Quadrature Rule of Integration

Numerical Differentiation and Integration

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

Closed Newton-Cotes Integration

Riemann Integral Oct 31, such that

Definition Integral. over[ ab, ] the sum of the form. 2. Definite Integral

Limit of a function:

INTEGRATION TECHNIQUES (TRIG, LOG, EXP FUNCTIONS)

Topic 4 Fourier Series. Today

Gauss Quadrature Rule of Integration

MATH 104: INTRODUCTORY ANALYSIS SPRING 2009/10 PROBLEM SET 8 SOLUTIONS. and x i = a + i. i + n(n + 1)(2n + 1) + 2a. (b a)3 6n 2

BC Calculus Review Sheet

MATH 104: INTRODUCTORY ANALYSIS SPRING 2008/09 PROBLEM SET 10 SOLUTIONS. f m. and. f m = 0. and x i = a + i. a + i. a + n 2. n(n + 1) = a(b a) +

Multiplicative Versions of Infinitesimal Calculus

EXPONENTS AND LOGARITHMS

AP Calculus Notes: Unit 6 Definite Integrals. Syllabus Objective: 3.4 The student will approximate a definite integral using rectangles.

the midpoint of the ith subinterval, and n is even for

Fourier Series. Topic 4 Fourier Series. sin. sin. Fourier Series. Fourier Series. Fourier Series. sin. b n. a n. sin

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

Math1242 Project I (TI 84) Name:

12.2 The Definite Integrals (5.2)

Week 13 Notes: 1) Riemann Sum. Aim: Compute Area Under a Graph. Suppose we want to find out the area of a graph, like the one on the right:

Numerical Integration - (4.3)

1 Tangent Line Problem

AIEEE CBSE ENG A function f from the set of natural numbers to integers defined by

Homework 2 solutions

Calculus II Homework: The Integral Test and Estimation of Sums Page 1

Chapter 5. Integration

Taylor Polynomials. The Tangent Line. (a, f (a)) and has the same slope as the curve y = f (x) at that point. It is the best

ECE 102 Engineering Computation

General properties of definite integrals

Data Compression Techniques (Spring 2012) Model Solutions for Exercise 4

Dynamics of Marine Biological Resources * * * REVIEW OF SOME MATHEMATICS * * *

Numerical Methods in Geophysics: High-Order Operators

 n. A Very Interesting Example + + = d. + x3. + 5x4. math 131 power series, part ii 7. One of the first power series we examined was. 2!

Project 3: Using Identities to Rewrite Expressions

f ( x) ( ) dx =

Options: Calculus. O C.1 PG #2, 3b, 4, 5ace O C.2 PG.24 #1 O D PG.28 #2, 3, 4, 5, 7 O E PG #1, 3, 4, 5 O F PG.

Approximations of Definite Integrals

SPH3UW Unit 7.5 Snell s Law Page 1 of Total Internal Reflection occurs when the incoming refraction angle is

0 otherwise. sin( nx)sin( kx) 0 otherwise. cos( nx) sin( kx) dx 0 for all integers n, k.

Numerical Integration by using Straight Line Interpolation Formula

( ) = A n + B ( ) + Bn

y udv uv y v du 7.1 INTEGRATION BY PARTS

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

1 Section 8.1: Sequences. 2 Section 8.2: Innite Series. 1.1 Limit Rules. 1.2 Common Sequence Limits. 2.1 Denition. 2.

Infinite Series Sequences: terms nth term Listing Terms of a Sequence 2 n recursively defined n+1 Pattern Recognition for Sequences Ex:

AP Calculus BC Formulas, Definitions, Concepts & Theorems to Know

( ) 2 3 ( ) I. Order of operations II. Scientific Notation. Simplify. Write answers in scientific notation. III.

THE NATIONAL UNIVERSITY OF IRELAND, CORK COLÁISTE NA hollscoile, CORCAIGH UNIVERSITY COLLEGE, CORK SUMMER EXAMINATION 2005 FIRST ENGINEERING

Crushed Notes on MATH132: Calculus

Convergence rates of approximate sums of Riemann integrals

Waves in dielectric media. Waveguiding: χ (r ) Wave equation in linear non-dispersive homogenous and isotropic media

Thomas Whitham Sixth Form

Section IV.6: The Master Method and Applications

Homework 3 solutions

Section 11.5 Notes Page Partial Fraction Decomposition. . You will get: +. Therefore we come to the following: x x

1.1 The FTC and Riemann Sums. An Application of Definite Integrals: Net Distance Travelled

Pre-Calculus - Chapter 3 Sections Notes

Theorem 5.3 (Continued) The Fundamental Theorem of Calculus, Part 2: ab,, then. f x dx F x F b F a. a a. f x dx= f x x

FACULTY OF MATHEMATICAL STUDIES MATHEMATICS FOR PART I ENGINEERING. Lectures

Accuplacer Elementary Algebra Study Guide

Important Facts You Need To Know/Review:

5.3. The Definite Integral. Limits of Riemann Sums

lecture 16: Introduction to Least Squares Approximation

Chapter 2. LOGARITHMS

REVIEW OF CHAPTER 5 MATH 114 (SECTION C1): ELEMENTARY CALCULUS

Chapter 12-b Integral Calculus - Extra

8.1 Arc Length. What is the length of a curve? How can we approximate it? We could do it following the pattern we ve used before

Linford 1. Kyle Linford. Math 211. Honors Project. Theorems to Analyze: Theorem 2.4 The Limit of a Function Involving a Radical (A4)

Addendum. Addendum. Vector Review. Department of Computer Science and Engineering 1-1

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

GRAPHING LINEAR EQUATIONS. Linear Equations. x l ( 3,1 ) _x-axis. Origin ( 0, 0 ) Slope = change in y change in x. Equation for l 1.

Area, Volume, Rotations, Newton s Method

lecture 24: Gaussian quadrature rules: fundamentals

lecture 22: Newton Cotes quadrature

FOURIER SERIES PART I: DEFINITIONS AND EXAMPLES. To a 2π-periodic function f(x) we will associate a trigonometric series. a n cos(nx) + b n sin(nx),

MAT641- Numerical Analysis (Master course) D. Samy MZIOU

1.3 Continuous Functions and Riemann Sums

Add Maths Formulae List: Form 4 (Update 18/9/08)

The Basic Properties of the Integral

ALGEBRA. Set of Equations. have no solution 1 b1. Dependent system has infinitely many solutions

MA123, Chapter 9: Computing some integrals (pp )

AP Calculus AB AP Review

Review of the Riemann Integral

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

[Q. Booklet Number]

( ) dx ; f ( x ) is height and Δx is

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

f(x) is a function of x and it is defined on the set R of real numbers. If then f(x) is continuous at x=x 0, where x 0 R.

4. When is the particle speeding up? Why? 5. When is the particle slowing down? Why?

UNISA NUMERICAL METHODS (COS 233-8) Solutions to October 2000 Final Exams

Transcription:

Numeril Methods Leture 5. Numeril itegrtio dr h. iż. Ktrzy Zkrzewsk, pro. AGH Numeril Methods leture 5

Outlie Trpezoidl rule Multi-segmet trpezoidl rule Rihrdso etrpoltio Romerg's method Simpso's rule Gussi method Numeril Methods leture 5

Numeril itegrtio - ide d Y The itegrl e pproimted y: d S i i Δ i X i i i Numeril Methods leture 5

Newto Cotes methods Newto Cotes itegrtio elogs to lss o methods with ied odes: utio is iterpolted y polyomil e.g. Lgrge polyomil where: 0... The, the itegrl o e pproimted s itegrl o the iterpolted utio d d Numeril Methods leture 5

5 Trpezoidl rule The trpezoidl rule ssumes:, thus: 0 d d d 0 But wht is 0 d? 0 Now i oe hooses,, i, s the two poits to pproimte y stright lie rom to. t ollows tht: 0 0 0 Numeril Methods leture 5

Trpezoidl rule d d re o trpezoid Y X Numeril Methods leture 5 6

Trpezoidl rule Emple : Veloity vt o roket rom t 8 s to t 0 s is give y: 0000 v t 000 l 9. 8t 0000 00t Use the sigle segmet trpezoidl rule to id the diste overed y the roket rom t 8 s to t 0 s Fid the true reltive error. Numeril Methods leture 5 7

Trpezoidl rule 0000 t 000 l 9. 8t 0000 00t 0000 8 000 l 9.88 0000 008 0000 0 000 l 9.80 0000 000 8 s 0 s 77.7 90.67 m / m / s s 77.7 90.67 0 8 868 m Numeril Methods leture 5 8

Trpezoidl rule The true vlue Δ 0000 000l 9.8t dt 8 0000 00t 0 06m The reltive error: 06 868 t 00 7.959 % 06 Numeril Methods leture 5 9

Multi-segmet trpezoidl rule The true error usig Y sigle segmet trpezoidl rule ws lrge. We divide the itervl rom to ito smller segmets o equl legth h d pply the trpezoidl rule over eh segmet: h or X d h h h d d d h h h h d Numeril Methods leture 5 0

d ih i h h h h h h d d... d d d... h h h h h ] [... h h Multi-segmet trpezoidl rule Numeril Methods leture 5

Emple : Multi-segmet trpezoidl rule Veloity vt o roket rom t 8 s to t 0 s is give y: 0000 v t 000 l 9. 8t 0000 00t Use the omple segmet trpezoidl rule to id the diste overed rom t 8 s to t 0 s or Fid the true reltive error. Numeril Methods leture 5

Multi-segmet trpezoidl rule 8 s 0 s ih i 0 8 h s 0 8 8 i ih 0 [ 8 9 0] [ 77. 7 8. 75 90. 67] 66 m Numeril Methods leture 5

Multi-segmet trpezoidl rule true vlue: 0 8 0000 000l 9. 8t dt 0000 00t 06m The reltive error: 0666 t 00.85% 06 Numeril Methods leture 5

Multi-segmet trpezoidl rule E t % % t 868-807 7.96 --- 66-05.85 5. 5-9. 0.865.09-5.5 0.655 0.59 5 09 -.0 0.98 0.669 6 08 -.9 0.070 0.0908 7 078-6.8 0.5 0.058 8 07 -.9 0.65 0.0560 Numeril Methods leture 5 5

Estimtio o error The reltive error or simple trpezoidl rule is E t " ζ, < ζ < The reltive error i the multi-segmet trpezoidl rule is sum o errors or eh segmet. The reltive error withi the irst segmet is give y: [ h ] E " ζ, < ζ < h " ζ h Numeril Methods leture 5 6

Estimtio o error By logy: [ ih i h ] Ei " ζi, i h < ζi < ih h " ζ i or -th segmet : [ { h} ] E " ζ, h < ζ < h " ζ Numeril Methods leture 5 7

Estimtio o error The totl error i the omple trpezoidl rule is sum o the errors or sigle segmet: E t E i i Formul: " ζ h i " ζi i i yields pproimte verge vlue o the seod derivtive i the rge o E t " ζ i α i < < Numeril Methods leture 5 8

Estimtio o error Tle elow presets the results or the itegrl 0 8 0000 000l 9. 8t dt 0000 00t s utio o the umer o segmets. Whe twie ireses, the solute error E t dereses our times! Vlue E % % t t 66-05.85 5. -5.5 0.655 0.59 8 07 -.9 0.65 0.0560 6 065 -. 0.09 0.000 Numeril Methods leture 5 9

Rihrdso s etrpoltio d Romerg s method o itegrtio Rihrdso s etrpoltio d Romerg s method o itegrtio ostitute etesio o the trpezoidl method d give etter pproimtio o the itegrl y reduig the true error. Numeril Methods leture 5 0

Rihrdso etrpoltio The true error otied whe usig the multi-segmet trpezoidl rule with segmets to pproimte itegrl is give y: E t where: C is pproimte ostt o proportiolity C Sie: E TV t true vlue pproimte vlue usig -segmets Numeril Methods leture 5

Rihrdso etrpoltio t e show tht: C TV the umer o segmets is douled rom to : C C TV TV We get: TV Numeril Methods leture 5

Rihrdso etrpoltio Emple : The veloity vt o roket rom t 8 s to t 0 is give y: 0000 v t 000 l 9. 8t 0000 00t Use Rihrdso etrpoltio rule to id the diste overed or Fid the reltive true error Numeril Methods leture 5

Tle o results or 8 segmets trpezoidl rule E t % % 868-807 7.96 --- 66-05.85 5. 5-9. 0.865.09-5.5 0.655 0.59 5 09 -.0 0.98 0.669 6 08 -.9 0.070 0.0908 7 078-6.8 0.5 0.058 8 07 -.9 0.65 0.0560 t Numeril Methods leture 5

Rihrdso etrpoltio 66m m TV TV or 66 06m Numeril Methods leture 5 5

Rihrdso etrpoltio The true vlue: 0 8 0000 000l 9. 8t dt 0000 00t 06 m The solute true error: Et 0606 m Numeril Methods leture 5 6

Rihrdso etrpoltio The reltive error: 0606 t 00 0.0090% 06 Compriso o dieret methods:. 8 m Trpezoidl rule 868 66 07 % m % t Trpezoidl rule 7.96.85 0.655 0.65 Rihrdso etrpoltio -- 065 06 06 t Rihrdso etrpoltio -- 0.066 0.0090 0.0000 Numeril Methods leture 5 7

Romerg's method Romerg s method uses the sme ptter s Rihrdso etrpoltio. However, Romerg used reursive lgorithm or the etrpoltio s ollows: TV The true vlue TV is repled y the result o the Rihrdso etrpoltio R Note lso tht the sig is repled y the sig R Numeril Methods leture 5 8

Romerg's method TV Ch Esimted true vlue is give y: R where: Ch is the vlue o the error o pproimtio Aother vlue o itegrl otied while doulig the umer o segmets rom to : R Estimted true vlue is give y: TV R R 5 R R R R Numeril Methods leture 5 9

Romerg's method A geerl epressio or Romerg itegrtio e writte s: k, j k, j k, j k, j, k k The ide k represets the order o etrpoltio k represets the vlues otied rom the regulr trpezoidl rule k represets the vlues otied usig the true error estimte s Oh The vlue o itegrl with or j is more urte th the vlue o the itegrl or j ide Numeril Methods leture 5 0

Romerg's method Emple : Veloity vt o roket rom t 8 s to t 0 s is give y: 0000 v t 000 l 9. 8t 0000 00t Use Romerg s method to id the diste overed. Use,,, d 8 Fid the solute true error d the reltive pproimte error Numeril Methods leture 5

Tle o results or 8 segmets trpezoidl rule E t % % 868-807 7.96 --- 66-05.85 5. 5-9. 0.865.09-5.5 0.655 0.59 5 09 -.0 0.98 0.669 6 08 -.9 0.070 0.0908 7 078-6.8 0.5 0.058 8 07 -.9 0.65 0.0560 t Numeril Methods leture 5

Romerg's method From this tle, the iitil vlues rom the trpezoidl rule re: 868 66,,, 07, To get the irst order etrpoltio vlues:,,,, 66 66 868 Numeril Methods leture 5

Romerg's method Similrly,,,,,,,,, 66 07 07 06 06 Numeril Methods leture 5

Romerg's method For the seod order etrpoltio: Similrly,,,, 06 06, 06 06, 5, 06 065 5,, 5 06 06 5 Numeril Methods leture 5 5

Romerg's method For the third order etrpoltio,,, 6, 06 0606 6 06m Numeril Methods leture 5 6

Romerg's method Appr. Appr. Appr. -segmet 868 065 -segmet 6 06 06 06 -segmet 06 06 8-segmet 07 mproved estimtes o the vlue o itegrl usig Romerg itegrtio Numeril Methods leture 5 7

Simpso's rule The trpezoidl rule ws sed o pproimtig the itegrd y irst order polyomil, d the itegrtig the polyomil over itervl rom to. Simpso s rule ssumes tht the itegrd e pproimted y seod order polyomil. d d where: 0 Numeril Methods leture 5 8

Simpso's rule A prol pssig through three poits :,, Y,,, 0 0 0 X Numeril Methods leture 5 9

0 Coeiiets 0,, re: Simpso's rule Numeril Methods leture 5 0

Simpso's rule Sie: d 0 d 0 0 Numeril Methods leture 5

Simpso's rule d 6 h t ollows tht: h d it is lled Simpso s / rule Numeril Methods leture 5

d d d 0... Multi-segmet Simpso's rule 0 d d... 0 6... Numeril Methods leture 5... 6... 6 6 d... 0 - i i h i,,...,...

Simpso's rule d 0 h 6... h... 6 h 6... h 6 Numeril Methods leture 5

Simpso's rule h d 0 {... } [...] {... } }]... h odd i i 0 i i i i eve odd i i 0 i i i i eve Numeril Methods leture 5 5

Estimtio o errors i Simpso's rule Approimte vlues o the itegrl, usig Simpso's rule with multiple segmets Approimte vlues E t Є t 6 8 0 065.7 06.6 06.0 06.5 06..8 0.0 0.06 0.0 0.00 0.096% 0.007% 0.0005% 0.000% 0.0000% Numeril Methods leture 5 6

Simpso's rule errors Error or oe segmet 5 E t ζ, < ζ < 880 Error or the multi-segmet E E 5 h 5 0 ζ ζ, 880 90 5 h ζ ζ, 880 90 5 < 0 < ζ < < ζ E i i 880 5 i ζ i 5 h 90 ζ i, i < ζi < i Numeril Methods leture 5 7

Simpso's rule errors True error E i t E i i ζ i 5 h 90 i ζ i 5 90 5 ζ i i 90 E t 90 5 5 i ζ the verge vlue o the derivtive i Numeril Methods leture 5 8

Guss-Qudrture Method Gussi itegrl is give y: d ostt oeiiets Poits d, whih deie the vlue o the itegrd re ot ied s eore, ut there re priori distriuted rdomly withi <,>. Numeril Methods leture 5 9

50 Guss-Qudrture Method. 0 d d 0 0 0 There re our ukows,,,. These re oud y ssumig tht the ormul gives et results or itegrtig geerl third order polyomil: Numeril Methods leture 5

5 Guss-Qudrture Method 0 0 d 0 d d d 0 0 Hee: The ormul would the give: Numeril Methods leture 5

5 Guss-Qudrture Method 0 0 Numeril Methods leture 5

5 Guss-Qudrture Method This gives us our equtios s ollows: we id tht the ove our simulteous olier equtios hve oly oe eptle solutio Numeril Methods leture 5

5 Guss-Qudrture Method d Hee:....... d Geerl -poit rules would pproimte the itegrl: Numeril Methods leture 5

Guss-Qudrture Method The oeiiets d rgumets or -poit Guss method re give withi the rge o <-,> : g d i i g i Coeiiets Futio rgumets.000000000.000000000 0.555555556 0.888888889 0.555555556 0.78585 0.65555 0.65555 0.78585-0.5775069 0.5775069-0.77596669 0.000000000 0.77596669-0.866-0.9980 0.9980 0.866 Numeril Methods leture 5 55

Guss-Qudrture Method Coeiiets Futio rgumets 5 0.696885 0.7868670 0.568888889 0.7868670 5 0.696885 6 0.79 0.607657 0.67995 0.67995 5 0.607657 6 0.79-0.9067986-0.58690 0.000000000 0.58690 5 0.9067986-0.9695-0.660986-0.869860 0.869860 5 0.660986 6 0.9695 Numeril Methods leture 5 56

So i the tle is give or: Guss-Qudrture Method g d d? The swer lies i tht y itegrl with limits o [, ] e overted ito itegrl with limits: [,] itegrls, how does oe solve Let, mt i, t ir t, t ollows tht: m Numeril Methods leture 5 57

58 Hee: t dt d Sustitutig our vlues o d d ito the itegrl gives us: dt t d Guss-Qudrture Method Numeril Methods leture 5

Emple 5: Guss-Qudrture Method Use two-poit Guss qudrture rule to pproimte the diste overed y roket rom t 8 s to t 0 s i the veloity is give y: 0000 v t 000 l 9. 8t 0000 00t Use the Guss-Qudrture Mmethod to id the diste overed rom t 8 s to t 0 s Fid the true error. Numeril Methods leture 5 59

Guss-Qudrture Method First, hge the limits o itegrtio rom rom [8,0] to [-,] 0 t dt 0 8 0 8 0 8 d 8 The weightig tors d utio rgumet vlues re : 9 d. 000000000 0. 5775069. 000000000 0. 5775069 Numeril Methods leture 5 60

Guss-Qudrture Method The ormul is: 9 d 9 9 0. 57750 9 0. 57750 9. 695 5. 5085 96. 87 708. 8 058. m Numeril Methods leture 5 6

Guss-Qudrture Method Sie: 0000. 695 000l 9. 8. 695 0000 00. 695 96.87 0000 5. 5085 000l 9. 8 5. 5085 0000 00 5. 5085 708.8 Numeril Methods leture 5 6

Guss-Qudrture Method The solute true error: E t 06. 058..9000 m The reltive error: t 06. 058. t 00% 06. 0.06% Numeril Methods leture 5 6