CPE 332 Computer Engineering Mathematics II

68
CPE 332 CPE 332 Computer Computer Engineering Engineering Mathematics II Mathematics II Part III, Chapter 10 Part III, Chapter 10 Numerical Differentiation and Integration Numerical Differentiation and Integration

description

CPE 332 Computer Engineering Mathematics II. Part III, Chapter 10 Numerical Differentiation and Integration. Today Topics. Chapter 10 Numerical Differentiation and Integration Derivative Approximation Forward, Backward, Centered Difference High Order Derivative High Accuracy Approximation - PowerPoint PPT Presentation

Transcript of CPE 332 Computer Engineering Mathematics II

Page 1: CPE 332 Computer Engineering Mathematics II

CPE 332CPE 332Computer Computer

Engineering Engineering Mathematics IIMathematics II

CPE 332CPE 332Computer Computer

Engineering Engineering Mathematics IIMathematics II

Part III, Chapter 10Part III, Chapter 10 Numerical Differentiation and IntegrationNumerical Differentiation and Integration

Page 2: CPE 332 Computer Engineering Mathematics II

Today Topics

• Chapter 10 Numerical Differentiation and Integration– Derivative Approximation

• Forward, Backward, Centered Difference• High Order Derivative• High Accuracy Approximation

– Integral Approximation• Polynomial

– Zero Order– First Order (Trapezoidal)– Second Order (Simpson 1/3)– Third Order (Simpson 3/8)

• More Accurate Method– Richardson Extrapolation

Page 3: CPE 332 Computer Engineering Mathematics II
Page 4: CPE 332 Computer Engineering Mathematics II
Page 5: CPE 332 Computer Engineering Mathematics II

Slope of Line

(x1,y1)

(x2,y2)

(y2-y1)

(x2-x1)

m=slope = tan = (y2-y1)/ (x2-x1)

Page 6: CPE 332 Computer Engineering Mathematics II

Definition of Derivative

• Derivative of f(x) at any point x is the slope of the tangent line at that point (x,f(x))

• Mathematically

• For function y=f(x), derivative of function is written in many forms

x

xfxxf

x

yxf

