Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Undetermined Coefficients-Numerical Methods in Engineering-Lecture 12 Slides-Civil Engineering and Geological Sciences, Slides of Numerical Methods in Engineering

Undetermined Coefficients, Skewed Fourth Order, Difference Operators, First Order Difference Operators, Numerical Differentiation, Difference Operator, Order of Accuracy, Forward Difference Operator, Backward Difference Operator, Central Difference Operator, Mixed Difference Operator

Typology: Slides

2011/2012

Uploaded on 02/20/2012

damyen
damyen 🇺🇸

4.4

(27)

274 documents

1 / 19

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CE 341/441 - Lecture 12 - Fall 2004
p. 12.1
LECTURE 12
DERIVATION OF DIFFERENCE APPROXIMATIONS USING UNDETERMINED
COEFFICIENTS
All discrete approximations to derivatives are linear combinations of functional values at
the nodes
The total number of nodes used must be at least one greater than the order of differentia-
tion to achieve minimum accuracy .
To obtain better accuracy, you must increase the number of nodes considered.
For central difference approximations to even derivatives, a cancelation of truncation
error terms leads to one order of accuracy improvement
fip() aαfαaβfβaλfλ
+++
hp
------------------------------------------------------------------------E+=
p
Oh()
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download Undetermined Coefficients-Numerical Methods in Engineering-Lecture 12 Slides-Civil Engineering and Geological Sciences and more Slides Numerical Methods in Engineering in PDF only on Docsity!

CE 341/441 - Lecture 12 - Fall 2004

p. 12.

LECTURE 12DERIVATION OF DIFFERENCE APPROXIMATIONS USING UNDETERMINEDCOEFFICIENTS • All discrete approximations to derivatives are linear combinations of functional values at

the nodes

• The total number of nodes used must be at least one greater than the order of differentia-

tion

to achieve minimum accuracy

• To obtain better accuracy, you must increase the number of nodes considered.• For central difference approximations to even derivatives, a cancelation of truncation

error terms leads to one order of accuracy improvement

f^ i

p ( )

a

α^

f^ α

a β

f^ β

a λ

f λ

h

p

-^

E

p^

O h

