數值方法 2008, Applied Mathematics NDHU 1 Numerical Integration.

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.
數值方法 2008, Applied Mathematics NDHU 1 Nonlinear systems Newton’s method The steepest descent method.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
A Riemann sum is a method for approximating the total area underneath a curve on a graph. This method is also known as taking an integral. There are 3.
Mathematics1 Mathematics 1 Applied Informatics Štefan BEREŽNÝ.
Chapter 7 Numerical Differentiation and Integration
Numerical Integration Lecture (II)1
Lecture 3: Integration. Integration of discrete functions
Numerical Integration
Numerical Integration Lecture (I)1
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Numerical Differentiation and Integration ~ Newton-Cotes.
CISE301_Topic7KFUPM1 SE301: Numerical Methods Topic 7 Numerical Integration Lecture KFUPM Read Chapter 21, Section 1 Read Chapter 22, Sections 2-3.
Quadrature Greg Beckham. Quadrature Numerical Integration Goal is to obtain the integral with as few computations of the integrand as possible.
Numerical Integration UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the.
Integration. Problem: An experiment has measured the number of particles entering a counter per unit time dN(t)/dt, as a function of time. The problem.
Lecture 28: Comparison of different numerical integrators 1.Adaptive Simpson’s and Trapezoid Rules 2. Romberg Integration 3. Adaptive Gaussian Quadrature.
Area of a single trapezoid = h
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Applied Numerical Methods With MATLAB ® for Engineers.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Numerical Integration
Numerical Integration Approximating Definite Integral.
Numerical Computation
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Prentice Hall 5.4 Fundamental Theorem of Calculus.
Introduction to Numerical Analysis I
Chapters 5 and 6: Numerical Integration
4.6 Numerical Integration Trapezoid and Simpson’s Rules.
4.6 Numerical Integration. The Trapezoidal Rule One method to approximate a definite integral is to use n trapezoids.
數值方法 2008, Applied Mathematics NDHU 1 Simpson rule Composite Simpson rule.
MA2213 Lecture 4 Numerical Integration. Introduction Definition is the limit of Riemann sums I(f)
Integration Copyright © Cengage Learning. All rights reserved.
Trapezoidal Rule of Integration
Integration For a function f, The “integral of f from a to b” is the area under the graph of the function. If f is continuous, then the area is well defined,
數值方法 2008, Applied Mathematics NDHU 1 Numerical Integration.
Quadrature rules 1Michael Sokolov / Numerical Methods for Chemical Engineers / Numerical Quadrature Michael Sokolov ETH Zurich, Institut für Chemie- und.
Numerical Differentiation and Quadrature (Integration)
Definite Integrals Riemann Sums and Trapezoidal Rule.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Prentice Hall 5.5 Trapezoidal Rule.
6. Numerical Integration 6.1 Definition of numerical integration. 6.2 Reasons to use numerical integration. 6.3 Formulas of numerical Integration. 6.4.
數值方法 2008, Applied Mathematics NDHU 1 Numerical Differentiation.
Integration Review Part I When you see the words… This is what you think of doing…  A Riemann Sum equivalent to the definite integral is… -- 1.
Chapter Definite Integrals Obj: find area using definite integrals.
SE301_Topic 6Al-Amer20051 SE301:Numerical Methods Topic 6 Numerical Integration Dr. Samir Al-Amer Term 053.
Quadrature – Concepts (numerical integration) Don Allen.
Calculus 4-R Unit 4 Integration Review Problems. Evaluate 6 1.
Numerical Integration
Numerical Methods Some example applications in C++
Air Force Admin College, Coimbatore
Applied Numerical Methods
Midpoint and Trapezoidal Rules
MTH1170 Numeric Integration
5.5 Trapezoidal Rule.
Lecture 3 Taylor Series Expansion
Area of a single trapezoid = h
Integration Review Problems
Approximating Definite Integrals. Left Hand Riemann Sums.
Approximating Definite Integrals. Left Hand Riemann Sums.
Copyright © Cengage Learning. All rights reserved.
Area of a single trapezoid = h
Copyright © Cengage Learning. All rights reserved.
Chapter 6 Applications of Derivatives Section 6.5 Trapezoidal Rule.
Numerical Computation and Optimization
Area of a single trapezoid = h
Numerical Integration
Numerical Computation and Optimization
Objectives Approximate a definite integral using the Trapezoidal Rule.
Assignment 1: due 1/17/19 Estimate all of the zero of x3-x2-2x+1 graphically. Write a MatLab code for Newton’s method. Use your code to refine the graphical.
Numerical Integration
Air Force Admin College, Coimbatore
Presentation transcript:

