PowerPointPrsentation - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

PowerPointPrsentation

Description:

Dipartimento d Ingegneria Civile ed Ambientale. Dr.-Ing. Michael Dumbser ... central point xi for each function value fj, including fi, up to powers ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 10
Provided by: sebastia70
Category:

less

Transcript and Presenter's Notes

Title: PowerPointPrsentation


1
Lecture on Numerical Analysis
Dr.-Ing. Michael Dumbser
05 / 11 / 2007
2
Numerical Differentiation of Functions
Task compute approximately
Recall the definition of the derivative
(1)
A possible and very simple discrete version of
(1) would be
(2)
Finite difference
3
Truncation Error Analysis
Recall the Taylor series expansion of a function
f(x)
We can use the Taylor series expansion in order
to quantify the error introduced by the discrete
derivative (2)
(3)
Solving (3) for the first derivative, we obtain
Error term
? First order accurate scheme.
4
Truncation Error Analysis
If the remaining error term after using the
Taylor series expansion is of the form
where p is the smallest remaining power of Dx,
then we say the scheme is p-th order accurate.
In other words, p is the so-called order of
accuracy of the scheme.
Exercise 1
Another two-point finite difference approximation
of the first derivative of a function f(x) is
given by
What is the order of accuracy of this finite
difference scheme? Use appropriate Taylor series
expansions.
5
Higher Order Finite Difference Schemes
The Taylor series is not only useful to estimate
the order of accuracy of FD schemes, but it is
also a nice tool to construct them.
We have seen that both two-point FD schemes are
only first order accurate. One will naturally
think that using more points will lead to more
accurate schemes. This is indeed the
case. Example Let us consider the construction
of a three-point FD scheme for the first
derivative, using the following three function
values fi-1 , fi , fi1Taylor series
expansion yields
6
Higher Order Finite Difference Schemes
More general Given a set of n points xj, write
the Taylor series with respect to the
central point xi for each function
value fj, including fi, up to powers
Dxn1. Solve the resulting equation
system for the desired derivative
of f(x), e.g. for the first derivative
fx or the second derivative fxx.
Exercise 2
Construct a three-point finite difference scheme
to approximate the second derivative fxx using
the three function values fi-1 , fi , fi1 .
What is the order of accuracy of the resulting
scheme?
Exercise 3
Construct a four-point finite difference scheme
to approximate the first, second and third
derivative of f(x) using the four function values
fi-1 , fi , fi1, fi2 . What is the order of
accuracy of the resulting schemes?
7
Solution of Exercise 3
Taylor series expansion
Solving the system with Maple gives us the
following result
8
Numerical Verification of the Order of Accuracy
The formal order of accuracy p of a FD scheme,
obtained theoretically via Taylor series
expansions, can also be verified empirically via
numerical experiments,comparing the FD
approximation against an exact reference
solutionWe use the general notation
The error between the exact derivative and the FD
approximation is
where C and p are unknown.Supposing that C does
not (or only little) depend on the step size Dx,
we can compute the derivative using two
successively refined mesh sizes Dx1 and Dx2, to
get
We finally obtain for the order of accuracy p
9
Exercise 4
a) Construct a five-point finite difference
scheme to approximate the first derivative
of f(x) using the five function values fi-2,
fi-1 , fi , fi1, fi2 . b) Check the formal
order of accuracy of the resulting scheme via
numerical experiments (so-called numerical
convergence study). To perform the numerical
convergence study, compute the derivative of the
function f(x)exp(-x2) at the point x1,
using the finite difference scheme and compare
against the exact value for the derivative.
Use the following sequence of Dxi
c) Now check also the two-point,
three-point and four-point finite difference
schemes obtained from the previous exercises and
compare against the five-point finite
difference scheme derived in part a) of this
exercise. Recall the following expressions
Write a Comment
User Comments (0)
About PowerShow.com