(^

CE 341/441 - Lecture 12 - Fall 2004

p. 12.

Forward second order accurate approximation to the first derivative • Develop a forward difference formula for

which is

accurate

• First derivative with

accuracy

the minimum number of nodes is 2

• First derivative with

accuracy

need 3 nodes

• The first forward derivative can therefore be approximated to

as:

• T.S. expansions about

are:

f^ i

(^1) ( )

E

O h

(^

O h

(^

O h

(^

i^

i+

i+

O h

(^

df ----- dx

x^

x^ i

E

–^

α

1

f^ i

α

2

f^ i

1 +^

α

3

f^ i

2

h

x^ i

f^ i

f^ i

f^ i

1 +^

f^ i

h f

(^1) ( (^) i )^

(^2) h ---- 2

-^

f^ i

(^2) ( )

h

-^

f^ i

(^3) ( )

O h

(^

f^ i

2 +^

f^ i

h f

(^1) ( (^) i )^

h

2

f^ i

(^2) ( )

(^3) h f^

(^3) ( (^) i )^

O h

(^

CE 341/441 - Lecture 12 - Fall 2004

p. 12.

• Solving these simultaneous equations

,^

• Thus the equation now becomes

• The forward difference approximation of 2

nd

order accuracy

where

α

1

α

2

α

3

–^

f^ i

f^ i

1

1 ---^2

f^

i^

2

h

-^

)^

f^ i

(^

)^

f^ i

(^1) ( )

)^

f^ i

(^2) ( )

1 ---^6

4 ---^3

^

^

^ h

2

f^ i

(^3) ( )

O h

(^

f^ i

(^1) ( )

f^ i

-^

f^ i

1 +^

f^ i

2

h

-^

h

2

f^

(^3) ( )

O h

(^

f^ i

(^1) ( )

f^ i

-^

f^ i

1 +^

f^ i

2 +

h

-^

E

E

h

2

f^ i

(^3) ( )

CE 341/441 - Lecture 12 - Fall 2004

p. 12.

Forward first order accurate approximation to the second derivative • Derive the

forward difference approximations to

• Second derivative

3 nodes for

accuracy

• Develop Taylor series expansions for

,^

and

, substitute into expression and

re-arrange:

O h

(^

)^

f^ i

(^2) ( )

O h

(^

f^ i

(^2) ( )

E

–^

α

1

f^ i

α

2

f^ i

1 +^

α

3

f^ i

2

h

2

f^ i

f^ i

1 +^

f^ i

2

α

1

f^ i

α

2

f^ i

1 +^

α

3

f^ i

2

(^2) h

-^

α

1

α

2

α

3

(^

(^2) h

-^

f^ i

α

2

α

3

+^ h

^

^

^

f^ i

(^1) ( )

1 ---^2

α

2

α

3

(^

)^

f^ i

(^2) ( )

α

2

α

3

(^

h --) 6

-^

f^ i

(^3) ( )

O h

(^

CE 341/441 - Lecture 12 - Fall 2004

p. 12.

Skewed fourth order accurate approximation to the second derivative • Develop a fourth order accurate approximation to the second derivative at node

which

involves nodes

,^

and subsequent nodes to the right of node

requires 3 nodes for

accuracy

requires 4 nodes for

accuracy

requires 5 nodes for

accuracy

requires 6 nodes for

accuracy

• Therefore we consider nodes•^

is approximated as:

i

i^

–^

i^

i

f^ i

(^2) ( )

O h

(^

O h

(^

O h

(^

O h

(^

i^

i+

i+

i-

i+

i+

f^ i

(^2) ( )

f^ i

(^2) ( )

E

–^

α

1

f^ i

1

-^

α

2

f^ i

α

3

f^ i

1 +^

α

4

f^ i

2 +^

α

5

f^ i

3 +^

α

6

f^ i

4

(^2) h

CE 341/441 - Lecture 12 - Fall 2004

p. 12.

• Steps to solve for the unknown coefficients in the linear combination for

• Develop Taylor series expansions for

,^

,^

,^

• Substitute and re-arrange to collect terms on equal derivatives• Generate equations by setting coefficients of

to 1 and the remaining 5 leading

coefficients to zero

f^ i

(^2) ( )

f^ i

1

-^

f^ i

1 +^

f^ i

2 +^

f^ i

3 +^

f^ i

4

f^ i

(^2) ( )

CE 341/441 - Lecture 12 - Fall 2004

p. 12.

Notes • Intermediate functional values are defined as• First order central difference operator defined using intermediate nodes• The central difference operator is defined at an intermediate node as• The

order of the difference operator

is related to the number of times that the operator

is applied and not to the

order of accuracy

• Higher order difference operators

simply repeat operation as indicated by the operator

f^ i

1 --- 2 +^

f^

x^ i

h --- 2

^

^

δ^

f^ i

f^ i

1 --- 2 +^

f^ i

1 --- 2

δ^

f^ i

1 --- 2 +^

f^ i

1 +^

f^ i

CE 341/441 - Lecture 12 - Fall 2004

p. 12.

Second order forward difference operator

2

f^ i

f^

i

(^

f^ i

1 +^

f^ i

(^

f^

i^

1 +^

f^

i

f^ i

2 +^

f^ i

1

(^

)^

f^ i

1 +^

f^ i

(^

2

f^ i

f^ i

2 +^

f^ i

1 +

–^

f^ i +

CE 341/441 - Lecture 12 - Fall 2004

p. 12.

Second order central difference operator

δ

2

f^ i

δ δ

f^

i (^

δ^

f^ i

1 --- 2 +^

f^ i

1 --- 2

^

^

δ^

f^ i

1 --- 2 +^

δ^

f^ i

1 --- 2

f^ i

1 +^

f^ i

(^

)^

f^ i

f^ i

1

(^

δ

2

f^ i

f^ i

1 +^

f^ i

-^

f^ i

1

+

CE 341/441 - Lecture 12 - Fall 2004

p. 12.

Second order mixed difference operator • We can also apply different operators; e.g.

• Applying a first order forward difference operator and then a first order backward differ-

ence operator

• We note that

and in general

2m

th )

order central differ-

ence operator

n^

m

-^

m

m

n

f^

i^

f^

i

(^

f^ i

f^ i

1

(^

f^

i^

f^

i^

1

f^ i

1 +^

f^ i

(^

)^

f^ i

f^ i

1

(^

f

i^

f^ i

1 +^

f^ i

-^

f^ i

1

+

δ

2

δ

2 m

m

m

CE 341/441 - Lecture 12 - Fall 2004

p. 12.

First order central difference operator approximation to the first derivative

f^ i

(^1) ( )

δ^

f^ i δ

x^ i

i-1/

i^

i+1/

h/

h/

δ x

= hi

f^ i

(^1) ( )

f^ i

1 --- 2 +^

f^ i

1 --- 2

  • h

i-1/

i^

i+1/

h^

h

δ x

= 2hi

f^ i

(^1) ( )

f^ i

1 +^

f^ i

1

  • 2 h

CE 341/441 - Lecture 12 - Fall 2004

p. 12.

Central difference approximation to the first derivative as an average of first order for-ward and backward difference approximations • We note that first order central difference approximations can also be derived as arith-

metic averages of first order forward and backward difference approximations

• This concept can be generalized to central approximations to higher order derivatives as

well (see the next section)

f^ i

(^1) ( )

1 ---^2

f^

i

x^ i

f^

i

x^ i

f^ i

(^1) ( )

1 ---^2

f^ i

1 +^

f^ i

  • h

f^ i

f^ i

1

h


f^ i

(^1) ( )

f^ i

1 +^

f^ i

1

  • 2 h

CE 341/441 - Lecture 12 - Fall 2004

p. 12.

• A complete operator approach to central differencing can be developed. However this

approach is somewhat artificial and overly complicated.