數值方法 2008, Applied Mathematics NDHU 1 Numerical Integration

數值方法 2008, Applied Mathematics NDHU 2 Four 2-variate Gaussians

數值方法 2008, Applied Mathematics NDHU 3 Four 2-variate Gaussians

數值方法 2008, Applied Mathematics NDHU 4 Gaussian pdf

數值方法 2008, Applied Mathematics NDHU 5 Weight sum of Gaussian pdfs

數值方法 2008, Applied Mathematics NDHU 6 myfx4.m

數值方法 2008, Applied Mathematics NDHU 7 Plot 4G plot_4G.m

數值方法 2008, Applied Mathematics NDHU 8 Integration of 4G demo_int_4G.m Double integration

數值方法 2008, Applied Mathematics NDHU 9 Numeric calculus for double integrals

數值方法 2008, Applied Mathematics NDHU 10 Example Approx. integral True Integral demo_ex2_4G.m by dblquard.m

exp(cos(x)) 數值方法 2008, Applied Mathematics NDHU 11 plot_expcos.m

Definite Integration 數值方法 2008, Applied Mathematics NDHU 12 demo_quad.m

Symbolic integration 數值方法 2008, Applied Mathematics NDHU 13 demo_int.m

Example 數值方法 2008, Applied Mathematics NDHU 14 function of x:x.^2+2*x-5 fx1 = Inline function: fx1(x) = 1./3.*x.^3+x.^2-5.*x

數值方法 2008, Applied Mathematics NDHU 15 Numerical integration - quadrature

數值方法 2008, Applied Mathematics NDHU 16 Counter example >> demo_int function of x:(1-sin(x.^2)).^(1/3) Warning: Explicit integral could not be found.

數值方法 2008, Applied Mathematics NDHU 17

數值方法 2008, Applied Mathematics NDHU 18 plot_sin13.m

數值方法 2008, Applied Mathematics NDHU 19 Numerical integration demo_quad2.m

數值方法 2008, Applied Mathematics NDHU 20 Mesh

數值方法 2008, Applied Mathematics NDHU 21 Lower and upper sum

數值方法 2008, Applied Mathematics NDHU 22 Lower sum : lower bound

數值方法 2008, Applied Mathematics NDHU 23 Upper sum : upper bound

數值方法 2008, Applied Mathematics NDHU 24 Composite Trapezoid rule

數值方法 2008, Applied Mathematics NDHU 25 Uniform mesh

數值方法 2008, Applied Mathematics NDHU 26 Error Analysis

數值方法 2008, Applied Mathematics NDHU 27 Partition size

Composite Trapezoid rule  input s, a and b  f = inline(s); Set n  h = (b-a)/n; ans = 1/2*(f(a)+f(b))  for i=1:n-1 add f(a+i*h) to ans  ans= ans*h 數值方法 2008, Applied Mathematics NDHU 28

f = inline(s); Set n h = (b-a)/n; ans = 1/2*(f(a)+f(b)) Input s,a,b Flow Chart 數值方法 2008, Applied Mathematics NDHU 29 for i=1:n-1 add f(a+i*h) to ansans= ans*h EXIT

Simpson rule for numerical integration 數值方法 2008, Applied Mathematics NDHU 30

Exercise  Draw a flow chart to illustrate integration by the composite Trapezoid rule  Implement the composite Trapezoid rule for numerical integration, including flow chart and Matlab codes  Test your matlab function with the following integration  * Test your matlab function with definite integration of the weight sum of four Gaussian pdfs  * Compare your results with those obtained by using quad.m 數值方法 2008, Applied Mathematics NDHU 31 f(x)=exp(cos(x))