numerical_integration_-_integration - Num erical...

Info icon This preview shows pages 1–16. Sign up to view the full content.

View Full Document Right Arrow Icon
Numerical Integration
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Trapezoidal Rule Simpson’s Rule – 1/3 Rule Basic Numerical Integration – 3/8 Rule • Midpoint Gaussian Quadrature
Image of page 2
Basic Numerical Integration We want to find integration of functions of various forms of the equation known as the Newton Cotes integration formulas.
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Basic Numerical Integration Weighted sum of function values ) x ( f c ) x ( f c ) x ( f c ) x ( f c dx ) x ( f n n 1 1 0 0 i n 0 i i b a + + + + + + + + + = = L L f(x) x 0 x 1 x n x n-1 x
Image of page 4
12 Numerical Integration Idea is to do integral in small parts, like the way you first learned integration - a summation Numerical methods just try to make it faster and more accurate 0 2 4 6 8 10 3 5 7 9 11 13 15
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Numerical Integration Newton-Cotes Closed Formulae -- Use both end points Trapezoidal Rule : Linear Simpson’s 1/3-Rule : Quadratic Simpson’s 3/8-Rule : Cubic Boole’s Rule : Fourth-order Newton-Cotes Open Formulae -- Use only interior points midpoint rule
Image of page 6
Trapezoid Rule Straight-line approximation [ ] ) x ( f ) x ( f 2 h ) x ( f c ) x ( f c ) x ( f c dx ) x ( f 1 0 1 1 0 0 i 1 0 i i b a + + + = + + = = x 0 x 1 x f(x) L(x)
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Trapezoid Rule Lagrange interpolation 0 1 0 1 0 1 1 0 ( ) ( ) ( ) x x x x L x f x f x x x x x - - = + - - 0 1 dx a x , b x , , d ; h 0 ( ) (1 ) ( ) ( ) ( ) 1 x a let h b a b a x a L f a f b x b ξ ξ ξ ξ ξ ξ ξ - = = = = = - - = = = - + = =
Image of page 8
Trapezoid Rule Integrate to obtain the rule 1 0 ( ) ( ) ( ) b b a a f x dx L x dx h L d ξ ξ = [ ] 1 1 0 0 1 1 2 2 0 0 ( ) (1 ) ( ) ( ) ( ) ( ) ( ) ( ) 2 2 2 f a h d f b h d h f a h f b h f a f b ξ ξ ξ ξ ξ ξ ξ = - + = - + = +
Image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Example:Trapezoid Rule Evaluate the integral Exact solution 926477 . 5216 ) 1 x 2 ( e 1 e 4 1 e 2 x dx xe 1 x 2 4 0 x 2 x 2 4 0 x 2 = - = - = dx xe 4 0 x 2 Trapezoidal Rule 4 0 [ ] % 12 . 357 926 . 5216 66 . 23847 926 . 5216 66 . 23847 ) e 4 0 ( 2 ) 4 ( f ) 0 ( f 2 0 4 dx xe I 8 4 0 x 2 - = - = = + + = + + - = ε
Image of page 10
Simpson’s Simpson’s 1/3-Rule Rule Approximate the function by a parabola [ ] ) x ( f ) x ( f 4 ) x ( f 3 h ) x ( f c ) x ( f c ) x ( f c ) x ( f c dx ) x ( f 2 1 0 2 2 1 1 0 0 i 2 0 i i b a + + + + = + + + + = = f(x) L(x) x 0 x 1 x x 2 h h
Image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Simpson’s Simpson’s 1/3-Rule Rule + + + = = = - - - - + + - - - - + + - - - - = 2 b a x , b x , a x let ) x ( f ) x x )( x x ( ) x x )( x x ( ) x ( f ) x x )( x x ( ) x x )( x x ( ) x ( f ) x x )( x x ( ) x x )( x x ( ) x ( L 1 2 0 2 1 2 0 2 1 0 1 2 1 0 1 2 0 0 2 0 1 0 2 1 = = = = - = = = - = - = 1 x x 0 x x 1 x x h dx d , h x x , 2 a b h 2 1 0 1 ξ ξ ξ ξ ξ ) x ( f 2 ) 1 ( ) x ( f ) 1 ( ) x ( f 2 ) 1 ( ) ( L 2 1 2 0 + + + + - + + + - = ξ ξ ξ ξ ξ ξ
Image of page 12
Simpson’s Simpson’s 1/3-Rule Rule 1 1 1 1 2 1 0 2 1 1 1 0 1 1 b a )d ξ 1 ξ ( ξ 2 h ) f(x )d ξ ξ 1 ( )h f(x )d ξ 1 ξ ( ξ 2 h ) f(x d ξ ) ( L h f(x)dx - - - + + + + - + + - = ξ Integrate the Lagrange interpolation 1 1 2 3 2 1 3 1 1 2 3 0 ) 2 ξ 3 ξ ( 2 h ) f(x ) 3 ξ ( ξ )h f(x ) 2 ξ 3 ξ ( 2 h ) f(x - - - + + + + - + + - = [ ] ) f(x ) 4f(x ) f(x 3 h f(x)dx 2 1 0 b a + + + + + + =
Image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Simpson’s Simpson’s 3/8-Rule Rule Approximate by a cubic polynomial [ ] ) x ( f ) x ( f 3 ) x ( f 3 ) x ( f 8 h 3 ) f(x c ) f(x c ) f(x c ) f(x c ) x ( f c dx ) x ( f 3 2 1 0 3 3 2 2 1 1 0 0 i 3 0 i i b a + + + + + + + + + = + + + + + + = = f(x) L(x) x 0 x 1 x x 2 h h x 3 h
Image of page 14
Simpson’s Simpson’s 3/8-Rule Rule ) x ( f ) x x )( x x )( x x ( ) x x )( x x )( x x ( ) x ( f ) x x )( x x )( x x ( ) x x )( x x )( x x ( ) x ( f ) x x )( x x )( x x ( ) x x )( x x )( x x ( ) x ( L 2 3 2 1 2 0 2 3 1 0 1 3 1 2 1 0 1 3 2 0 0 3 0 2 0 1 0
Image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 16
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern