Chalmers Göteborg university School of Mathematical and Computing Sciences

Partial Differential Equations TM/GU
Preparatory Exercise



This exercise is intended to give some hands on experience of interpolation using piecewise polynomials as interpolating functions. There is also some material dealing with multidimensional calculus. The exercise is not compulsory, but it will probably be easier to digest the theory from the lectures if you have experimented a little with the programs and tried to answer the questions given below.

Piecewise Polynomial Interpolation
The Finite Element Method (FEM) uses piecewise polynomials as interpolating functions in order to find an approximate solution to a differential equation. A good knowledge of how these functions behave and how well they can approximate a given function is thus essential and will be of help to you during lectures and exercises.

After experimenting (see instructions below) with the MATLAB program PP, "Piecewise Polynomial lab", try to answer the following questions:

  1. What do we mean when we talk about a piecewise polynomial?
  2. What is the dimension of the function space consisting of all continuous, piecewise quadratic functions when we have only five subintervals?
  3. What do we mean by basis functions?
  4. How can we represent a piecewise polynomial using the basis functions?
  5. Is there a piecewise linear function on four subintervals that approximates 10*x*exp(-5*x) on [0,1] with a maximum error less than 0.1? Where do you have to place the nodes?
  6. By what factor does the error decrease when you double the number of subintervals in the case of piecewise constant polynomials? Piecewise linears? Piecewise quadratics?
  7. Is there any connection between the interpolation error ||u-Pu|| and the quantities ||hu'|| or ||h^2u''||?

Instructions: Download the two files PP.fig and PPmod.m (press the "Shift" key and then click on the link). You start "Piecewise Polynomial lab" from MATLAB by giving the command >> open('PP.fig').

In the window that pops up, first choose a function down to the left (or define one of your own), then choose which type of interpolating functions you want up to the right, press "create" and then "interpolate".

With the mouse, "click and drag", you are now able to change the values of the interpolating function, move and add nodes. You can also refine the mesh (uniformly by a factor two). Note that the basis functions are shown when you change the values of the interpolating function, which is also shown in text above the figure.

Multidimensional Calculus
Results from Calculus of Several Variables are important in the derivation of differential equation models in several space variables. Further, these results are used in deriving the variational formulation of a PDE as well as in the implementation of the Finite Element Method.

Experiment (see instructions below) with the MATLAB program MD, "Multi D lab". Can you verify some results from the calculus course? Green's theorem? Gauss' theorem?

Instructions: Download the two files MD.fig and R2adm.m (press the "Shift" key and then click on the link). You start "Multi D lab" from MATLAB by giving the command >> open('MD.fig'). There is on-line help available. You just press the button "help" once you have downloaded the file MDguide.html and put it in the same directory as MD.fig and R2adm.m. (Of course, you can also click on the link immediately to open the guide in your web browser.)


Back to PDE course page.

Last modified: Mon Nov 12 16:53:25 MET 2001