finite difference methods definitions. finite difference methods approximate derivatives **...

9
Finite Difference Methods Definitions x t x q t x x q x q x ) , ( ) , ( lim 0 t t x q t t x q t q t ) , ( ) , ( lim 0

Upload: bryan-park

Post on 14-Jan-2016

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation

Finite Difference Methods

Definitions

x

txqtxxq

x

qx

),(),(lim

0

t

txqttxq

t

qt

),(),(lim

0

Page 2: Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation

Finite Difference MethodsApproximate derivatives

x

txqtxxq

x

q

),(),(

t

txqttxq

t

q

),(),(

** difference between exact derivative and its approximation is the truncation error

Page 3: Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation

Finite Difference MethodsGiven a smooth function (i.e., a function that is continuous and has continuous derivatives), the Taylor series approximates the value of a function at one point based on the value of the function and its derivatives at another, nearby point

nn

n

Rxx

q

nxx

x

qxx

x

qxqxxq

)(!

1)(

!2

1)()()( 2

2

2

11

1

)()!1(

1

n

n

n

n xx

q

nR

Page 4: Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation

Finite Difference MethodsFirst-order Taylor series:

2)(2

1)()()( x

x

qxx

x

qxqxxq

solving for the first derivative

)(2

)()()(

x

qx

x

xqxxqx

x

q

Page 5: Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation

Finite Difference Methods

)(2

x

qxTE

Truncation error:

Page 6: Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation

Finite Difference Methods

Exercise: write the Taylor series expansion for q(x - x) and solve for the first differential...

Page 7: Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation

Finite Difference Methods

x

t

ii - 1 i + 1

n - 1

n

n + 1),( ni

ni txqq

)(),( 1 xOx

qqtx

x

q ni

ni

ni

),(),( tnxitx ni

x

t

Page 8: Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation

Finite Difference Methods

Backward time difference: explicit

)(),(1

tOt

qqtx

t

q ni

ni

ni

Forward time difference: implicit

)(),(1

tOt

qqtx

t

q ni

ni

ni

Page 9: Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation