Ch E 310 - Fall 10 - Lecture 20

Ch E 310 - Fall 10 - Lecture 20 - Lecture 20 – November 4...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: Lecture 20 – November 4, 2010 Agenda: • Exam 2 recap • More on numerical integration of functions Multiple integrals • Numerical differentiation “High accuracy” finite difference formulas Derivatives of unequally spaced data Numerical differentiation in MATLAB Exam 2 Results Multiple Integrals • We can also integrate functions numerically with respect to two or more dimensions; a 2D integral would be: • Consider an example of an analytical indefinite integral: • This sequential approach is also used for definite integrals: dxdy y x f ) , ( 2 1 2 2 4 1 2 2 1 C y C y x dy C y x dxdy xy 4 1 2 4 1 2 4 1 1 2 1 1 2 2 1 2 2 1 1 1 1 1 dy y dy y y dxdy xy Multiple Integrals • Let’s look at the 2D function we are trying to integrate: >> f = @(x,y) x*y >> x = [0:.1:1]'; >> y = x'; >> z = f(x,y); >> surf(x,y,z) Multiple Integrals • We can use the trapezoidal rule (twice) to integrate this function numerically (and exactly?): • Alternatively, we can use the 2D version of the quad function in MATLAB ( dblquad ): • We can also evaluate the integral analytically using int : >> xint = trapz(x,z); >> xyint = trapz(y,xint) xyint = 0.2500 >> dblquad(f,0,1,0,1) ans = 0.2500 >> syms x y; >> int(int(x*y,x,0,1),y,0,1) ans = 1/4 Taylor Series: Estimating Derivatives • The Taylor Series can be used to estimate derivatives by virtue of its definition • Before we consider how this is possible, let’s consider the Taylor Series for a function f ( x ) where we know its value at a point x i , but we don’t know its value some arbitrary increment h “forward” at x i +1 • Expand around x i to define f ( x i +1 ): • What does this look like graphically? 4 3 2 1 6 2 h O h x f h x f h x f x f x f i i i i i • The estimates for f ( x i+1 ) improve with each term in the series • Nothing new here yet, we’ve seen this with the previous examples Taylor Series: Estimating Derivatives 2 1 h O h x f x f x f i i i Taylor Series: Estimating Derivatives • Let’s take a closer look at the first order form of the TSE: • If we’d like an estimate of the function’s derivative, we could use the truncated TSE to solve for the first derivative: • Graphically: h O h x f x f x f i i i 1 Taylor Series: Estimating Derivatives...
View Full Document

{[ snackBarMessage ]}

Page1 / 29

Ch E 310 - Fall 10 - Lecture 20 - Lecture 20 – November 4...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online