finite difference methods definitions. finite difference methods approximate derivatives **...
TRANSCRIPT
Finite Difference Methods
Definitions
x
txqtxxq
x
qx
),(),(lim
0
t
txqttxq
t
qt
),(),(lim
0
Finite Difference MethodsApproximate derivatives
x
txqtxxq
x
q
),(),(
t
txqttxq
t
q
),(),(
** difference between exact derivative and its approximation is the truncation error
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
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
Finite Difference Methods
)(2
x
qxTE
Truncation error:
Finite Difference Methods
Exercise: write the Taylor series expansion for q(x - x) and solve for the first differential...
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
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