The Finite Element Method:
Theory, Implementation, and
Practice
November 9, 2010
Springer
,Preface
This is a set of lecture notes on finite elements for the solution of partial differential
equations. The approach taken is mathematical in nature with a strong focus on the
underlying mathematical principles, such as approximation properties of piecewise
polynomial spaces, and variational formulations of partial differential equations,
but with a minimum level of advanced mathematical machinery from functional
analysis and partial differential equations.
In principle, these lecture notes should be accessible to students with only a ba-
sic knowledge of calculus of several variables and linear algebra as the necessary
concepts from more advanced analysis are introduced when needed.
Throughout this text we emphasize implementation of the involved algorithms,
and have thus mixed mathematical theory with concrete computer code using the
numerical software MATLAB and its PDE-Toolbox.
Umeå, Mats G. Larson
December 2009 Fredrik Bengzon
v
,Acknowledgements
These notes are based on courses given at Chalmers University of Technology and
Umeå University during the last six years and the authors gratefully acknowledge
the contributions of the teachers and students involved.
vii
, Contents
1 Piecewise Polynomial Approximation in 1D . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Piecewise Polynomial Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 The Space of Linear Polynomials . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.2 The Space of Continuous Piecewise Linear Polynomials . . . 2
1.2 Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.1 Linear Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.2 Continuous Piecewise Linear Interpolation . . . . . . . . . . . . . . . 7
1.3 L2 -projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3.2 Derivation of a Linear System of Equations . . . . . . . . . . . . . . 9
1.3.3 Basic Algorithm to Compute the L2 -projection . . . . . . . . . . . 11
1.4 Quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4.1 The Mid-point Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.2 The Trapezoidal Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.3 Simpson’s Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5 Computer Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.5.1 Assembly of the Mass Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.5.2 Assembly of the Load Vector . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.6 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2 The Finite Element Method in 1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.1 The Finite Element Method for a Model Problem . . . . . . . . . . . . . . . . 23
2.1.1 A Two-point Boundary Value Problem . . . . . . . . . . . . . . . . . . 23
2.1.2 Variational Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.1.3 Finite Element Approximation . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.1.4 Derivation of a Linear System of Equations . . . . . . . . . . . . . . 25
2.1.5 Basic Algorithm to Compute the Finite Element Solution . . . 26
2.2 Basic A Priori Error Estimate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.3 Mathematical Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.3.1 Derivation of the Stationary Heat Equation . . . . . . . . . . . . . . . 28
2.3.2 Boundary Conditions for the Heat Equation . . . . . . . . . . . . . . 29
ix