xx

)()(limlim)( of Derivative

00

ydx

dyyxf or )x'-deey -dee' (read,'),('

Page 7: CPE 332 Computer Engineering Mathematics II

Approximation of slope at point x

using secant line• Slope at ‘x’ [f(x+x) - f(x)] / x = y / x

(x, f(x))

(x+x, f(x+x))

x

f(x+x) - f(x)=y

As x approaches 0,we have y/xapproach a true slopeof f at x.

Page 8: CPE 332 Computer Engineering Mathematics II

Derivative(Forward)

)()(lim)('

0

xfxfxf

y

Page 9: CPE 332 Computer Engineering Mathematics II

Derivative(Backward)

)()(lim)('

0

xfxfxf

y

Page 10: CPE 332 Computer Engineering Mathematics II

Derivative(Central)

2

)()(lim)('

0

xfxfxf

x x

y

Page 11: CPE 332 Computer Engineering Mathematics II

Introduction

xi xi+1xi-1

f(xi)f(xi-1)

f(xi+1)

hh

Page 12: CPE 332 Computer Engineering Mathematics II

Finite Divided-Difference

Page 13: CPE 332 Computer Engineering Mathematics II
Page 14: CPE 332 Computer Engineering Mathematics II

Finite Divided-Difference

Page 15: CPE 332 Computer Engineering Mathematics II
Page 16: CPE 332 Computer Engineering Mathematics II

Finite Divided-Difference

Page 17: CPE 332 Computer Engineering Mathematics II
Page 18: CPE 332 Computer Engineering Mathematics II

Second Derivative

Page 19: CPE 332 Computer Engineering Mathematics II

Second Derivative

Page 20: CPE 332 Computer Engineering Mathematics II

High Accuracy Finite Divided-Difference

Page 21: CPE 332 Computer Engineering Mathematics II

High Accuracy Finite Divided-Difference

Page 22: CPE 332 Computer Engineering Mathematics II

Summary

Page 23: CPE 332 Computer Engineering Mathematics II

Summary

Page 24: CPE 332 Computer Engineering Mathematics II

Summary

Page 25: CPE 332 Computer Engineering Mathematics II

Numerical Integration• Newton-Cotes Integration Formula• Zero-Order Approximation• First-Order Approximation

– Trapezoidal Rule

• Second-Order Approximation– Simpson 1/3 rule

• Third-Order Approximation– Simpson 3/8 rule

• Romberg Integration– Richardson Extrapolation– Romberg Integration Algorithm

Page 26: CPE 332 Computer Engineering Mathematics II
Page 27: CPE 332 Computer Engineering Mathematics II
Page 28: CPE 332 Computer Engineering Mathematics II

Integral Approximation

Page 29: CPE 332 Computer Engineering Mathematics II

Integral Approximation

x0 x1 x2 x3 x4 xn-1 xn

Page 30: CPE 332 Computer Engineering Mathematics II

Zero-Order Approximation

x0 x1 x2 x3 x4 xn-1 xn

Page 31: CPE 332 Computer Engineering Mathematics II

Zero-Order Approximation

• a0=f(a)

x0 x1 x2 x3 x4 xn-1 xn

])[(][)( 00 abafabadxadxxfIb

a

b

a

Page 32: CPE 332 Computer Engineering Mathematics II

Zero-Order Approximation

• a0=f((a+b)/2)

x0 x1 x2 x3 x4 xn-1 xn

])[2

(][)( 00 abba

fabadxadxxfIb

a

b

a

Page 33: CPE 332 Computer Engineering Mathematics II

Zero-Order Approximatio

n

Page 34: CPE 332 Computer Engineering Mathematics II

First-Order Approximation

x0 x1 x2 x3 x4 xn-1 xn

Page 35: CPE 332 Computer Engineering Mathematics II

First-Order Approximation

Page 36: CPE 332 Computer Engineering Mathematics II

First-Order Approximation

Page 37: CPE 332 Computer Engineering Mathematics II

First-Order Approximation

Page 38: CPE 332 Computer Engineering Mathematics II
Page 39: CPE 332 Computer Engineering Mathematics II

Trapezoidal Rule

Page 40: CPE 332 Computer Engineering Mathematics II

Trapezoidal Rule

Page 41: CPE 332 Computer Engineering Mathematics II
Page 42: CPE 332 Computer Engineering Mathematics II
Page 43: CPE 332 Computer Engineering Mathematics II
Page 44: CPE 332 Computer Engineering Mathematics II

Second-Order Approximation

x0 x1 x2 x3 x4 xn-1 xn

Simpson’s 1/3 Rule

Page 45: CPE 332 Computer Engineering Mathematics II

Second-Order Approximation

Page 46: CPE 332 Computer Engineering Mathematics II

Second-Order Approximation

Page 47: CPE 332 Computer Engineering Mathematics II

Second-Order Approximation

3n

Page 48: CPE 332 Computer Engineering Mathematics II

Second-Order Approximation

Page 49: CPE 332 Computer Engineering Mathematics II
Page 50: CPE 332 Computer Engineering Mathematics II

Third-Order Approximation

x0 x1 x2 x3 x4 xn-1 xn

Simpson’s 3/8 Rule

Page 51: CPE 332 Computer Engineering Mathematics II

Third Degree Approximation

Page 52: CPE 332 Computer Engineering Mathematics II

Simson’s 3/8 Rule

Page 53: CPE 332 Computer Engineering Mathematics II
Page 54: CPE 332 Computer Engineering Mathematics II

Romberg Integration

Page 55: CPE 332 Computer Engineering Mathematics II

Romberg Integration

Page 56: CPE 332 Computer Engineering Mathematics II

Romberg Integration

Page 57: CPE 332 Computer Engineering Mathematics II

Romberg Integration

Page 58: CPE 332 Computer Engineering Mathematics II

Romberg Integration

Page 59: CPE 332 Computer Engineering Mathematics II

Romberg Integration

Page 60: CPE 332 Computer Engineering Mathematics II

Romberg Integration

Page 61: CPE 332 Computer Engineering Mathematics II

Romberg Integration

Page 62: CPE 332 Computer Engineering Mathematics II

Romberg Integration

Page 63: CPE 332 Computer Engineering Mathematics II

Romberg Integration

Page 64: CPE 332 Computer Engineering Mathematics II

Romberg Integration

Page 65: CPE 332 Computer Engineering Mathematics II

Romberg Integration

Page 66: CPE 332 Computer Engineering Mathematics II

Summary

Page 67: CPE 332 Computer Engineering Mathematics II

Homework 10: Ch 10• Download

Page 68: CPE 332 Computer Engineering Mathematics II

End of Week 13• Week 14

– Chapter 11 Solutions of ODE + HW 11

• Week 15: – Ch 12 Curve Fitting + HW 12

• End of Part III– Prepare for Final Exam