Today’s class Numerical Integration Newton-Cotes Numerical Methods

Slides:



Advertisements
Similar presentations
Numerical Integration
Advertisements

ES 240: Scientific and Engineering Computation. Chapter 17: Numerical IntegrationIntegration  Definition –Total area within a region –In mathematical.
Section 5.7 Numerical Integration. Approximations for integrals: Riemann Sums, Trapezoidal Rule, Simpson's Rule Riemann Sum: Trapezoidal Rule: Simpson’s.
Chapter 7 Numerical Differentiation and Integration
Today’s class Romberg integration Gauss quadrature Numerical Methods
Numerical Integration
Numerical Integration Lecture (II)1
Newton-Cotes Integration Formula
Lecture 3: Integration. Integration of discrete functions
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
MANE 4240 & CIVL 4240 Introduction to Finite Elements Numerical Integration in 1D Prof. Suvranu De.
Numerical integration continued --- Simpson’s rules - We can add more segments OR - We can use a higher order polynomial.
Chapter 17 Numerical Integration Formulas. Graphical Representation of Integral Integral = area under the curve Use of a grid to approximate an integral.
Integration COS 323. Numerical Integration Problems Basic 1D numerical integration:Basic 1D numerical integration: – Given ability to evaluate f (x) for.
Numerical Integration Lecture (I)1
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Standing.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Numerical Differentiation and Integration ~ Newton-Cotes.
Numerical Integration Formulas
Simpson’s 1/3 rd Rule of Integration. What is Integration? Integration The process of measuring the area under a.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 21 Newton-Cotes Integration Formula.
Numerical Integration In general, a numerical integration is the approximation of a definite integration by a “weighted” sum of function values at discretized.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Applied Numerical Methods With MATLAB ® for Engineers.
Chapter 4 Numerical Differentiation and Integration 1/16 Given x 0, approximate f ’(x 0 ). h xfhxf xf h )()( lim)('    x0x0 x1x1 h x1x1 x0x0.
1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.
MECN 3500 Inter - Bayamon Lecture Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Lecture 19 - Numerical Integration CVEN 302 July 22, 2002.
MAT 1235 Calculus II Section 7.7 Approximate (Numerical) Integration
1 Chapter 7 NUMERICAL INTEGRATION. 2 PRELIMINARIES We use numerical integration when the function f(x) may not be integrable in closed form or even in.
Numerical Differential & Integration. Introduction If a function f(x) is defined as an expression, its derivative or integral is determined using analytical.
1 Simpson’s 1/3 rd Rule of Integration. 2 What is Integration? Integration The process of measuring the area under a curve. Where: f(x) is the integrand.
CSE 330 : Numerical Methods
1 Trapezoidal Rule of Integration. What is Integration Integration: The process of measuring the area under a function.
Review Taylor Series and Error Analysis Roots of Equations
Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.
Integration Copyright © Cengage Learning. All rights reserved.
CSE 3802 / ECE 3431 Numerical Methods in Scientific Computation
Trapezoidal Rule of Integration
Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1.
Section 5.9 Approximate Integration Practice HW from Stewart Textbook (not to hand in) p. 421 # 3 – 15 odd.
CSE 330 : Numerical Methods Lecture 15: Numerical Integration - Trapezoidal Rule Dr. S. M. Lutful Kabir Visiting Professor, BRAC University & Professor.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapter 21.
Numerical Integration
Today’s class Roots of equation Finish up incremental search
Today’s class Numerical differentiation Roots of equation Bracketing methods Numerical Methods, Lecture 4 1 Prof. Jinbo Bi CSE, UConn.
Curve Fitting Introduction Least-Squares Regression Linear Regression Polynomial Regression Multiple Linear Regression Today’s class Numerical Methods.
Today’s class Ordinary Differential Equations Runge-Kutta Methods
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 5 Integration and Differentiation.
Exam 1 Oct 3, closed book Place ITE 119, Time:12:30-1:45pm One double-sided cheat sheet (8.5in x 11in) allowed Bring your calculator to the exam Chapters.
Numerical Integration using Trapezoidal Rule
Quadrature – Concepts (numerical integration) Don Allen.
Air Force Admin College, Coimbatore
NUMERICAL DIFFERENTIATION Forward Difference Formula
Part 6 - Chapter 21.
Chapter 7 Numerical Differentiation and Integration
1. 2 What is Integration? Integration The process of measuring the area under a curve. Where: f(x) is the integrand a= lower limit of integration b=
NUMERICAL DIFFERENTIATION AND INTEGRATION
Today’s class Multiple Variable Linear Regression
Copyright © Cengage Learning. All rights reserved.
Summation Formulas Constant Series.
Copyright © Cengage Learning. All rights reserved.
Simpson’s 1/3rd Rule of Integration
SKTN 2393 Numerical Methods for Nuclear Engineers
Simpson’s 1/3rd Rule of Integration
Numerical Integration
Numerical Computation and Optimization
Objectives Approximate a definite integral using the Trapezoidal Rule.
Numerical Integration
Air Force Admin College, Coimbatore
Presentation transcript:

Today’s class Numerical Integration Newton-Cotes Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Discuss Mid-term Exam 1 Average = 74.5, Standard dev = 17.6 Histogram of scores Average = 74.5, Standard dev = 17.6 Max = 98 Min = 35 Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Discuss Mid-term Exam 1 1 (30) Use Taylor series to approximate at x=0.5 until t  1%, using a base point x=0. (Use 4 significant digits with rounding, and the true value is 0.4055)   Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Discuss Mid-term Exam 1 2 (30) Use the false-position method with initial guesses of 50 and 70 to determine x to a level of a  0.5%. (Use 4 significant digits with rounding)   Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Discuss Mid-term Exam 1 3 (20) Use the Newton-Raphson method with an initial guess of 6 to determine a root of the following function to a level of a  0.01% (use 4 significant digits with rounding)   Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Discuss Mid-term Exam 1 4 (20) Use the Gauss-Seidel method to solve the following linear equation system to a tolerance of s = 5% with a starting point (0, 0, 0).(Use 4 significant digits with rounding) Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Numerical Integration Numerical technique to solve definite integrals Find the area under the curve f(x) from a to b Another way to put it is that we need to solve the following differential equation Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Numerical Integration Where do we use numerical techniques? When you can’t integrate directly When you have a sampling of points representing f(x) as with the experiments results Graphical techniques Grid approximation Strip approximation Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Graphical Techniques Grid approximation Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Graphical Techniques Strip approximation Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Numerical Integration Numerical techniques Treat integral as a summation Basic idea is to convert a continuous function into discrete function The smaller the interval, the more accurate the solution but also at more computational expense Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Numerical Integration Newton-Cotes formulas Approximate function with a series of polynomials that are easy to integrate Zero-order approximation is equivalent to strip approximation First order approximation is equivalent to trapezoidal approximation Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Newton-Cotes Formulas Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Newton-Cotes Formulas Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Trapezoidal Rule Numerical Methods Prof. Jinbo Bi Lecture 12 CSE, UConn

Trapezoidal Rule Numerical Methods Prof. Jinbo Bi Lecture 12 CSE, UConn

Trapezoidal Rule Numerical Methods Prof. Jinbo Bi Lecture 12 CSE, UConn

Trapezoidal Rule Evaluate integral Analytical solution Trapezoidal solution Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Trapezoidal Rule Numerical Methods Prof. Jinbo Bi Lecture 12 CSE, UConn

Trapezoidal Rule Trapezoidal solution To increase accuracy, shorten up the interval Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Trapezoidal Rule Numerical Methods Prof. Jinbo Bi Lecture 12 CSE, UConn

Trapezoidal Rule If you split the interval into n sub-intervals, each sub-interval has a width of h = (b – a)/n Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Trapezoidal Rule More accurate as you increase n Double n and reduce the error by a factor of four However, if n is too large, you will start encountering round-off error and the integral solution can diverge Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Simpson’s Rules Second and third-order polynomial forms of the Newton-Cotes formulas Simpson’s 1/3 Rule Use three points on the curve to form a second order polynomial Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Simpson’s Rules Approximate the function by a parabola Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Simpson’s Rules Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Simpson’s Rules Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Simpson’s 1/3 Rule Error Multiple Application n must be even Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Simpson’s 3/8-Rule Approximate with a cubic polynomial Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Simpson’s 3/8-Rule Numerical Methods Prof. Jinbo Bi Lecture 12 CSE, UConn

Simpson’s 3/8-Rule Error Multiple Application n must be a multiple of 3 Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Simpson’s 3/8-Rule Both the cubic and quadratic approximations are of the same order The cubic approximation is slightly more accurate then the quadratic approximation Usually not worth the extra work required Only use the 3/8 rule if you need odd number of segments Can combine with 1/3 rule on some segments Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn 32

Example Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Integration with unequal segments We have until now assumed that each segment is equal If we are integrating based on experimental or tabular data, this assumption may not be true Newton-Cotes formulas can easily be adapted to accommodate unequal segments Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Trapezoid Rule with Unequal Segments Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Trapezoidal Rule Numerical Methods Prof. Jinbo Bi Lecture 12 CSE, UConn

Simpson’s Rule with Unequal Segments Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn

Next class Numerical Integration HW5 due Tuesday Oct 21 Numerical Methods Lecture 12 Prof. Jinbo Bi CSE, UConn