numerical analysis and partial di erential...

113
Numerical Analysis and Partial Differential Equations March 12, 2010

Upload: buinguyet

Post on 11-Mar-2018

216 views

Category:

Documents


3 download

TRANSCRIPT

Numerical Analysis and Partial Differential Equations

March 12, 2010

Contents

I Background 5

1 Model Problems 61.1 Boundary Value Problems . . . . . . . . . . . . . . . . . . . . . . . . 61.2 Transport/Advection . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.3 Diffusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.4 Dispersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 Overview 92.1 A Boundary Value Problem . . . . . . . . . . . . . . . . . . . . . . . 92.2 A Finite Element Method for the Two-Point BVP (D) . . . . . . . . 102.3 Finite Difference Method for (D) . . . . . . . . . . . . . . . . . . . . 122.4 Finite Element Method . . . . . . . . . . . . . . . . . . . . . . . . . 13

II Finite Element Methods 16

3 Abstract variational problems 173.1 Variational Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.2 Remarks on the Lax-Milgram Result . . . . . . . . . . . . . . . . . . 223.3 Calculus of Variations . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4 Abstract Finite Element Method 264.1 Abstract FEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.2 Galerkin Orthogonality . . . . . . . . . . . . . . . . . . . . . . . . . 284.3 Abstract Aubin-Nitsche Lemma . . . . . . . . . . . . . . . . . . . . . 294.4 Abstract Error Bound . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5 Variational Formulation of Boundary Value Problems 325.1 Elements of Function Spaces . . . . . . . . . . . . . . . . . . . . . . 32

5.1.1 Space of Continuous Functions . . . . . . . . . . . . . . . . . 32

2

5.1.2 Spaces of Integrable Functions . . . . . . . . . . . . . . . . . 345.1.3 The space H1

0 (Ω) in variational problems . . . . . . . . . . . 405.2 One Dimensional Problem . . . . . . . . . . . . . . . . . . . . . . . . 41

5.2.1 One Dimensional H1 inequalities . . . . . . . . . . . . . . . . 415.2.2 Dirichlet condition . . . . . . . . . . . . . . . . . . . . . . . . 435.2.3 One Dimensional Problem: Neumann condition . . . . . . . . 465.2.4 One Dimensional Problem: Robin/Newton Condition . . . . 47

5.3 Variational formulation of elliptic equations . . . . . . . . . . . . . . 495.3.1 Weak Solutions to Elliptic Problems . . . . . . . . . . . . . . 495.3.2 Variational Formulation of Elliptic Equation: Neumann Con-

dition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495.3.3 Variational Formulation of Elliptic Equation: Dirichlet Problem 525.3.4 A general second order elliptic problem . . . . . . . . . . . . 53

5.4 Inhomogeneous Boundary Conditions . . . . . . . . . . . . . . . . . . 56

6 Finite Element Method 586.1 One Dimensional Problems . . . . . . . . . . . . . . . . . . . . . . . 58

6.1.1 Dirichlet Problem . . . . . . . . . . . . . . . . . . . . . . . . 586.1.2 Abstract framework . . . . . . . . . . . . . . . . . . . . . . . 596.1.3 Reformulation as system of linear equations . . . . . . . . . . 60

6.2 Finite Element Method in two dimensions . . . . . . . . . . . . . . . 626.2.1 Element Stiffness Matrix in 2D for a general triangle . . . . . 686.2.2 Integration formula of linear functions on triangles . . . . . . 72

7 Finite element error analysis 737.1 One Dimensional Problems . . . . . . . . . . . . . . . . . . . . . . . 73

7.1.1 Bounding the L2 error . . . . . . . . . . . . . . . . . . . . . . 767.2 Two Dimensional Problem . . . . . . . . . . . . . . . . . . . . . . . . 777.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

8 FEM:-Miscellaneous 818.1 Inhomogeneous Dirichlet boundary conditions . . . . . . . . . . . . . 818.2 Other finite elements . . . . . . . . . . . . . . . . . . . . . . . . . . . 828.3 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 828.4 Higher Order Equations . . . . . . . . . . . . . . . . . . . . . . . . . 83

9 Finite element spaces 869.1 Definition of a finite element . . . . . . . . . . . . . . . . . . . . . . 869.2 Construction of a finite element space on a mesh . . . . . . . . . . . 879.3 Approximation theory . . . . . . . . . . . . . . . . . . . . . . . . . . 88

3

10 Parabolic problems 8910.1 Function spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8910.2 Parabolic equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

10.2.1 Semi-discrete finite element approximation . . . . . . . . . . 9110.2.2 Fully discrete finite element approximation . . . . . . . . . . 92

11 Variational Inequalities 9611.1 Projection theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9611.2 Elliptic variational inequality . . . . . . . . . . . . . . . . . . . . . . 9611.3 Obstacle problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

11.3.1 Finite element approximation . . . . . . . . . . . . . . . . . . 98

III Finite Differences 99

12 Introduction to Finite Difference Methods 10012.1 Finite Differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10012.2 Time-stepping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10112.3 Norms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

13 Finite difference schemes for the diffusion equation 10313.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10313.2 The Heat Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

13.2.1 The PDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10313.2.2 The Approximation . . . . . . . . . . . . . . . . . . . . . . . 10413.2.3 Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

13.3 Fourier analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10813.3.1 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10813.3.2 Initial value problems with periodic boundary conditions . . 110

4

Part I

Background

5

Chapter 1

Model Problems

Here is a small list of boundary and initial value problems for model partial differ-ential equations.

1.1 Boundary Value Problems

Let Ω ⊂ Rd be a bounded open set. Let q, f ∈ C(Ω,R), b ∈ (C(Ω,R))d andg ∈ C(∂Ω,R). We study the elliptic equation

−∆u+ b.∇u+ qu = f, x ∈ Ω,u = g, x ∈ ∂Ω.

In our study of finite difference methods we will study classical solutions of thisproblem, where all derivatives appearing in the equation exist everywhere in Ω andthe equation holds pointwise.

When studying finite element methods we will study the weak or variational form ofthis problem which is defined from (1.1) as follows, in the case g = 0. Let V = H1

0 (Ω)and define the bilinear form and L2 inner-product, respectively, by

a(u, v) =∫

Ω [∇u · ∇v + (b · ∇u)v + quv] dx,〈u, v〉 =

∫Ω uvdx.

(1.1)

Then the weak formulation of (1.1) is to find

u ∈ V : a(u, v) = 〈f, v〉 ∀v ∈ V. (1.2)

6

Under certain regularity assumptions on f this variational formulation is equivalentto the original strong form of the problem for classical solutions.

1.2 Transport/Advection

Let c ∈ C(R+,R+). The transport problem is then:

∂u∂t + c∂u∂x = 0 (x, t) ∈ (0,∞)× (0,∞),

u = g (x, t) ∈ [0,∞)× 0,u = h (x, t) ∈ 0 × (0,∞).

(1.3)

In our study of finite difference methods we will study classical solutions of thisproblem, where all derivatives appearing in the equation exist everywhere in (0,∞)×(0,∞) and the equation holds pointwise.

Let c ∈ C([−, 1, 1],R+) be 2−periodic. The periodic transport problem is then:

∂u∂t + c∂u∂x = 0 (x, t) ∈ (−1, 1)× (0,∞),u(−1, t) = u(1, t) t ∈ (0,∞),

u = g (x, t) ∈ [−1, 1]× 0.(1.4)

Again, in our study of finite difference methods we will study classical solutions ofthis problem, where all derivatives appearing in the equation exist everywhere in(−1, 1)× (0,∞) and the equation holds pointwise.

Let c ∈ C([−1, 1],R+) be 2−periodic. The (second order) wave equation is

∂2u∂t2

= ∂∂x [c2 ∂u

∂x ], (x, t) ∈ (−1, 1)× (0,∞),u(−1, t) = u(1, t) t ∈ (0,∞),∂u∂x(−1, t) = ∂u

∂x(1, t) t ∈ (0,∞),u = g (x, t) ∈ [−1, 1]× 0,∂u∂t = h (x, t) ∈ [−1, 1]× 0.

(1.5)

Again, in our study of finite difference methods we will study classical solutions ofthis problem, where all derivatives appearing in the equation exist everywhere in(−1, 1)× (0,∞) and the equation holds pointwise.

7

1.3 Diffusion

Let f, g ∈ C(Ω,R). The heat equation on an open bounded set Ω ⊂ Rd is:∂u∂t = ∆u+ f (x, t) ∈ Ω× (0,∞),u = 0 (x, t) ∈ ∂Ω× (0,∞),u = g (x, t) ∈ Ω× 0.

(1.6)

In our study of finite difference methods we will study classical solutions of thisproblem, where all derivatives appearing in the equation exist everywhere in Ω ×(0,∞) and the equation holds pointwise.

When studying finite element methods we will study the weak or variational formof this problem which is defined as follows. Define the bilinear form a(u, v) and L2

inner-product as in (1.1) with p = q = 0 and define V = H10 (Ω) as before. Then we

seeku ∈ C1([0,∞),V) : 〈∂u∂t , v〉+ a(u, v) = 〈f, v〉 ∀v ∈ V

u = g, t = 0.(1.7)

Under certain regularity assumptions on f and g this variational formulation isequivalent to the original strong form of the problem for classical solutions.

On occasion it will be of interest to study the periodic heat equation, namely∂u∂t = ∂2u

∂x2 + f (x, t) ∈ (−1, 1)× (0,∞),u(−1, t) = u(1, t) t ∈ (0,∞),∂u∂x(−1, t) = ∂u

∂x(1, t) t ∈ (0,∞),u = g (x, t) ∈ [−1, 1]× 0.

(1.8)

Again, in our study of finite difference methods we will study classical solutions ofthis problem, where all derivatives appearing in the equation exist everywhere in(−1, 1)× (0,∞) and the equation holds pointwise.

1.4 Dispersion

Let g ∈ C([−1, 1],R) be 2−periodic. The periodic Schrodinger equation on(−1, 1) is:

∂u∂t = i∂

2u∂x2 (x, t) ∈ (−1, 1)× (0,∞),

u(−1, t) = u(1, t) t ∈ (0,∞),∂u∂x(−1, t) = ∂u

∂x(1, t) t ∈ (0,∞),u = g (x, t) ∈ [−1, 1]× 0.

(1.9)

8

Chapter 2

Overview

2.1 A Boundary Value Problem

Consider the 1D boundary value problem: (D) given f ∈ C(0, 1), find u ∈ C2(0, 1)such that

−u′′ = f, (2.1)u(0) = u(1) = 0. (2.2)

(D) indicates that this is a Dirichlet problem, i.e. the boundary values of u areprescribed. “Clearly” a solution exists to this boundary value problem:

u(x) =∫ x

0

∫ s

0f(t) dt ds+ ax+ b. (2.3)

Is this solution unique? Suppose u1, u2 solve the boundary value problem (D). Setv(x) = u1 − u2. Then v(0) = v(1) = 0 and v′′(x) = u′′1(x)− u′′2(x) = 0. Thus

v′′ = 0 in (0, 1), (2.4)v(0) = v(1) = 0. (2.5)

Solving this yields v(x) = cx+d and using the boundary conditions gives us v(x) = 0,hence the solution to our original boundary value problem is unique.

Remark. 1. Existence of solutions to (BVP) for a (PDE) generally require someanalysis. Function spaces and functional analysis.

9

2. Uniqueness can usually be proved by contradiction along the lines above.

3. Well-posedness is important, especially when we are interested in approxima-tion. Well-posedness requires (i) existence; (ii) uniqueness; (iii) continuitywith respect to data (xj → x∗ ⇒ f(xj)→ f(x∗).

Some applications of (D):

1. Consider an elastic bar fixed at both ends subjected to a tangential load (i.e.parallel to the rod). Let u(x) be the displacement tangential to the rod, σ(x)be the traction. By linear elasticity

σ = Eu′ Hooke’s law, (2.6)−σ′ = f force balance/equilibrium equation, (2.7)u(0) = u(1) = 0. (2.8)

E is the material constant, Young’s modulus. Then Eu′′ = f, f ∈ I := (0, 1),u(0) = u(1) = 0. If E = 1 we retrieve (D).

2. Consider the one dimensional heat equation

ut = kuxx + f,x ∈ I, (2.9)u(0) = u(1) = 0, (2.10)

where u s the temperature, k a material constant (thermal diffusivity) and fis a body heat source, t is ‘time’. Then if we look for a steady state problemut = 0 and

−kuxx = f, x ∈ I, (2.11)u(0) = u(1) = 0. (2.12)

2.2 A Finite Element Method for the Two-Point BVP(D)

Let xjM+1j=0 be a partition of the unit interval I = [0, 1] so that 0 = x0 < x1 <

x2 < . . . < xj < xj+1 < . . . < xM < xM+1 = 1. Let Ij = (xj−1, xj), j = 1, . . . ,M+1and define |Ij | = hj and h = maxj=1,...,M+1 hj . Then h is said to be the “mesh” sizeand indicates how fine the mesh is. This mesh may be non-uniform, i.e. the hj arenon-uniform.

10

Actually each subinterval Ij is an element and hj is the element size. We havedivided I up into elements.

Now define Vh to be the finite dimensional space of functions

Vh := vh ∈ C[0, 1] : vh(0) = vh(1) = 0, vh|Ij is linear ∀j ∈ 1, . . . ,M + 1, (2.13)

i.e. Vh consists of continuous piecewise linear functions. Vh is determined by its valueat the internal mesh points (nodes) xj , j = 1, . . .M and dim(Vh) = M . Clearly Vhis a linear space (vh, wh ∈ Vh ⇒ αvh + βwh ∈ Vh ∀α, β ∈ R).

Vh is the simplest finite element space.

Since Vh is a linear space it must have a basis. Introduce the basis functionsφj(x)Mj=1, φj ∈ Vh such that for i = 0, 1, 2, .....,M,M + 1,

φj(xi) = δij =

1 i = j,0 i 6= j.

(2.14)

These φj are ‘hat’ functions. Note we can write these as

φj(x) =

x−xj−1

hjx ∈ Ij ,

xj+1−xhj+1

x ∈ Ij+1,

0 otherwise,

(2.15)

because φj is a continuous piecewise linear function. The φj(x)Mj=1 are linearlyindependent and any vh ∈ Vh can be written uniquely as vh(x) =

∑Mj=1 αjφj(x) and

vh(xi) =M∑j=1

αjφj(xi) = αi.

Proof : Consider w(x) =∑M

j=1wjφj(x). Then w(x) = 0∀x ∈ I ⇔ wj = 0, j =1, . . . ,M (since w(xj) =

∑Mj=1wjφj(xj) = wj).

Since these coefficients are the values of vh at the nodes we say that φj is a ‘nodal’basis.

11

Vh is a finite dimensional function space. We seek solutions of PDE’s in infinitedimensional function spaces and approximate the problem by seeking our approx-imation in a finite dimensional space. We wish to find an approximation uh ∈ Vhto the solution u of (D); of course u will not be piecewise linear!! There will be anapproximation error eh(x) = u(x)−uh(x). We would like eh to be small and indeedas h→ 0 we hope that eh(x)→ 0 in some sense.

How to find an approximation uh ∈ Vh?

2.3 Finite Difference Method for (D)

Finite differences can be used – replace derivatives by finite differences. Considerproblem (D) discretised with a uniform grid so xj = jh. Uj is the approximation tou(xj), in general Uj 6= u(xj). The discrete problem (Dh) is

−Uj−1 − 2Uj + Uj+1

h2= f(xj), (2.16)

U0 = UM = 0. (2.17)

This can be derived formally by Taylor series:

u(x± h) = u(x)± hu′(x) +h2

2u′′(x)± h3

3!u′′′(x) +

h4

4!u(4)(x)± . . . (2.18)

so

u(x+ h)− 2u(x) + u(x− h)h2

= u′′(x) +h2

24(u(4)(η+) + u(4)(η−)) (2.19)

= u′′(x) +h2

12u(4)(η(x)) (2.20)

u(xj−1)− 2u(xj) + u(xj+1)h2

= u′′(xj) +h2

12u(4)(ηj) (2.21)

= −f(xj) +h2

12u(4)(ηj) (2.22)

Rearranging, the solution of u satisfies

−(u(xj−1)− 2u(xj) + u(xj+1)

h2

)− f(xj) = −h

2

12u(4)(ηj) (2.23)

This suggest replacing u(xj) by Uj and neglecting the right hand side to obtain(Dh).

12

2.4 Finite Element Method

Since Vh does not have functions that can be differentiated twice we need a differentformulation of (D). Introduce the L2 inner product:

(u, v) :=∫Iu(x)v(x) dx. (2.24)

For the moment suppose that functions are continuous and the differential equationshold for every x ∈ I.

−u′′ − f = 0 x ∈ I (2.25)⇒ (−u′′ − f, v) = 0 ∀ v (2.26)⇒ (−u′′, v) = (f, v). (2.27)

Use integration by parts(u′, v′) = (f, v)− [u′v]10. (2.28)

Set VC := v ∈ C[0, 1] : v(0) = v(1) = 0. If u solves (D) then u ∈ VC and theproblem (P ) is to find u such that:

(u′, v′) = (f, v) ∀ v ∈ VC . (2.29)

We do not know that this problem has a solution or if it is unique. We needto impose a structure which has existence and uniqueness (this is a question infunctional analysis). In order to do this we look for a solution in a larger space. Wealso need the integrals to make sense – this is a question of function spaces.

The finite element approximation of (D) is defined by approximating the variationalproblem (2.29). This leads us to pose the problem (Ph): find uh ∈ Vh such that

(u′h, v′h) = (f, vh) ∀ vh ∈ Vh. (2.30)

Note that uh(x) =∑M

i=1 uiφi(x) and the problem of finding uh is equivalent tofinding the M numbers uiMi=1.

Now choose vh = φj , j = 1, . . . ,M and use the definition of uh:( M∑i=1

uiφi

)′, φ′j

= (f, φj) j = 1, . . . ,M (2.31)

⇒M∑i=1

ui(φ′i, φ′j) = (f, φj) j = 1, . . . ,M. (2.32)

13

Set Aij = (φ′i, φ′j) = (φ′j , φ

′i), i, j = 1, . . . ,M . Thus A is a symmetric matrix. Set

bj = (f, φj), j = 1, . . . ,M . Then we are trying to solve

M∑i=1

ui(φ′i, φ′j) = (f, φj) j = 1, . . . ,M (2.33)

⇒M∑i=1

Aijui = bj j = 1, . . . ,M (2.34)

⇔ Au = b, (2.35)

where u = (u1, . . . , uM )T and b = (b1, . . . , bM )T ∈ RM .

Thus the finite element method applied to (D) leads to a system of linear equationsfor the coefficients (u1, . . . , uM ) in uh =

∑Mi=1 uiφi where for Vh being piecewise

linear ui = u(xi).

We can easily discover more information about A:

1. We already know that

φj(x) =

x−xj−1

hjx ∈ Ij ,

xj+1−xhj+1

x ∈ Ij+1,

0 otherwise,

(2.36)

so

φ′j(x) =

1hj

x ∈ Ij ,−1hj+1

x ∈ Ij+1,

0 otherwise.(2.37)

Thus φj ∈ C(I), φ′j 6∈ C1(I) but φ′j ∈ L2(I), i.e.∫I(φ′j)

2 dx <∞, and∫I(φ′j)

2 dx =∫ xj+1

xj−1

(φ′j)2 dx =

∫ xj

xj−1

1h2j

dx +∫ xj+1

xj

1h2j+1

dx =1hj

+1

hj+1,

(2.38)

(φ′i, φ′j) =

∫Iφ′i(x)φ′j(x) dx =

∫ xj+1

xj−1

φ′i(x)φ′j(x) dx = 0 |i− j| > 1,

(2.39)

(φ′j , φ′j−1) =

∫ xj

xj−1

φ′j(x)φ′j−1(x) dx =∫ xj

xj−1

1hj· −1hj

dx =−1hj. (2.40)

By the symmetry of A we have found a formula ∀Aij .

14

2. In general

A =

1h1

+ 1h2

−1h2

0 · · · 0−1h2

1h2

+ 1h3

−1h3

0 · · · 00 −1

h3

1h3

+ 1h4

−1h4

0 · · · 0...

. . . . . . . . . . . . . . ....

etc

(2.41)

which we note has a positive diagonal and a negative off-diagonal.

3. A is positive definite! Let v ∈ RM . Set vk =∑M

i=1 viφi(x). Then

(v′k, v′k) =

M∑i=1

viφ′i,

M∑j=1

vjφ′j

=M∑i=1

M∑j=1

vivj(φ′i, φ′j) = vTAv. (2.42)

Observe that vTAv =∫I(v′k)

2 dx ≥ 0 ∀v ∈ RM and vTAv = 0⇔∫I(v′k)

2 dx =0⇔ (v′k)

2 = 0 ∀x⇔ v′k = 0⇒ vk(x) = vk(0) +∫ x

0 v′k(s) ds = vk(0) = 0 ∀x⇒

vi = vk(xi) = 0 ∀ i = 1, . . . ,M ⇒ v = 0.

4. In the special case when we have a uniform mesh (so that hj = h = 1/(M+1)):

A =1h

2 −1−1 2 −1

−1 2 −1. . . . . . . . .

(2.43)

This matrix occurs in finite difference approximations.

5. The matrix A is sparse, i.e. most of its elements are 0! This is an importantproperty which has to be exploited in computations. In fact it is an importantmotivation for using finite element spaces.

The computational problem is (i) to find the matrix A and right hand side b,(ii) solve Au = b. (Remember that in fact we are trying to solve PDE’s, andthe finite element method is an approximation method for doing this!)

15

Part II

Finite Element Methods

16

Chapter 3

Abstract variational problems

3.1 Variational Problems

Let V be a normed real vector space with norm ‖ · ‖V . Let um∞m=1 ⊂ V be asequence.

If the sequence satisfieslim

n,m→∞‖um − un‖V = 0,

then the sequence is said to be Cauchy.

If V is such that for any Cauchy sequence um∞m=1 there exists u ∈ V satisfying

limn→∞

‖un − u‖V = 0 (i.e, limn→∞

un = u),

then V is said to be a Banach space.

Let l(·) : V → R be a linear functional or linear form1, i.e,

l(αv + βw) = αl(v) + βl(w), ∀α, β ∈ R, v, w ∈ V,

then l(·) is said to be bounded if

∃cl ∈ R s.t |l(v)| ≤ cl‖v‖V , ∀v ∈ V.

Remark. We also say that a linear functional l(·) is continuous when it is bounded.1Note that if l(·) : V → R is linear, taking α = β = 0 yields l(0) = 0.

17

Let a(·, ·) : V × V → R. Then a(·, ·) is bilinear if for ∀α, β ∈ R, u, v, w ∈ V

a(αv + βw, u) = αa(v, u) + βa(w, u),a(u, αv + βw) = αa(u, v) + βa(u,w).

We say the bilinear form a(·, ·) : V × V → R is symmetric if

a(u,w) = a(w, u) ∀u,w ∈ V.

Let 〈·, ·〉 : V × V → R be a symmetric bilinear form on V satisfying

〈v, v〉 ≥ 0 ∀v ∈ V,〈v, v〉 = 0⇔ v = 0,

then 〈·, ·〉 is said to be an inner product on V .

Lemma 3.1.1 (Cauchy-Schwarz inequality). Let 〈·, ·〉 be an inner product on V .Then

|〈u, v〉| ≤√〈u, u〉

√〈v, v〉 ∀u, v ∈ V.

Proof.

0 ≤ 〈u+ λv, u+ λv〉= 〈u, u+ λv〉+ λ〈v, u+ λv〉 (by linearity w.r.t 1st variable)

= 〈u, u〉+ λ〈u, v〉+ λ〈v, u〉+ λ2〈v, v〉 (by linearity w.r.t 2nd variable)

= 〈u, u〉+ 2λ〈u, v〉+ λ2〈v, v〉 (by symmetry):= Q(λ).

If v = 0, the required inequality is obvious since the both sides are zero. Supposev 6= 0. Set

a = 〈v, v〉, b = 〈u, v〉, c = 〈u, u〉.

NotingQ(λ) = aλ2 + 2bλ+ c ≥ 0, a > 0,

we require a non-positive discriminant b2 ≤ ac, which is

〈u, v〉2 ≤ 〈u, u〉〈v, v〉.

18

Given a vector space V with an inner product 〈·, ·〉 we can set

‖v‖V :=√〈v, v〉 ∀v ∈ V

to be a norm.

Lemma 3.1.2. ‖ · ‖V defines a norm on V .

Proof. i) ‖v‖V ≥ 0 ∀v ∈ V .

ii) ‖v‖V = 0⇔ v = 0.

iii) ‖λv‖V =√〈λv, λv〉 =

√λ2〈v, v〉 = |λ|‖v‖V .

iv) Triangle inequality;

‖u+ v‖V =√〈u+ v, u+ v〉

=√〈u, u〉+ 2〈u, v〉+ 〈v, v〉

≤√‖u‖2V + 2‖u‖V ‖v‖V + ‖v‖2V

(by Cauchy-Schwarz inequality)

=√

(‖u‖V + ‖v‖V )2

= ‖u‖V + ‖v‖V .

Suppose V is an inner product space with 〈v, v〉 ∀v ∈ V and suppose V is a Banachspace with the norm ‖v‖V =

√〈v, v〉 ∀v ∈ V . Then V is a Hilbert space.

Remark. We say that the normed vector space V is complete if all Cauchy sequencesconverge in V , i.e, a Banach space is a complete normed vector space, a Hilbert spaceis a complete inner product space.

Let V ∗ be the space of all bounded linear functionals on V . Then V ∗ is a linearspace. Indeed, for l1, l2 ∈ V ∗ define

l(v) := αl1(v) + βl2(v) ∀v ∈ V, α, β ∈ R.

Then l is a bounded linear functional on V , thus l ∈ V ∗. This implies that V ∗ is alinear space.

19

For V ∗ we use the following norm;

‖l‖V ∗ := supv∈V,v 6=0

l(v)‖v‖V

∀v ∈ V.

Clearly

‖l‖V ∗ ≥l(v)‖v‖V

,

⇒ |l(v)| ≤ ‖l‖V ∗‖v‖V .

Hence ‖l‖V ∗ is the least upper bound of all cl such that |l(v)| ≤ cl‖v‖V ∀v ∈ V .

Consider vm∞m=0 ⊂ V satisfying limm→∞ vm = v ∈ V (i.e. limm→∞ ‖vm − v‖V =0). Then,

|l(v)− l(vm)| = |l(v − vm)| ≤ ‖l‖V ∗‖v − vm‖V → 0 as m→∞.

Thus, a bounded linear functional is a continuous linear functional.

The Abstract Variational Problem

Let V be a Hilbert space with inner product 〈·, ·〉 and ‖v‖V :=√〈v, v〉 ∀v ∈ V . Let

l(·) : V → R be a bounded linear functional. Let a(·, ·) : V × V → R be a bilinearform.

We consider the following variational problem.

(P) Find u ∈ V such that a(u, v) = l(v) ∀v ∈ V .

Theorem 3.1.3 (Lax-Milgram). Let a(·, ·) : V × V → R be a bilinear form suchthat

1) a(·, ·) is bounded, i.e.,

∃γ > 0 s.t. |a(v, w)| ≤ γ‖v‖V ‖w‖V ∀v, w ∈ V.

2) a(·, ·) is coercive (= V -elliptic), i.e.,

∃α > 0 s.t. a(v, v) ≥ α‖v‖2V ∀v ∈ V.

20

Let l(·) : V → R be a bounded linear functional, i.e.,

∃M > 0 s.t. |l(v)| ≤M‖v‖V ∀v ∈ V.

Then the variational problem (P) has a unique solution.

Proof. (Uniqueness)

Suppose u1, u2 are two solutions of (P).

⇒ a(u1, v) = l(v),a(u2, v) = l(v) ∀v ∈ V.

Subtraction and linearity give

a(u2, v)− a(u1, v) = a(u2 − u1, v) = 0 ∀v ∈ V.

In particular, choose v = u2 − u1, then we see

a(u2 − u1, u2 − u1) = 0.

By coercivety

0 ≥ α‖u2 − u1‖2V ,⇒ 0 ≥ ‖u2 − u1‖V ,⇒ u1 = u2.

(Existence)

This is proved by a direct consequence of the Riesz representation theorem (seeFunctional Analysis). Since we will now fix v ∈ V , then a(v, ·) : V → R is a boundedlinear functional. The Riesz representation theorem says that there uniquely existsa point (which we will call Av ) in V such that

a(v, w) = 〈Av,w〉 ∀w ∈ V.

Clearly this defines a map A : V → V , which is linear. Furthermore it holds that

|〈Av,w〉| = |a(v, w)| ≤ γ‖v‖V ‖w‖V ∀v, w ∈ V.

Now, take w = Av, then

LHS = ‖Av‖2V ≤ γ‖v‖V ‖Av‖V = RHS⇒ ‖Av‖V ≤ γ‖v‖V .

21

This implies that A is a bounded linear operator

A : V → V with |A| ≤ γ,

where

|A| := supv∈V,v 6=0

‖Av‖V‖v‖

≤ supv∈V,v 6=0

γ‖v‖V‖v‖V

= γ.

It follows that

a(u, v) = l(v) ∀v ∈ V⇔ 〈Au, v〉 = 〈L, v〉 ∀v ∈ V⇔ 〈Au− L, v〉 = 0 ∀v ∈ V⇔ Au = L : a linear operator equation .

Now let u be a solution of (P).⇔ u solves Au = L.⇔ u solves u = u− ρ(Au− L), ρ > 0.

Consider uk+1 = uk − ρ(Auk − L),u0: given.

Then we have an infinite sequence uk∞k=0.

Let wρ be a map defined by wρ(v) = v − ρ(Av − L). Then we see uk+1 = wρ(uk)and

‖wρ(v2)−wρ(v1)‖2V= ‖v2 − v1‖2V − 2ρa(v1 − v2, v1 − v2) + ρ2‖A(v2 − v1)‖2V .

⇒ ‖wρ(v2)− wρ(v1)‖2V ≤ (1− 2ρα+ ρ2|A|2)‖v2 − v1‖2.

Choose ρ ∈ (0, 2α/|A|2), then wρ is a strict contraction. Now the contractionmapping theorem for Hilbert spaces assures that wρ has a unique fixed point.

3.2 Remarks on the Lax-Milgram Result

1. Uniqueness: by our usual methods this follows from the linearity of l(·), thebilinearity of a(·, ·) and the coercivity of a(·, ·).

22

2. Stability estimate: we know that

c0‖u‖2V ≤ a(u, u) = l(u) ≤ c2‖u‖V

so we can deduce that the solution to our BVP satisfies

‖u‖H1(Ω) ≤1c0‖f‖L2(Ω). (3.1)

3. Continuity with repsect to l(·). Consider the two problems

u1 ∈ V s.t. a(u1, v) = l1(v) ∀ v ∈ Vu2 ∈ V s.t. a(u2, v) = l2(v) ∀ v ∈ V.

Thena(u1 − u2, v) = l1(v)− l2(v) = l(v). (3.2)

Choosing v = u1 − u2:

c0‖u1 − u2‖2V ≤ l(u1 − u2) ≤ ‖l1 − l2‖V ∗‖u1 − u2‖

⇒ ‖u1 − u2‖V ≤‖l1 − l2‖V ∗

c0

In terms of our original elliptic bvp’s we have that

‖u1 − u2‖H1(Ω) ≤1c0‖f1 − f2‖L2(Ω). (3.3)

4. If l is the zero element of V ∗ (i.e. l(v) = 0 ∀ v ∈ V ) then 0 = a(u, u) ⇒‖u‖V = 0 by coercivity and u = 0.

3.3 Calculus of Variations

Suppose a(·, ·) is also symmetric, i.e,

a(u, v) = a(v, u) ∀u, v ∈ V.

Define J(·) : V → R by

J(v) =12a(v, v)− l(v) ∀v ∈ V.

We say that J(·) is a quadratic functional.

Now consider the minimization problem;

23

(M) Find u ∈ V such thatJ(u) ≤ J(v) ∀v ∈ V.

Theorem 3.3.1. The problem (P) is equivalent to the problem (M).

Proof. ((P) ⇒(M)): Let u be a solution of (P).

J(v) = J(u+ (v − u))

=12a(u, u)− l(u) + (a(u, v − u)− l(v − u)) +

12a(v − u, v − u)

= J(u) + (a(u, v − u)− l(v − u)) +12a(v − u, v − u).

Since u solves (P),a(u, v − u)− l(v − u) = 0 ∀v ∈ V.

Therefore, noting that a(·, ·) is coercive,

J(v) = J(u) + (a(u, v − u)− l(v − u)) +12a(v − u, v − u)

= J(u) +12a(v − u, v − u)

≥ J(u) +α

2‖v − u‖2V

≥ J(u),

for all v ∈ V . This means that u solves (M).

((M) ⇒(P)): Let u denote a solution of (M). Since we have J(u) ≤ J(v) for allv ∈ V , for all t ∈ R we see

J(u) ≤ J(u+ tv). (3.4)

Let us fix v and defineG(t) := J(u+ tv).

Calculations yield

G(t) =12a(u+ tv, u+ tv)− l(u+ tv)

=12a(u, u)− l(u) + t(a(u, v)− l(v)) +

12t2(a(v, v)),

which means that G is quadratic in t.

24

Then, by (3.4)G(0) = J(u) ≤ J(u+ tv) = G(t)

for all t ∈ R. Note that G(t) has a critical point (a minimum) at t = 0. Thus,G′(0) = 0. Since

G′(t) = a(u, v)− l(v) + ta(v, v),

we obtain0 = a(u, v)− l(v),

which impliesa(u, v) = l(v) ∀v ∈ V.

Hence, u solves (P).

Note that we say (P) is the variational Euler-Lagrange equation for (M).

25

Chapter 4

Abstract Finite ElementMethod

4.1 Abstract FEM

Let h be a parameter that we shall send to zero. We have a family Vh of finitedimensional subspaces of V , i.e,

• Vh is a linear space.

• Vh ⊂ V .

• dimVh = Nh (integer depending on h), Nh → +∞ as h→ 0.

(Ph) Find uh ∈ Vh such that a(uh, vh) = l(vh) ∀vh ∈ Vh.

Theorem 4.1.1. If a(·, ·) is a coercive bilinear form and l(·) is linear, there uniquelyexists uh ∈ Vh solving (Ph).

Proof. (Uniqueness): Suppose u1h, u2

h solve (Ph). Then we see

a(uih, vh) = l(vh) ∀vh ∈ Vh, i = 1, 2.

=⇒ a(u1h − u2

h, vh) = 0 ∀vh ∈ Vh.=⇒ α‖u1

h − u2h‖2V ≤ a(u1

h − u2h, u

1h − u2

h) = 0.

=⇒ u1h − u2

h = 0.

26

(Existence): Now, Vh is finite dimensional, so it has a basis φhj Nhj=1. For all uh

there uniquely exists a vector (α1, · · · , αNh) ∈ RNh such that

uh =Nh∑j=1

αjφhj .

If uh is a solution of (Ph),

a(uh, φhk) = l(φhk) k = 1, 2, · · · , Nh.

⇐⇒Nh∑j=1

αja(φhj , φhk) = l(φhk) k = 1, 2, · · · , Nh.

⇐⇒ Aα = b,

where A = (a(φhj , φhk))j,k=1,··· ,Nh

, α = (α1, · · · , αNh)T,

b = (l(φh1), · · · , l(φhNh))T . Note that the matrix A is non-singular since a(·, ·) is

coercive. Therefore, the vector alpha = A−1b gives a solution uh of (Ph).

Remark.

1) Similarly we can propose a problem(P∗) Find u∗ ∈ V such that a(v, u∗) = l(v) for all v ∈ V .By setting a∗(w, v) := a(v, w) and using Lax-Milgram’s theorem we can showthe unique existence of a solution of (P∗).

2) If a(·, ·) is symmetric, then (P∗) is equivalent to (P).

3) If a(·, ·) is symmetric, then A is symmetric. If a(·, ·) is coercive, A is positivedefinite and satisfies βAβT > 0 ∀β ∈ RNh\0.

4) For symmetric a(·, ·) we propose a minimization problem:-(Mh) Find uh ∈ Vh such that J(uh) ≤ J(vh) for all vh ∈ Vh.The equivalence between (Mh) and (Ph) can be proved in the same way as theequivalence between (M) and (P).

Exercise Show that (Mh) can be formulated as:-Find αa such that

12αTAα− bTα ≤ 1

2βTAβ − bTβ

for all β ∈ RNh .

27

4.2 Galerkin Orthogonality

The idea of Galerkin orthogonality is the main ingredient for proving an error boundin the ‘energy’ norm, i.e. an error bound in the V norm.

Clearly eh = u− uh is the error, which in general is not 0. In order to evaluate thequality of our approximation we try to estimate the error. In order to do this wefind an equation that the error satisfies. Observe that since Vh ⊂ V we have from(??) that by choosing v = vh ∈ Vh ⊂ V we have for u ∈ V

a(u, vh) = l(vh) ∀ vh ∈ Vh. (4.1)

Now since u and uh essentially solve the same variational equation subtracting (??)from (4.1) we have

a(u, vh)− a(uh, vh) = l(vh)− l(vh) (4.2)⇒ a(u− uh, vh) = 0 ∀ vh ∈ Vh. (4.3)

This is called Galerkin orthogonality.

We wish to estimate a norm of eh. So consider

a(eh, eh) = a(u− uh, u− uh) = a(u− uh, u− vh + vh − uh)= a(u− uh, u− vh) + a(u− uh, vh − uh).

We use Galerkin orthogonality to deduce that the last term here is zero beacusevh − uh ∈ Vh! Thus

a(eh, eh) = a(eh, u− vh) ∀ vh ∈ Vh.

Lemma 4.2.1 (Cea’s Lemma). The Galerkin approximation uh of (??) satisifiesthe error bound

‖u− uh‖V ≤c1

c0minvh∈Vh

‖u− vh‖V . (4.4)

Proof : For eh = u − uh we have seen that by Galerkin orthogonality a(eh, eh) =a(eh, u− vh) ∀ vh ∈ Vh. By the coercivity and boundedness of a(·, ·)

c0‖eh‖2V ≤ a(eh, eh) = a(eh, u− vh) ≤ c1‖eh‖V ‖u− vh‖V ∀ vh ∈ Vh⇒ ‖eh‖V ≤

c1

c0minvh∈Vh

‖u− vh‖V .

28

Remark 4.2.2. 1. This shows us that the discretisation error eh measured in theV norm is of the ‘same size’ as the best approximation to u in Vh. The bestapproximation to u in Vh is defined as uBh where ‖u− uBh ‖V = minvh∈Vh

‖u−vh‖V .

2. We use Cea’s lemma by using an element of Vh which is a natural approxima-tion to u and for which we can estimate the error.

3. In general finite element spaces Vh have approximation properties like minvh∈V ‖u−vh‖V ≤ c(u)hs where h is the element size and s in an integer depending onthe polynomials used to define Vh. The higher s is the more derivatives in uthat are required in order to define c(u).

4.3 Abstract Aubin-Nitsche Lemma

Suppose that the assumptions of the Lax-Milgram theorem hold with respect to thebilinear form a(·, ·) and the Hilbert space V . Suppose that there exists a Hilbertspace H with inner product < ·, · >H into which V can be continuously embedded.It follows that for any g ∈ H we may define a bounded linear functional lg(·) by

lg(v) :=< g, v >H and |lg(v)| = | < g, v >H | ≤ ||g||H ||v||H ≤ cH ||g||H ||v||V .

• Dual regularity

There exists a positive constant cs such that for any g ∈ H, the adjoint problemfind w(g) ∈ V such that

a(v, w(g)) = lg(v)∀v ∈ V

has a unique solution satisfying the regularity result

||w(g)||Z ≤ cs||g||H .

• Approximation

Let Vh be a subspace of V which satisfies the following approximation propertyfor a subspace Z ⊂ V : There exists a linear operator Ih : Z → Vh for whichthere is a constant K independent of v and h such that for all v ∈ Z,

||v − Ihv||V ≤ Kh||v||Z .

29

Lemma 4.3.1. (Aubin-Nitsche lemma) Under the above assumptions,

||u− uh||H ≤ Kcsγh||u− uh||V .

Proof

Setting e := u− uh ∈ V we have that

||e||2H =< e, e >H= a(e, w(e))

and using Galerkin orthogonality,

< e, e >H= a(e, w(e)) = a(u− uh, w(e)) = a(u− uh, w(e)− w(e)∗h)≤ γ||u− uh||V ||w(e)− w(e)∗h||V

so that, by approximation,

||e||2H ≤ γ||u− uh||VKh||w(e)||Z

and applying the dual regularity result,

||e||2H ≤ γcsKh||e||H

from which we have the desired result.

4.4 Abstract Error Bound

• Regularity

There exists a positive constant cr such that for any f ∈ H, the problem findw(f) ∈ V such that

a(w(f), v) = lf (v)∀v ∈ V

has a unique solution satisfying the regularity result

||w(f)||Z ≤ cr||f ||H .

From Cea’s lemma we have

||u− uh||V ≤γ

α||u− v||V ∀v ∈ Vh

30

and using the approximation assumption together with the regularity assumptionu ∈ Z we have

||u− uh||V ≤γ

αKh||u||Z

and||u− uh||H ≤ Ch2||u||Z .

Higher order approximation of u

Suppose that

• u is sufficently smooth in a space Z(k), say, and the space Vh has a higherpower of approximation so that

||v − Ihv||V ≤ Khk||v||Z(k).

then we have the a priori error bound

||u− uh||H + h||u− uh||V ≤ Chk+1||u||Z(k)

31

Chapter 5

Variational Formulation ofBoundary Value Problems

5.1 Elements of Function Spaces

5.1.1 Space of Continuous Functions

• N is a set of non-negative integers.

• 1) An n-tuple α = (α1, · · · , αn) ∈ Nn is called a multi-index.

2) The length of α is

|α| :=n∑

j=1

αj.

3) 0¯

= (0, · · · , 0).

• Set Dα := (∂/∂x1)α1 · · · (∂/∂xn)αn .

Example 5.1.1. Assume n = 3, α = (α1, α2, α3) ∈ N3, u(x1, x2, x3) : R3 → R.

32

What is∑|α|=3D

αu ?

|α| = 3 =⇒3∑

j=1

αj = 3.

=⇒ α = (3,0,0), (0,3,0), (0,0,3), (2,1,0), (2,0,1), (0,2,1),(1, 2, 0), (1, 0, 2), (0, 1, 2), (1, 1, 1).

=⇒∑|α|=3

Dαu =∂3u

∂x31

+∂3u

∂x32

+∂3u

∂x33

+∂3u

∂x21∂x2

+∂3u

∂x21∂x3

+∂3u

∂x22∂x3

+∂3u

∂x1∂x22

+∂3u

∂x1∂x23

+∂3u

∂x2∂x23

+∂3u

∂x1∂x2∂x3.

This sort of list can get very long. Hence Dα is useful notation.

Definition 5.1.2. Let Ω be an open set in Rn. Let k ∈ N. Define spaces Ck(Ω),Ck(Ω) and C∞(Ω) by

Ck(Ω) := u : Ω→ R | Dαu is continuous in Ω for all |α| ≤ k,Ck(Ω) := u : Ω→ R | Dαu is continuous in Ω for all |α| ≤ k,C∞(Ω) := u : Ω→ R | Dαu is continuous in Ω for all α ∈ Nn,

where Ω is the closure of Ω. If Ω is bounded, Ω = Ω∪∂Ω, where ∂Ω is the boundaryof Ω. We denote C(Ω) = C0(Ω) and C(Ω) = C0(Ω).

Example 5.1.3. Set I := (0, 1) and u(x) := 1/x2 ∀x ∈ I. Then clearly for allk ≥ 0 u ∈ Ck(I). However, in I = [0, 1] u is not continuous at 0. Thus, u /∈ C(I).

Definition 5.1.4. For a bounded open set Ω ⊂ Rn, k ∈ N and u ∈ Ck(Ω), thenorm ‖u‖Ck(Ω) is defined by

‖u‖Ck(Ω) :=∑|α|≤k

supx∈Ω

|Dαu(x)|.

Example 5.1.5. Let I = (0, 1), u(x) := x, u ∈ C(I). Then, supx∈I |u(x)| = 1.

Definition 5.1.6. For an open set Ω ⊂ Rn and η ∈ C(Ω) the support of η denotedby support η (⊂ Rn) is defined by

support η := the closure of x ∈ Ω | η(x) 6= 0.

Remark. • The support of η is the smallest closed subset of Ω such that η = 0in Ω\support u.

33

• If support η is bounded then we say that η has compact support.

Definition 5.1.7. Define Ck0 (Ω) (⊂ Ck(Ω)) by

Ck0 (Ω) := u ∈ Ck(Ω) | support u is a bounded subset of Ω.

Lemma 5.1.8. C∞0 (Ω) is dense in Lp(Ω) for all 1 ≤ p <∞.

This means that every function in Lp(Ω) can be arbitrarily closely approximated bya function from C∞0 (Ω) (with the error measured in the Lp(Ω) norm).

Example 5.1.9. 1) Let 0 = x0 < x1 < · · · < xn = 1 be a patition of [0, 1]. Defineφj(x) : [0, 1]→ R by

φj(x) :=

x− xj−1

hx ∈ (xj−1, xj),

xj+1 − xh

x ∈ (xj , xj+1),

0 elsewhere.

Then we see φj ∈ C(I) and support φj = [xj−1, xj+1].

2) Define w(x) : Rn → R by

w(x) :=

e−

11− |x|2 |x| < 1,

0 otherwise.

Then we see support w = x ∈ Rn | |x| ≤ 1 and w ∈ C∞0 (Ω) for any Ωcontaining B(0, 1) := x ∈ Rn : |x| ≤ 1.Proof For |x| < 1, write w(x) = e−t with t = (1 − |x|2)−1 and show that wxj =−2e−tt2xj. Prove by induction that for all multi-indices α, that there exists apolynomial Pα such that Dαw(x) = Pα(x)e−tt2|α|, |x| < 1.

5.1.2 Spaces of Integrable Functions

Definition 5.1.10. Let Ω denote an open subset of Rn and assume 1 ≤ p < ∞.We define a space of integrable functions Lp(Ω) by

Lp(Ω) :=v : Ω→ R |

∫Ω|v(x)|pdx < +∞

.

34

The space Lp(Ω) is a Banach space with norm ‖ · ‖Lp(Ω) defined by

‖v‖Lp(Ω) =(∫

Ω|v(x)|pdx

)1/p

.

Especially the space L2(Ω) is a Hilbert space with inner product 〈·, ·〉L2(Ω) definedby

〈u, v〉L2(Ω) :=∫

Ωu(x)v(x)dx

and norm ‖ · ‖L2(Ω) defined by ‖u‖L2(Ω) :=√〈u, v〉L2(Ω).

We have Minkowski’s inequality as follows. For u, v ∈ Lp(Ω), 1 ≤ p <∞

‖u+ v‖Lp(Ω) ≤ ‖u‖Lp(Ω) + ‖v‖Lp(Ω).

We also have Holder’s inequality. For u ∈ Lp(Ω) and v ∈ Lq(Ω), 1 ≤ p, q <∞ with1/p+ 1/q = 1 ∣∣ ∫

Ωu(x)v(x)dx

∣∣ ≤ ‖u‖Lp(Ω)‖v‖Lq(Ω).

Now, any two integrable functions are equivalent if they are equal almost everywhere,that is, they are equal except on a set of zero measure. Strictly speaking, Lp(Ω)consists of equivalent classes of functions.

Example 5.1.11. Let u, v : (−1, 1)→ R be

u(x) =

1 x ∈ (0, 1),0 x ∈ (−1, 0],

v(x) =

1 x ∈ [0, 1),0 x ∈ (−1, 0),

The functions u and v are equal almost everywhere, since the set 0 where u(0) 6=v(0) has zero measure in the interval (−1, 1). So u and v are equal as integrablefunctions in (−1, 1).

Suppose that u ∈ Ck(Ω), where Ω is an open set of Rn. Let v ∈ C∞0 (Ω). Then wesee by integration by parts∫

ΩDαu(x)v(x)dx = (−1)|α|

∫Ωu(x)Dαv(x)dx,

where |α| ≤ k.

35

Definition 5.1.12. A function η : Ω → R is locally integrable if η ∈ L1(K) forevery bounded open set K such that K ⊂ Ω. The space L1

loc(Ω) consists of locallyintegrable functions.

Definition 5.1.13. Weak derivative Suppose η : Ω→ R ∈ L1loc(Ω) and there is a

locally integrable function wα : Ω→ R such that∫Ωwα(x)φ(x)dx = (−1)|α|

∫Ωη(x)Dαφ(x)dx

for all φ ∈ C∞0 (Ω).

Then the weak derivative of η of order α denoted by Dαu is defined by Dαu = wα.

Note that at most only one wα satisfies (5.1.13) so the weak derivative of u is well-defined. Indeed, the following DuBois-Raymond lemma shows such wα is unique.

Lemma 5.1.14. (DuBois-Raymond) Suppose Ω is an open set in Rn and w : Ω→ Ris locally integrable. If ∫

Ωw(x)φ(x)dx = 0

for all φ ∈ C∞0 (Ω), then w(x) = 0 for a.e x ∈ Ω.

We will use D for both classical and weak derivatives.

Example 5.1.15. Let Ω = R. Set u(x) = (1− |x|)+, x ∈ Ω, where

(x)+ :=x x > 0,0 x ≤ 0.

Thus,

u(x) :=

0 x ≤ −1,1 + x −1 ≤ x ≤ 0,1− x 0 ≤ x ≤ 1,0 1 ≤ x.

-

6

y

x

@@

@@@

-1 10

1

36

Clearly we see that u is locally integrable, u ∈ C(Ω) and u /∈ C1(Ω). However, itmay have a weak derivative. Take any φ ∈ C∞0 (Ω) and α = 1. Then,

(−1)|α|∫

Ωu(x)Dαφ(x)dx = −

∫ ∞−∞

u(x)φ′(x)dx

= −∫ 1

−1(1− |x|)φ′(x)dx

= −∫ 0

−1(1 + x)φ′(x)dx−

∫ 1

0(1− x)φ′(x)dx

=∫ 0

−11 · φ(x)dx+

∫ 1

0(−1)φ(x)dx

=∫

Ωw(x)φ(x)dx,

where

w(x) :=

0 x < −1,1 −1 < x < 0,−1 0 < x < 1,0 1 < x.

Here we do not worry about the points x = −1, 0, 1, since they have zero measure.Thus, u has its weak derivative Du = w.

Definition 5.1.16. Let k be a non-negative integer and p ∈ [0,∞). The spaceW k,p(Ω) defined by

W k,p(Ω) := u ∈ Lp(Ω) | Dαu ∈ Lp(Ω) ∀|α| ≤ k

is called a Sobolev space. It is a Banach space with the norm

‖u‖Wk,p(Ω) :=

∑|α|≤k

‖Dαu‖pLp(Ω)

1/p

.

Especially, when p = 2, we denote Hk(Ω) as W k,2(Ω). It is a Hilbert space with theinner product

〈u, v〉Hk(Ω) :=∑|α|≤k

〈Dαu,Dαv〉L2(Ω).

37

Of special interest are H1(Ω) and H2(Ω). If Ω = (a, b),⊂ R, we see that

〈u, v〉H1(Ω) = 〈u, v〉L2(Ω) + 〈Du,Dv〉L2(Ω)

=∫ b

au(x)v(x)dx+

∫ b

aDu(x)Dv(x)dx.

〈u, v〉H2(Ω) = 〈u, v〉L2(Ω) + 〈Du,Dv〉L2(Ω) + 〈D2u,D2v〉L2(Ω)

=∫ b

au(x)v(x)dx+

∫ b

aDu(x)Dv(x)dx+

∫ b

aD2u(x)D2v(x)dx.

Remark. 1) By using Holder’s inequality, we can prove Cauchy-Schwarz inequalityfor the inner product of Hk(Ω) as follows.

|〈u, v〉Hk(Ω)| ≤∑|α|≤k

|〈Dαu,Dαv〉L2(Ω)|

≤∑|α|≤k

‖Dαu‖L2(Ω)‖Dαv‖L2(Ω)

≤√∑|α|≤k

‖Dαu‖2L2(Ω)

√∑|α|≤k

‖Dαv‖2L2(Ω)

= ‖u‖Hk(Ω)‖v‖Hk(Ω).

2) Let Ω = (a, b) ⊂ R and u ∈ H1(Ω). Then u ∈ C(Ω). In higher space dimensionsthis statement is no longer true.

Definition 5.1.17. Hk0 (Ω) is defined to be the closure of C∞0 (Ω) with respect to

|| · ||Hk(Ω).

Loosely speaking Hk0 (Ω) consists of those functions in Hk(Ω) whose derivatives up

to order |α| ≤ k − 1 vanish on the boundary

Theorem 5.1.18. Poincare Inequality

If Ω is a bounded domain then then there exists a constant C = C(Ω) (dependingon Ω) such that

||v||L2(Ω) ≤ C|v|H1(Ω) ∀v ∈ H10 (Ω)

Theorem 5.1.19. Trace theorem

Let Ω be bounded with a Lipschitz boundary ∂Ω. Then there exists a bounded linearoperator tr : H1(Ω)→ L2(∂Ω) with the property that tr(v) and v|∂Ω coincide on ∂Ωfor all v ∈ C(Ω)∩H1(Ω). It follows that there exists a constant c = C(Ω) such that

38

||tr(v)||L2(∂Ω) ≤ C||v||H1(Ω) ∀v ∈ H1(Ω)

The following inequality is also true:

||v||L2(∂Ω) ≤ C||v||1/2L2(Ω)

||v||1/2H1(Ω)

.

Theorem 5.1.1. Divergence theorem Let Ω be a bounded Lipschitz domain inRn and Q : Ω→ Rn be a vector field whose components are in H1(Ω). The followingequality holds. ∫

Ω∇Qdx =

∫∂ΩQ · νds

where ν is the unit outward pointing normal to ∂Ω.

Remark. • Suppose Q = fei with the coordinate vectorei = (0, · · · , 1, · · · , 0)T , i.e, the jth component is eij = δi,j . Then we see

∇Q =∂

∂xif.

So by the Divergence theorem∫Ω

∂f

∂xidx =

∫∂Ωfνids.

In one dimensional case where Ω = (a, b), ∂Ω = a, b, the Divergence theorembecomes ∫ b

a

∂f

∂xdx = f(b)− f(a).

• Similarly Q = wvei yields∫Ω

∂w

∂xivdx = −

∫Ωw∂v

∂xidx+

∫∂ΩwvνidS.

Let us derive the integration by parts formula.

Proposition 5.1.20. Integration by partsFor Q ∈ H1(Ω; Rn), g ∈ H1(Ω),∫

ΩQ · ∇gdx =

∫∂ΩgQ · νds−

∫Ωg∇ ·Qdx.

39

Proof. By the divergence theorem we see that∫Ω∇(Qg)dx =

∫∂ΩQ · νgds.

Alternatively,∇(Qg) = g∇Q+Q · ∇g.

By combining these equality we get the desired formula.

For example, if Q = ∇u and g = v, we have by integration by parts formula that∫Ω∇u · ∇vdx =

∫∂Ωv∇u · νds−

∫Ωv∆udx.

where ∆ is the Laplacian and noting that

∇u · ν =∂u∂ν

we obtain ∫Ωv∆udx =

∫∂Ωv∂u

∂νds−

∫Ω∇u · ∇vdx.

Similarly we have that

−∫

Ω∇(p∇u)vdx =

∫Ωp∇u · ∇vdx−

∫∂Ωp∂u

∂νvds.

5.1.3 The space H10 (Ω) in variational problems

Because of the Poincare inequality there exists a constant c such that

c||v||H1(Ω) ≤ |v|H10 (Ω) ≤ ||v||H1(Ω).

It follows that we may take in a variational problem V = H10 (Ω) with norm either

||v||V = ||v||H1(Ω) or ||v||V = |v|H1(Ω).

Note that fora(w, v) =

∫Ω

(p∇w · ∇v + qwv)dx

with p(x) ≥ pm > 0 and q(x) ≥ qm ≥ 0 we can use the inequalities

a(v, v) ≥ pm|v|2H1(Ω) if qm = 0

ora(v, v) ≥ min(pm, qm)||v||2H1(Ω) if qm > 0

to deduce that a(·, ·) is coercive.

40

5.2 One Dimensional Problem

5.2.1 One Dimensional H1 inequalities

Here we derive some inequalities in the one dimensional case Ω = (a, b). We definea function space H1

ε0(Ω) by

H1ε0(Ω) := φ ∈ H1(Ω) | φ(a) = 0.

The following inequality is one example of Poincare-Friedrichs inequality.

Proposition 5.2.1. For all φ ∈ H1ε0(Ω),

‖φ‖L2(Ω) ≤1√2

(b− a)‖Dφ‖L2(Ω).

Proof. We can write that for a ≤ ∀x ≤ b

φ(x) =∫ x

aDφ(η)dη.

Then we see that

‖φ‖2L2(Ω) =∫ b

aφ(x)2dx

=∫ b

a

(∫ x

aDφ(η)dη

)2

dx

≤∫ b

a

(∫ x

a12dx

)(∫ x

aDφ(η)2dη

)dx

=∫ b

a(x− a)

∫ x

aDφ(η)2dηdx

≤∫ b

a(x− a)

∫ b

aDφ(η)2dηdx

=12

(b− a)2‖Dφ‖2L2(a,b).

Example 5.2.2. We can apply this inequality to prove the unique solvability ofthe Dirichlet problem with a functional space V , a bilinear form a(·, ·) and a linear

41

functional l(·) defined by

V := φ ∈ H1(0, 1) | φ(0) = φ(1) = 0,

a(u, v) :=∫ 1

0pDuDvdx for ∀u, v ∈ V,

l(u) :=∫ 1

0fudx for ∀u ∈ V.

We only check that the bilinear form a is bounded and coercive. We see that

|a(u, v)| ≤ supx∈(0,1)

|p(x)|‖Du‖L2(Ω)‖Dv‖L2(Ω) ≤ supx∈(0,1)

|p(x)|‖u‖H1(Ω)‖v‖H1(Ω)

and

a(v, v) ≥ p0‖Dv‖2L2(Ω)

=p0

2‖Dv‖2L2(Ω) +

p0

2‖Dv‖2L2(Ω)

≥ p0

2

(‖Dv‖2L2(Ω) +

2‖v‖2L2(Ω)

(b− a)2

)≥ α‖v‖2V ,

where α := p0 min(1, 2/(b− a)2)/2.

Proposition 5.2.3. The following Agmon’s inequality holds. For all φ ∈ H1ε0(Ω)

maxx∈Ω|φ(x)|2 ≤ 2‖φ‖L2(Ω)‖Dφ‖L2(Ω).

Proof.

φ(x)2 =∫ x

a

dφ(η)2

dηdη

= 2∫ x

aφ(η)Dφ(η)dη

≤ 2(∫ x

aφ(η)2dη

)1/2(∫ x

aDφ(η)2dη

)1/2

≤ 2(∫ b

aφ(η)2dη

)1/2(∫ b

aDφ(η)2dη

)1/2

≤ 2‖φ‖L2(Ω)‖Dφ‖L2(Ω),

which gives the inequality.

42

Noting that‖φ‖L2(Ω) ≤

√b− a max

x∈[a,b]|φ(x)|,

this Agmon’s inequality yields

maxx∈Ω|φ(x)|2 ≤ 2

√b− a max

x∈[a,b]|φ(x)|‖Dφ‖L2(Ω),

ormaxx∈Ω|φ(x)| ≤ 2

√b− a‖Dφ‖L2(Ω)

for any φ ∈ H1ε0(Ω).

5.2.2 Dirichlet condition

Let Ω = (0, 1), p(·), q(·) ∈ C(Ω) and f(·) ∈ L2(Ω). Note that ∂Ω = x = 0 ∪ x =1. We consider the following problem.

Find u : Ω→ R such that− d

dx(pdu

dx) + qu = f, x ∈ Ω,

u(x) = 0, x ∈ ∂Ω.(BVP)

Specifying the value of u at boundary points is said to be a Dirichlet boundarycondition. Now the methodology is

1) multiply the equation by a test function, integrate by parts and use boundaryconditions appropriately,

2) identify V , a(·, ·) and l(·),

3) verify, if possible, the assumptions of Lax-Milgram.

=⇒ Unique existence to the variational formulation of the BVP.

Let φ : Ω→ R be sufficiently smooth. We will call φ our test function. Let us followthe methodology.

43

1) ∫Ωf(x)φ(x)dx =

∫Ω

(− d

dx(p(x)

du(x)dx

)φ(x) + q(x)u(x)φ(x))dx

=[−p(x)

du(x)dx

φ(x)]x=1

x=0

+∫

Ω

(p(x)

du(x)dx

dφ(x)dx

+ q(x)u(x)φ(x))dx.

We want to eliminate the term [p(x)du(x)/dxφ(x)]x=1x=0, so we suppose that the

test function φ satisfies the same Dirichlet conditions as u, i.e, φ(0) = φ(1) = 0.Then we have that∫

Ω

(p(x)

du(x)dx

dφ(x)dx

+ q(x)u(x)φ(x))dx =

∫Ωf(x)φ(x)dx

for any test function φ. We want u, φ to be from the same space. For the term∫Ω uφdx to make sense, we need u, φ ∈ L2(Ω). For the derivatives du/dx, dφ/dx

to make sense, we take this further, so u, φ ∈ H1(Ω).

2) Let us chooseV :=

φ ∈ H1(Ω) | φ(0) = φ(1) = 0

,

whereH1(Ω) =

φ ∈ L2(Ω) | Dφ ∈ L2(Ω)

.

We equip V with the inner product 〈·, ·〉V := 〈·, ·〉H1(Ω). Let us define

a(u, v) :=∫

Ω(pDuDv + quv)dx,

l(v) :=∫

Ωfv dx.

Moreover, assume that p(x) ≥ p0 > 0, q(x) ≥ q0 > 0 for all x ∈ Ω.

3) We will verify the assumptions of Lax-Milgram’s theorem.

i) For φ ∈ V and f ∈ L2(Ω), we see by Cauchy-Schwarz inequality that

|l(φ)| = |∫

Ωfφdx|

≤ ‖f‖L2(Ω)‖φ‖L2(Ω)

≤ ‖f‖L2(Ω) (‖φ‖2L2(Ω) + ‖Dφ‖2L2(Ω))1/2

= cl‖φ‖V ,

where we have set cl := ‖f‖L2(Ω). Thus, l : V → R is bounded. Clearly l islinear, i.e, l(αφ+ βψ) = αl(φ) + βl(ψ) for any φ, ψ ∈ V and α, β ∈ R.

44

ii) Obviously a(·, ·) : V ×V → R is bilinear. Moreover a(·, ·) is bounded. Indeed,

|a(φ, ψ)| ≤ |∫

ΩpDφDψdx|+ |

∫Ωqφψdx|

≤ maxx∈Ω|p(x)|

∫Ω|DφDψ|dx+ max

x∈Ω|q(x)|

∫Ω|φψ|dx

≤ maxx∈Ω|p(x)|‖Dφ‖L2(Ω)‖Dψ‖L2(Ω) + max

x∈Ω|q(x)|‖φ‖L2(Ω)‖ψ‖L2(Ω)

≤ C(‖Dφ‖L2(Ω)‖Dψ‖L2(Ω) + ‖φ‖L2(Ω)‖ψ‖L2(Ω))

≤ C√‖Dφ‖2

L2(Ω)+ ‖φ‖2

L2(Ω)

√‖Dψ‖2

L2(Ω)+ ‖ψ‖2

L2(Ω)

= C‖φ‖H1(Ω)‖ψ‖H1(Ω),

where we have set

C := maxmaxx∈Ω|p(x)|,max

x∈Ω|q(x)|.

The bilinear form a(·, ·) is coercive, since for all φ ∈ V

a(φ, φ) =∫

Ωp|Dφ|2dx+

∫Ωq|φ|2dx

≥ p0

∫Ω|Dφ|2dx+ q0

∫Ω|φ|2dx

= C‖φ‖2V ,

where we have set C := minp0, q0.

We can now apply Lax-Milgram’s theorem to see that there uniquely exists asolution to the following problem

(P) Find u ∈ V such that∫Ω

(pDuDφ+ quφ)dx =∫

Ωfφdx,

for any φ ∈ V .

Remark. For V = H10 (Ω) we can use the norm ‖ · ‖V defined by

‖φ‖2V =∫

Ω|Dφ|2dx,

45

since the following Poincare inequality holds:- there exists C > 0 such that∫Ω|φ|2dx ≤ C

∫Ω|Dφ|2dx for ∀φ ∈ V.

By using this inequality we can prove the unique existence of the solution solving(P) with q ≡ 0 in the same way as above.

5.2.3 One Dimensional Problem: Neumann condition

Let Ω = (0, 1), p(x), q(x) ∈ C(Ω) and f(x) ∈ L2(Ω). We consider the followingproblem.

Find u : Ω→ R such that− d

dx

(pdu

dx

)+ qu = f, x ∈ Ω,

d

dxu(x) = 0, x ∈ ∂Ω.

(NBVP)

Specifying the value of du/dx at boundary points is said to be a Neumann boundarycondition. We assume the same conditions for p, q as before, i.e, p(x) ≥ p0 > 0,q(x) ≥ q0 > 0 in Ω. Let us derive the variational form. Take a sufficiently smoothtest function φ, multiply (NBVP) by φ and integrate.∫

Ωf(x)φ(x)dx =

∫Ω

(− d

dx

(p(x)

du(x)dx

)φ(x) + q(x)u(x)φ(x)

)dx

=[−p(x)

du(x)dx

φ(x)]x=1

x=0

+∫

Ω

(p(x)

du(x)dx

dφ(x)dx

+ q(x)u(x)φ(x))dx

=∫

Ω

(p(x)

du(x)dx

dφ(x)dx

+ q(x)u(x)φ(x))dx.

We have eliminated the term [p(x)du(x)/dxφ(x)]x=1x=0 by taking into account the Neu-

mann boundary conditions du(x)/dx = 0 for x = 0, 1. Let us choose the functionalspace V := H1(Ω) in this case and define

a(u, v) :=∫

Ω(pDuDv + quv)dx,

l(v) :=∫

Ωfv dx.

The corresponding variational problem is that:-

46

(P) Find u ∈ V such that ∫Ω

(pDuDφ+ quφ)dx =∫

Ωfφdx,

for any φ ∈ V .

Again the linear form l(·) : V → R and the bilinear form a(·, ·) : V × V → R satisfythe assumptions of Lax-Milgram’s theorem, hence the problem (P) has the uniquesolution.

Remark. Consider (NBVP) with q ≡ 0. Then we see∫Ωf(x)dx = −

∫Ω

d

dx(p(x)

du(x)dx

)dx

=[p(x)

du(x)dx

]x=1

x=0

= 0.

Thus, we need to assume∫

Ω f(x)dx = 0 as a compatibility condition in this case. Inorder to prove the unique existence of the solution, we need to modify the functionalspace. Let us define H1

m(Ω) by

H1m(Ω) := φ ∈ H1(Ω) |

∫Ωφdx = 0,

and equip the same inner product as H1(Ω). Again Poincare’s inequality is availablefor this space H1

m(Ω), i.e, for all φ ∈ H1m(Ω)∫

Ω|φ|2dx ≤ C

∫Ω|Dφ|2dx,

where C > 0 is a constant. By using this inequality we can prove the uniqueexistence of the solution solving (P) with q ≡ 0 and V = H1

m(Ω) in the same wayas above on the assumption

∫Ω f(x)dx = 0.

5.2.4 One Dimensional Problem: Robin/Newton Condition

Let Ω = (0, 1), p(x), q(x) ∈ C(Ω), f(x) ∈ L2(Ω), δ, g0, g1 ∈ R be constants. Weconsider the following problem. Find u : Ω→ R such that

− d

dx

(pdu

dx

)+ qu = f, x ∈ Ω,

−p ddxu(0) + δu(0) = g0,

pd

dxu(1) + δu(1) = g1.

(RNBVP)

47

Let us derive the variational form. Take sufficiently smooth φ. This kind of boundarycondition is said to be a Robin/Newton boundary condition. We assume the sameconditions for p, q as before, i.e, p(x) ≥ p0 > 0, q(x) ≥ q0 > 0 in Ω and that δ ≥ 0.∫

Ωf(x)φ(x)dx =

∫Ω

(− d

dx

(p(x)

du(x)dx

)φ(x) + q(x)u(x)φ(x)

)dx

=[−p(x)

du(x)dx

φ(x)]x=1

x=0

+∫

Ω

(p(x)

du(x)dx

dφ(x)dx

+ q(x)u(x)φ(x))dx

= (−g1 + δu(1))φ(1)− (g0 − δu(0))φ(0)

+∫

Ω

(p(x)

du(x)dx

dφ(x)dx

+ q(x)u(x)φ(x))dx,

which is equal to∫Ω

(p(x)

du(x)dx

dφ(x)dx

+ q(x)u(x)φ(x))dx+ δu(1)φ(1) + δu(0)φ(0)

=∫

Ωf(x)φ(x)dx− g1φ(1) + g0φ(0).

This suggests that we should define a(·, ·), l(·) and the functional space V as follow-ing.

a(u, v) :=∫

Ω(pDuDv + quv)dx+ δu(1)v(1) + δu(0)v(0),

l(v) :=∫

Ωfvdx+ g1v(1) + g0v(0),

V := H1(Ω).

As usual we need to show that the (bi)linear forms a, l are bounded and a is coer-cive to establish the unique solvability of (RNBV P ). Let us assume the followinginequality holds true for a while.

|φ(x)| ≤ C‖φ‖H1(Ω) (5.1)

for all φ ∈ H1(Ω). Then it is easy to see that a(·, ·), l(·) are bounded. Now

a(φ, φ) ≥ min(p0, q0)‖φ‖2V + δ(φ(1)2 + φ(0)2)

≥ min(p0, q0)‖φ‖2V= α‖φ‖2V ,

where α = min(p0, q0). Hence the bilinear form a becomes coercive and Lax-Milgram’s theorem assures the unique existence of the solution.

48

5.3 Variational formulation of elliptic equations

5.3.1 Weak Solutions to Elliptic Problems

The simplest elliptic equation is Laplaces’ equation:

∆u = 0, (5.2)

where ∆ :=∑n

j=1∂2

∂x2j

is the Laplace operator. A general second order elliptic

equation is: given a bounded open set Ω ⊂ Rn find u such that:

−n∑

i,j=1

∂xj

(aij(x)

∂u

∂xi

)+

n∑i=1

bi(x)∂u

∂xi+ c(x)u = f(x) x ∈ Ω, (5.3)

where classically aij ∈ C1(Ω), i, j = 1, . . . , n; bi ∈ C(Ω), i = 1, . . . , n; c ∈ C(Ω); f ∈C(Ω). For the equation to be elliptic we require

n∑i,j=1

aij(x)ξiξj ≥ Cn∑i=1

ξ2i ∀ ξ = (ξ1, . . . , ξn) ∈ Rn, (5.4)

where C > 0 is independent of x, ξ. Condition (5.4) is called uniform ellipticity.

The equation is usually supplemented with boundary conditions - Dirichlet, Neu-mann, Robin, or a mixed Dirichlet/Neumann boundary.

In the case of the homogeneous Dirichlet problem (u = 0 on ∂Ω) u is said to bea classical solution provided u ∈ C2(Ω) ∩ C(Ω). Elliptic theory tells us that thereexists a unique classical solution provided aij , bi, c, f and ∂Ω are sufficiently smooth.However we are only intersted in problems where the data is not smooth, for examplef = sign(1/2 − |x|),Ω = (−1, 1). This problem can’t have u ∈ C2(Ω) because ∆uhas a jump discontinuity are |x| = 1/2. With the help of functional analysis theexistence/uniqueness theory for ‘weak’, ‘variational’ solutions turn out to be easyand is good for FEM.

5.3.2 Variational Formulation of Elliptic Equation: Neumann Con-dition

Let Ω be a bounded domain in Rn with smooth boundary ∂Ω. Let p, q ∈ C(Ω) suchthat

p(x) ≥ p0 > 0, q(x) ≥ q0 > 0 ∀x ∈ Ω,

49

and f ∈ L2(Ω).

Find u : Ω→ R such that −∇ · (p∇u) + qu = f, x ∈ Ω,∂u

∂n= 0, x ∈ ∂Ω,

(NBVP)

where n is the unit outward normal to the boundary ∂Ω. Note that

∇ · (p∇u) =n∑i=1

∂xi

(p∂u

∂xi

)

=n∑i=1

(p∂2u

∂x2i

+∂p

∂xi

∂u

∂xi

)= p∆u+∇p · ∇u,

∂u

∂n= ∇u · n.

So we have a second order PDE. In one dimensional problem, in order to derive thevariational formulation we used integration by parts. Let us revise some formulaerelated to the integration by parts.

Notation:

∇v =(∂v

∂x1, . . . ,

∂v

∂x1

)T∇ · ∇v = ∇2v = ∆v

∇ ·A =n∑i=1

∂Ai∂xi

(D2v)ij =∂2v

∂xi∂xj

Tr(D2v) = ∆v.

Let v be a sufficiently smooth test function. Multiply (NBVP) by v and integrateusing Divergence theorem.∫

Ωfvdx =

∫Ω

(−∇ · (p∇u) + qu)vdx

=∫

Ωp∇u∇vdx−

∫∂Ωp∂u

∂nvds+

∫Ωquvdx.

50

Since ∂u/∂n = 0 on ∂Ω, we do not need to place a restriction on the test functionv. So if u solve (BVP), then∫

Ω(p∇u∇v + quv)dx =

∫Ωfvdx,

for any sufficiently smooth function v.

Now to use Lax-Milgram, we have to set up V , a(·, ·) and l(·). In order for the twoinner products on the left hand side to make sense, we take

V = H1(Ω),

a(u, v) =∫

Ω(p∇u∇v + quv)dx,

l(v) =∫

Ωfvdx,

for all u, v ∈ V . Note that V is a real Hilbert space with the norm

‖v‖V = ‖v‖H1(Ω) =(∫

Ω|∇v|2dx+

∫Ωv2dx

)1/2

and obviously a(·, ·) : V × V → R is bilinear and l(·) : V → R is linear. Moreoverwe observe

a(v, v) =∫

Ω(p|∇v|2 + qv2)dx

≥ p0

∫Ω|∇v|2dx+ q0

∫Ωv2dx

≥ minp0, q0‖v‖2H1(Ω)

= α‖v‖2H1(Ω),

where we have put α := minp0, q0. Thus a(·, ·) is coercive.

|a(v, w)| =∣∣ ∫

Ω(p∇v · ∇w + qvw) dx

∣∣≤∫

Ω(|p∇u · ∇w|+ |qvw|)dx

≤ C∫

Ω(|∇v|2 + v2)1/2(|∇w|2 + w2)1/2dx

≤ C(∫

Ω(|∇v|2 + v2)dx

)1/2(∫Ω

(|∇w|2 + w2)dx)1/2

= C‖v‖H1(Ω)‖w‖H1(Ω).

51

Therefore, a(·, ·) is bounded. Finally let us check the boundedness of l(·).

|l(v)| =∣∣ ∫

Ωfvdx

∣∣≤∫

Ω|f ||v|dx

≤(∫

Ωf2dx

)1/2(∫Ωv2dx

)1/2

= ‖f‖L2(Ω)‖v‖L2(Ω)

≤ ‖f‖H1(Ω)‖v‖H1(Ω)

= Cl‖v‖H1(Ω).

Thus, l(·) is bounded. Now we can apply Lax-Milgram to prove that there exists aunique solution u ∈ V to the following problem (P).

(P) Find u ∈ V such thata(u, v) = l(v)

for all v ∈ V .

5.3.3 Variational Formulation of Elliptic Equation: Dirichlet Prob-lem

On the same assumptions on Ω, p, q, f , we consider the following problem.

Find u : Ω→ R such that−∇ · (p∇u) + qu = f, x ∈ Ω,u = 0, x ∈ ∂Ω,

(DBVP)

Let us derive the variational form of (DBVP) as in the section 2.5. Multiply (DBVP)by a sufficiently smooth test function v and integrate. Then we see∫

Ωfvdx =

∫Ω

(p∇u∇v + quv)dx−∫∂Ωp∂u

∂nvdx.

Since we have u ≡ 0 on ∂Ω, we have to force our test function v to satisfy the samecondition; v ≡ 0 on ∂Ω. Then we obtain∫

Ω(p∇u∇v + quv)dx =

∫Ωfvdx

52

for any sufficient smooth function v with v ≡ 0 on ∂Ω. Set

V := v ∈ H1(Ω) | v = 0 on ∂Ω= H1

0 (Ω).

Note that V is a real Hilbert space with the inner product

〈v, w〉V := 〈∇v,∇w〉L2(Ω) + 〈v, w〉L2(Ω)

and ‖v‖V = ‖v‖H1(Ω). As before we define

a(v, w) :=∫

Ω(p∇v∇w + qvw) dx,

l(v) =∫

Ωfv dx.

The same argument as the previous section shows that a(·, ·) is a coercive andbounded bi-linear form and l(·) is a bounded linear functional on V . Therefore Lax-Milgram’s theorem tells us that there uniquely exists a solution to the variationalproblem of (DBVP).

5.3.4 A general second order elliptic problem

Consider the problem

−n∑

i,j=1

∂xj

(aij(x)

∂u

∂xi

)+

n∑i=1

bi(x)∂u

∂xi+ c(x)u = f(x) ∀x ∈ Ω (5.5)

with u = 0 on ∂Ω. Multiply by a test funciton and integrate by parts in the secondorder term using the divergence theorem. The result is the weak (variational) formof the BVP: find u ∈ V such that a(u, v) = l(v) ∀ v ∈ V where V = H1

0 (Ω) and

a(w, v) :=n∑

i,j=1

∫Ωaij(x)

∂w

∂xi

∂v

∂xj+

n∑i=1

∫Ωbi(x)

∂w

∂xiv(x) +

∫Ωc(x)w(x),

l(v) :=∫

Ωf(x)v(x) = (f, v).

We seek to apply the Lax-Milgram theorem. Recall (v, w)H10 (Ω) =

∫Ω vw+∇v∇w =

(v, w) + (∇v,∇w). We have three conditions to check to satisfy the theorem.

53

(1) Is l(·) a bounded linear functional? Clearly

l(αv + βw) = (f, αv + βw) = α(f, v) + β(f, w) = αl(v) + βl(w)

so l(·) is a linear functional on V and

|l(v)| =∣∣∣∣∫

Ωf(x)v(x) dx

∣∣∣∣ ≤ ‖f‖L2(Ω)‖v‖L2(Ω) ≤ ‖f‖L2(Ω)‖v‖H10 (Ω)

where we have used the Cauchy-Schwartz inequality and thus l(·) is bounded.

(2) Is a(·, ·) bounded? Assume that ‖aij‖L∞(Ω), ‖bi‖L∞(Ω), ‖c‖L∞(Ω) are all boundedfor all i, j and that f ∈ L2(Ω). Then

|a(w, v)| ≤

∣∣∣∣∣∣n∑

i,j=1

∫Ωaijwxivxj dx

∣∣∣∣∣∣+

∣∣∣∣∣n∑i=1

∫Ωbiwxiv dx

∣∣∣∣∣+∣∣∣∣∫

Ωcwv dx

∣∣∣∣≤

n∑i,j=1

maxx∈Ω|aij(x)|

∫Ω|wxi ||vxj | dx

+n∑i=1

maxx∈Ω|bi(x)|

∫Ω|wxi ||v| dx+ max

x∈Ω|c(x)|

∫Ω|w||v| dx

≤ c

n∑i,j=1

∫Ω|wxi ||vxj | dx+

n∑i=1

∫Ω|wxi ||v| dx+

∫Ω|w||v| dx

≤ c

n∑i,j=1

‖wxi‖‖vxj‖+n∑i=1

‖wxi‖‖v‖+ ‖w‖‖v‖

≤ c

n∑i,j=1

‖w‖V ‖v‖V +n∑i=1

‖w‖V ‖v‖V + ‖w‖V ‖v‖V

= c1‖w‖V ‖v‖V

where c = maxmaxij maxΩ |aij(x)|,maxi maxΩ |bi(x)|,maxΩ |c(x)| and c1 = c(n2+n+ 1).

(3) Is a(·, ·) coercive? The crucial assumption is that the aij satisfies the ellipticityassumption

n∑i,j=1

aij(x)ξiξj ≥ cn∑i=1

ξ2i ∀ (ξ1, . . . , ξn) ∈ Rn, ∀x ∈ Ω, (5.6)

54

i.e. for all x ∈ Ω we must have

ξTA(x)ξ ≥ c‖ξ‖2 = cξT ξ. (5.7)

We also assume that

c(x)− 12

n∑i=1

∂bi(x)∂xi

≥ 0∀x ∈ Ω. (5.8)

Then

a(v, v) =n∑

i,j=1

∫Ωaij(x)vxivxj +

n∑i=1

∫Ωbi(x)vxiv +

∫Ωc(x)v(x)2

≥ c∫

Ω

n∑i=1

v2xi

+n∑i=1

∫Ωbi(x)

∂v2/2∂xi

+∫cv2.

The middle integral here is 12

∫Ω b · ∇(v2), which after integration by parts equals

−12

∫Ω v

2∇ · b so that

a(v, v) ≥ cn∑i=1

∫Ωv2xi

+∫

Ωv2(c(x)− 1

2∇ · b(x))

≥ cn∑i=1

∫Ωv2xi

= c‖∇v‖2

Note that we need ∇ · b ∈ L∞(Ω) for this to work. We wish to show that

a(v, v) ≥ c0‖v‖2V = c0(‖v‖+ ‖∇v‖). (5.9)

Recall the Poincare-Friedrichs inequalities

‖v‖2 ≤ c∗‖∇v‖2 ∀ v ∈ H10 (Ω).

Hence

a(v, v) ≥ c‖∇v‖2 ≥ c

c∗‖v‖2

12a(v, v) +

12a(v, v) ≥ c

2‖∇v‖2 +

c

2c∗‖v‖2

≥ c0

(‖∇v‖2 + ‖v‖2

)55

5.4 Inhomogeneous Boundary Conditions

Consider the elliptic problem

−∇ · (p∇u) + qu = f x ∈ Ω (5.10)u = g x ∈ ∂Ω (5.11)

where Ω is a bounded open subset of R2. We assume that the data p, q, f, g aresufficiently smooth and that

pM ≥ p(x) ≥ p0 > 0 ∀x ∈ ΩqM ≥ q(x) ≥ q0 > 0 ∀x ∈ Ω

Let v be a test function. Multiply by v and integrate:

0 = −∫

Ωv∇ · (p∇u) +

∫Ωquv −

∫Ωfv

= I1 + I2 + I3

Nov choosing ϕ = v, f = p∇u in:

∇ · (ϕf) = ϕ∇ · f +∇ϕ · f∇ · (vp∇u) = v∇ · (p∇u) +∇v · p∇u

I1 = −∫

Ω∇ · (vp∇u) +∇v · p∇u

=∫

Ωp∇v · ∇u−

∫∂Ωvp∇u · ν

Choosing v = 0 on ∂Ω we have I1 =∫

Ω p∇v · ∇u. Thus

0 =∫

Ωp∇v · ∇u+ quv − fv ∀ v ∈ H1

0 (Ω). (5.12)

Set V0 = H10 (Ω), a(u, v) =

∫Ω p∇v · ∇u + quv, l(v) =

∫Ω fv. Note that u 6∈ V0.

However g ∈ H1(Ω) so u− g ∈ H1(Ω) and u− g ∈ H10 (Ω) = V0, i.e u ∈ Vg := w ∈

V = H1(Ω) : w = g + v, v ∈ V0.

Thus our variational problem (P ) is to find u ∈ Vg such that a(u, v) = l(v) ∀ v ∈ V0.Observe that V0 is a linear space but Vg = g+ V0 is an affine space. We can’t applyLax-Milgram directly. Consider u∗ = u− g ∈ V0:

a(u∗ + g, v) = a(u, v) = l(v) ∀ v ∈ V0

56

so u∗ ∈ V0 solves

a(u∗, v) = l(v)− a(g, v) =: l∗(v) ∀ v ∈ V0

Now we just need to check Lax-Milgram for this problem. Clearly a(·, ·) is bilinear(and symmetric). Coercivity:

a(v, v) =∫

Ωp|∇v|2 + qv2 ≥ p0

∫Ω|∇v|2 + q0

∫Ωv2 ≥ min(p0, q0)

∫Ω|∇v|2 + v2 ≥ c0‖v‖H1(Ω).

Boundedness: using the Cauchy-Schwartz inequality we have

|a(w, v)| =∣∣∣∣∫

Ωp∇w∇v + qwv

∣∣∣∣ ≤ pM ∫Ω|∇w||∇v|+ qM

∫Ω|w||v|

≤ max(pM , qM )(‖∇w‖‖∇v‖+ ‖w‖‖v‖)≤ c‖w‖H1(Ω)‖v‖H1(Ω).

Clearly l∗ is linear and

|l∗(v)| = |l(v)− a(g, v)| ≤ |l(v)|+ |a(g, v)| ≤ ‖f‖‖v‖+ c‖g‖H1(Ω)‖v‖H1(Ω) ≤ L∗‖v‖H1(Ω).

Thus there exists a unique u∗ and we conclude therefore that there exists a uniqueu = u∗ + g.

The bilinear form is symmetric so there is an energy and associated minimisationproblem:

J(v) =12a(v, v)− l(v)

Find u ∈ Vg s.t. J(u) ≤ J(v) ∀ v ∈ Vg.

Exercise: Prove that these two problems are equivalent.

57

Chapter 6

Finite Element Method

6.1 One Dimensional Problems

6.1.1 Dirichlet Problem

Let Ω = (0, 1), p(·), q(·) ∈ C(Ω) with p(x) ≥ p0 > 0, q(x) ≥ q0 > 0 for all x ∈ Ω,f(·) ∈ L2(Ω) and set V := H1(Ω). We consider the following Dirichlet problem.

Find u : Ω→ R such that− d

dx(pdu

dx) + qu = f in Ω,

u = 0 in ∂Ω.(BVP)

For simpler presentation we setq := 1

in the following. Further, we set

a(u, v) :=∫ 1

0

(pdu

dx

dv

dx+ uv

)dx,

l(v) :=∫ 1

0fvdx.

We formulated (BVP) as the following variational problem.

58

(P) Find u ∈ V such that

a(u, φ) = l(φ) for all φ ∈ V. (6.1)

The Lax-Milgram theorem shows the unique existence of the solution u to (P).

6.1.2 Abstract framework

The goal is now to approximate solutions to (P) by piecewise linear functions. Weuse a uniform grid on Ω with N + 1 nodes xj = jh, j = 0, 1, . . . , N + 1 whereh = 1/N . Now, let us define the finite dimensional space Vh by

Vh := v ∈ C[0, 1] | v|[xj ,xj+1] is linear for any j = 0, 1, · · · , N,and v(0) = v(1) = 0.

We have that vh ∈ Vh if and only if

vh =N∑i=1

viφi with vi = vh(xi)

where φiNi=1 are the piecewise linear continuous functions defined by φi(xj) = δi,ji, j = 1, . . . , N.

-

6

@@

@@

@

(i− 1)h (i+ 1)hih

1

0

Moreover, the classical derivative of vh is defined and constant on each interval(xj , xj+1) and given by

d

dxvh =

vj+1 − vjh

in (xj , xj+1).

59

Extending this to a piecewise constant function we obtain a function in L2(Ω) whichwe denote by Dvh and which is the weak derivative of vh: for any φ ∈ C∞0 ([0, 1])∫ 1

0vh

d

dxφ dx =

N∑i=0

∫ xi+1

xi

vhd

dxφ dx

=N∑i=0

∫ xi+1

xi

− d

dxvh φdx+ vh(xi+1)φ(xi+1)− vh(xi)φ(xi)

=∫ 1

0−Dvh φdx+ vh(xN+1)φ(xN+1)︸ ︷︷ ︸

=vh(1)φ(1)=0

− vh(x0)φ(x0)︸ ︷︷ ︸=vh(0)φ(0)=0

where we used the continuity of vh in the second identity and the boundary valuesin the last line. A a consequence, Vh ⊂ V , and we may formulate the followingdiscrete problem:

(Ph) Find uh ∈ Vh such that

a(uh, vh) = l(vh) for all vh ∈ Vh. (6.2)

Unique solvability follows again with the Lax-Milgram theorem.

6.1.3 Reformulation as system of linear equations

By substituting uh =∑N

j=1 ujφj into (6.2) we obtain

N∑j=1

uja(φj , φi) = l(φi), i = 1, 2, · · · , N.

This can be written as AU = F where

A = (Ai,j)i,j=1,...,N = (a(φj , φi))i,j=1,...,N ,

F = (l(φ1), . . . , l(φN ))T .

Let us characterize the matrix A = K +M where

Ki,j =∫ 1

0pDφiDφjdx and Mi,j =

∫ 1

0φiφjdx.

60

If j /∈ i − 1, i, i + 1, then Ki,j = 0 and Mi,j = 0 since the supports of φi and φjare disjoint. Clearly N and K are symmetric matrices. We have that

Ki,i+1 =∫ xi+1

xi−1

pDφiDφi+1dx

=∫ xi+1

xi

p

(−1h

)(1h

)dx

= − 1h2

∫ xi+1

xi

pdx

Ki,i =∫ xi+1

xi−1

pDφiDφidx

=1h2

∫ xi+1

xi−1

pdx.

Setpi :=

1h

∫ xi+1

xi

pdx.

Then we have seen that

Ki,i =1h

(pi−1 + pi), Ki,i+1 = −1hpi, Ki,i−1 = −1

hpi−1.

Now∫ 1

0φ2j (x)dx =

∫ xj

xj−1

(x− xj−1)2

h2dx+

∫ xj+1

xj

(x− xj+1)2

h2dx = 2

∫ 1

0y2hdy =

23h

and ∫ 1

0φj(x)φj−1(x)dx =

∫ xj

xj−1

(x− xj−1)(xj − x)h2

dx =∫ 1

0y(1− y)hdy =

h

6.

Then we have seen that

Mi,i =23h, Mi,i+1 =

16h, Mi,i−1 =

16h.

If we setfi =

1h

∫ xi+1

xi−1

fφidx,

then we see Fi = l(φi) = hfi.

61

After dividing the system AU = F by h we end up with

p0+p1

h2 + 23

−p1

h2 + 16 0 · · · 0

−p1

h2 + 16

p1+p2

h2 + 23

. . . . . ....

0. . . . . . . . . 0

.... . . . . . . . . −pN−1

h2 + 16

0 · · · 0 −pN−1

h2 + 16

pN−1+pN

h2 + 23

u1.........uN

=

f1.........fN

.

Remark 6.1.1. 1. Note that A is a tridiagonal symmetric and non-singular matrixsince U is unique.

2. The next steps will be

1) find uh,

2) bound the error ‖u− uh‖V .

The step 1) requires numerical linear algebra, the step 2) requires abstracterror analysis and approximation theory.

3. We can also apply this approach to other boundary conditions.

4. Looking forward, we shall see that the discrete equations are very similar toa finite difference approximation of this boundary value problem: the matrix1hK is identical to the standard approximation of the negative of the secondderivative, see also section 2.3. However, the overall approximation differsin two ways: firstly, the term involving µ contains the matrix M where theidentity would naturally appear in a finite difference approximation (replacinghN by the identity is known as mass-lumping); secondly the vector F isfound by testing the function f against basis functions, not against deltafunctions ( numerical integration may be used to achieve point evaluations off).

6.2 Finite Element Method in two dimensions

Take Ω to be a polygon. Let Th be a triangulation of Ω, Th = κ and set hκ =diamκ (the length of the longest side), h = max diamκ. We assume that |Th| <∞.Any triangles in Th must intersect along a complete edge, at a vertex of not at all.

62

Note that any linear function on R2 is of the form v(x, y) = a+bx+cy and is definedby three parameters. Thus any function

vh ∈ Vh := η ∈ C(Ω) : vh|κ is linear (6.3)

is uniquely determined by it values at the vertices of the triangulation:

φi(xj) = δij i, j = 1, . . . , Nh, xj is a triangle vertex. (6.4)

The support of the basis functions is local, so A will again be sparse.

Example 6.2.1. Find u ∈ H1(Ω) such that∫Ωp∇u∇v + quv dx =

∫Ωfv dx ∀ v ∈ H1(Ω). (6.5)

A finite element method applied to this yields the problem: find uh ∈ H1(Ω) suchthat ∫

Ωp∇uh∇vh + quhvh dx =

∫Ωfvh dx ∀ vh ∈ Vh. (6.6)

i.e. Au = b, where

uh =Nh∑i=1

ujφj ,

Ajk =∫

Ωp∇φj∇φk + qφjφk dx,

bj =∫

Ωfφj dx.

Note that:

Ajk =∫

Ωp∇φj∇φk + qφjφk dx

=∫

Supportφj∩Supportφk

p∇φj∇φk + qφjφk dx

=∑

κ with common edge jk

∫κp∇φj∇φk + qφjφk dx.

Let Ω be a polygon. A triangulation of Ω is a union of triangles, Th, such that novertex of any triangle lies in the interior of any edge of any other triangle or lies in

63

the interior of any other triangle. A generic triangle is denoted by K. Set

hK := the diameter of K= the length of the longest edge (side) of K.

Th := set of the triangles forming Ω,h := max

K∈Th

hK .

We assume that Th contains a finite number of triangles, each of which has a non-empty interior. Any triangles in Th must intersect along a complete edge, or at avertex, or not at all.

Note that a linear function v on R2 is of the form

v(x, y) = a+ bx+ cy.

It is defined by 3 parameters. Consider a triangle K with vertices p1, p2, p3 which arenot collinear. Consider φKi (i = 1, 2, 3) where each φKi is a linear function satisfying

φKi (pj) = δi,j =

1, i = j,0, i 6= j.

Thus, on K we have

v(x) =3∑i=1

viφKi (x),

where vj := v(pj), since for any linear functions v1, v2 in K v1(pj) = v2(pj) (j =1, 2, 3) implies v1 ≡ v2. Otherwise there would be a non-zero linear function vanish-ing at three points which are not collinear and this is impossible.

Now, let v and w be two linear functions on K.

v =3∑i=1

viφi, w =3∑i=1

wiφi.

Since v(x, y) = w(x, y) ∀(x, y) ∈ K if and only if vi = wi for i = 1, 2, 3. Hence theφKi are linearly independent on K.

Now, let Th be a triangulation of Ω. Suppose that the vertices are xjj=1,··· ,N(h).Consider the vertex xk and all the triangles which have xk as a vertex. Consider acontinuous function φk which is linear on such a triangle and satisfies

φk(xj) = δj,k

64

for any vertex xj . Set

Vh := v ∈ C(Ω) | v|K is linear,

=

v ∈ C(Ω)∣∣ v =

N(h)∑j=1

vjφj(x)

.

Then, Vh is a subspace of H1(Ω). Note that this is a consequence of calculating theweak derivatives wj := ∂xjv, j = 1, 2 of v ∈ Vh to be the L2(Ω) function which ispiecewise defined by wj|K = ∂xj (v|K).

If we have a problem with a Dirichlet condition, then we might use

Vh = v ∈ C(Ω) | v|K is linear, v = 0 on ∂Ω

=

v ∈ C(Ω)∣∣ v =

N∗(h)∑j=1

vjφj(x)

,

where N∗(h) is the number of interior nodes.

Example 6.2.2. Let Ω = (0, 1) × (0, 1), h = 1/(N + 1). Set (xi, yj) = (ih, jh).Consider the triangulation Th of Ω defined by the method below.

i) Divide Ω into squares with vertices (xi, yj).

ii) Divide each square into two triangles using the diagonal in the north east direc-tion.

- -

Let the vertices i, j be the position (xi, yj). Let φi,j(x, y) be the continuous piecewiselinear function defined by

1) φi,j is linear on each triangle.

2) φi,j is continuous.

65

3)

φi,j(xk, yl) =

1, i = k, j = l,0, otherwise .

Take

Vh := v | v(x, y) =N∑i=1

N∑j=1

vi,jφi,j(x, y) ⊂ H10 (Ω).

Typically, in implementing the Finite Element Method we have to calculateAi,j = a(φi,j , φk,l). In this instance we would like to evaluate a(φi,j , φk,l).

a(u, v) =∫

Ω∇u · ∇vdxdy.

We wish to calculate∫Ω∇φi,j · ∇φk,ldxdy =

∫Supportφi,j

∇φi,j · ∇φk,ldxdy,

since φi,j = 0 else where.

We order the triangles surrounding our node, i.e, the vertix (i, j). Suppose that φi,jtakes 1 at (i, j), 0 at the other vertices.

-

6

4

3

2

5

1

6

xi

yj

xi+1xi−1

yj+1

yj−1

66

∂φi,j∂x

= 0 in ∆1,∆4,

∂φi,j∂x

=1h

in ∆2,∆3,

∂φi,j∂x

= −1h

in ∆5,∆6.

Similarly,

∂φi,j∂y

= 0 in ∆3,∆6,

∂φi,j∂y

=1h

in ∆4,∆5,

∂φi,j∂y

= −1h

in ∆1,∆2.

Now, we want

ε(k, l) :=∫

Supportφi,j

∂φk,l∂x

∂φi,j∂x

+∂φi,j∂y

∂φk,l∂y

dx,

for

(k, l) ∈ (i, j), (i− 1, j), (i+ 1, j), (i, j + 1),(i, j − 1), (i− 1, j − 1), (i+ 1, j + 1).

Then we see

ε(i, j) = 4× h2

21h2

+ 4× h2

21h2

= 4.

For ε(i+ 1, j) just 2 triangles ∆5,∆6 to consider

∂φi,j∂x

= −1h

in ∆5,∆6,

∂φi,j∂y

=

1/h, ∆5,0, ∆6.

ε(i+ 1, j) =(− 1h2

)· 2 · h

2

2= −1.

Since A is symmetric, ε(i−1, j) = ε(i+1, j). By the same procedure as for ε(i+1, j)and by symmetry we have ε(i, j+ 1) = ε(i, j− 1) = −1. Also we see that ε(i+ 1, j+1) = ε(i− 1, j − 1) = 0.

67

It follows that the finite element approximation of the boundary value problem

−∆u = 1 in Ω, u = 0 on ∂Ω

on this uniform triangulation yields the five point formula

4Ui,j − 4Ui−1,j − Ui+1,j − Ui,j−1 − Ui,j+1 = h2 , i, j = 1, 2, .., N

for the interior nodal variables.

6.2.1 Element Stiffness Matrix in 2D for a general triangle

We may have to evaluate∫Ω∇w · ∇vdxdy =

∑K∈Th

∫K∇w · ∇vdxdy

for v, w ∈ Vh. Using the expressions

v =3∑j=1

vjφKj , w =

3∑j=1

wjφKj on K,

we have

∇v =3∑j=1

vj∇φKj ,

similar for ∇w. So we see that∫K∇v · ∇wdx =

∫K

(3∑i=1

vi∇φKi

) 3∑j=1

wj∇φKj

dx

=3∑i=1

3∑j=1

viwj

∫K∇φKi · ∇φKj dx

= V AKW T ,

where V = (v1, v2, v3), W = (w1, w2, w3) and AK = (AKi,j)i,j=1,2,3,

AKi,j =∫K∇φKi · ∇φKj dx.

68

The matrix AK is called element stiffness matrix.

Note that ∫K|∇vh|2dxdy = V AKV T .

Consider the canonical triangle K with the vertices p1 = (0, 0), p2 = (1, 0), p3 =(0, 1) in ξ − η plane.

x(ξ, η) = (1− ξ − η)p1 + ξp2 + ηp3

is the mapping which takes pi to pi = (xi, yi) (i = 1, 2, 3) respectively.

-

6

@@

@@@

@@

@ -

-

6

``````AAAAAA

K

p1

p3

p2

K

p1

p2

p3

ξ

η

x

y

By expanding we see

x(ξ, η) = p1 + ξ(p2 − p1) + η(p3 − p1)

= p1 + [p2 − p1, p3 − p1][ξη

]= p1 +

[x2 − x1 x3 − x1

y2 − y1 y3 − y1

] [ξη

].

= p1 + Jξ,

where J is the Jacobian mapping (ξ, η)→ (x, y), thus, dxdy = det Jdξdη. Note that

69

J is invertible provided the pi, i = 1, 2, 3 are not collinear.

Area of K =∫K

1dxdy

=∫K

det Jdξdη

=12

det J.

We seek now an inverse mapping.

[∂∂ξ∂∂η

]=

[∂x∂ξ

∂∂x + ∂y

∂ξ∂∂y

∂x∂η

∂∂x + ∂y

∂η∂∂y

]

=[x2 − x1 y2 − y1

x3 − x1 y3 − y1

] [ ∂∂x∂∂y

]= JT

[ ∂∂x∂∂y

].

=⇒

[ ∂∂x∂∂y

]= (JT )−1

[∂∂ξ∂∂η

]

=1

det J

[y3 − y1 −(y2 − y1)−(x3 − x1) x2 − x1

][ ∂∂ξ∂∂η

].

Thus,

vh(ξ, η) = vh(x(ξ, η), y(ξ, η))

=3∑i=1

viφi(ξ, η),

where φ is linear and φi(pj) = δi,j .

Note that∂vh∂ξ

= v2 − v1,∂vh∂η

= v3 − v1.

70

Then,

|∇vh|2 = (∂vh∂x

)2 + (∂vh∂y

)2

=1

(det J)2

((y3 − y1)

∂vh∂ξ− (y2 − y1)

∂vh∂η

)2

+(−(x3 − x1)

∂vh∂ξ

+ (x2 − x1)∂vh∂η

)2 =

1(det J)2

|r3 − r1|2

(∂vh∂ξ

)2

+ |r2 − r1|2(∂vh∂η

)2

+ 2(r1 − r2) · (r3 − r1)∂vh∂ξ

∂vh∂η

=

1(det J)2

|r3 − r1|2(v2 − v1)2 + |r2 − r1|2(v3 − v1)2

+ 2(r1 − r2) · (r3 − r1)(v2 − v1)(v3 − v1)

=1

(det J)2(v1, v2, v3)B(v1, v2, v3)T ,

where B is given by

B = |r3 − r2|2 (r2 − r3) · (r3 − r1) (r1 − r2) · (r2 − r3)(r2 − r3) · (r3 − r1) |r3 − r1|2 (r1 − r2) · (r3 − r1)(r1 − r2) · (r2 − r3) (r1 − r2) · (r3 − r1) |r1 − r2|2

.

Exercise

Let Th consist of equilateral triangles whose edges have length h. Calculate theelement stiffness matrix for the bilinear form a(w, v) :=

∫Ω p∇w · ∇v. Consider the

finite element apprioximation of the boundary value problem:-

−∇ · p∇u = 1 in Ω, u = 0 on ∂Ω

where Ω can be triangulated by a union of uniform equilateral triangles. Hence orotherwise find the generic equation holding at each vertex i of the triangulation

a(uh, φi) = l(φi).

Use the notation O for the vertex i and W,E,P,Q,R, S for the surrounding 6vertices.

71

6.2.2 Integration formula of linear functions on triangles

Let v be a linear function on a triangle K with nodal values vi, i = 1, 2, 3. It followsthat ∫

Kvdxdy =

3∑i=1

vi

∫Kφi =

Area(K)3

3∑i=1

vi

since ∫Kφi =

Area(K)3

.

Proof

Consider the reference triangle in the last section. We have that∫Kφi =

∫Kφi detJdξdη

where φj(pj) = δi,j and φj is linear. Since φ2 = ξ we have∫Kφ2 =

∫ 1

0

∫ 1−ξ

0ξdηdξ =

∫ 1

0ξ(1− ξ)dξ =

16.

Since detJ = 2Area(K) we have the desired result for φ2. By symmetry the resultfollows for φ3 and φ3. Since φ1 = 1− φ2 − φ3 we have that∫

Kφ1 =

12− 1

6− 1

6=

16

which completes the proof.

72

Chapter 7

Finite element error analysis

7.1 One Dimensional Problems

Consider the problem (P ) where f ∈ L2(Ω) = (0, 1) is given and we seek u suchthat

− u′′ + u = f 0 < x < 1 (7.1)u(0) = u(1) = 0. (7.2)

The variational formulation is to find u ∈ H10 (Ω) such that∫ 1

0u′v′ + uv dx = a(u, v) = l(v) =

∫ 1

0fv dx ∀ v ∈ H1

0 (Ω). (7.3)

Let Vh be the finite element space of continuous piecewise linear functions on anon-uniform grid. We are in the setting of the Lax-Milgram theorem and

a(v, v) =∫ 1

0(v′)2 + v2 dx ≡ ‖v‖2H1(Ω). (7.4)

Let v ∈ C(I) where I is some bounded interval. Consider the interpolant of vdefined by

Ihv =M∑j=0

v(xj)φj(x) ∈ Vh. (7.5)

73

This is known as Lagrange interpolation. Clearly Ihu is a candidate for Cea’s lemma,which would then give us

‖u− uh‖H1(0,1) ≤ ‖u− Ihu‖H1(0,1). (7.6)

Remark 7.1.1. A simple interpolation estimate Let p1(·) be a linear polynomialwhich interpolates some function f(·) at x = x0 and x = x1, i.e. p1(x0) = f(x0) andp1(x1) = f(x1). Suppose that f ∈ C2(I). Then

f(x)− p1(x) =12

(x− x0)(x− x1)f ′′(ξx) x0 ≤ ξx ≤ x1,

‖f(x)− p1(x)‖L∞(I) ≤h2

8max

ξ∈[x0,x1]|f ′′(ξ)| x ∈ (x0, x1)

⇒ ‖v − Ihv‖L∞(I) ≤h2

8‖v′′‖L∞(I).

However recalling that V = H1, we note that this bound requires knowledge of‖v′′‖L∞(I)! But the interpolation bound clearly is an indication that the finite ele-ment method should converge.

Lemma 7.1.2. Interpolation error Let Vh be the piece-wise linear finite elementspace on a unforom grid with mesh size h. Suppose that v ∈ H2(0, 1) and Ihvinterpolates v to Vh as before. Then

‖v − Ihv‖L2(0,1) ≤(h

π

)2

‖v′′‖L2(0,1) (7.7)

‖(v − Ihv)′‖L2(0,1) ≤h

π‖v′′‖L2(0,1). (7.8)

Proof : Consider a subinterval (xi−1, xi), 1 ≤ i ≤ N, h = 1/N . Define η(x) =v(x)−Ihv(x) so η ∈ H2(xi−1, xi) and η(xi) = η(xi−1) = 0. Then η can be expandedas a Fourier series:

η(x) =∞∑k=1

ak sin(kπ

(x− xi)h

)∫ xi

xi−1

η2(x) dx =h

2

∞∑k=1

|ak|2.

Differentiating the Fourier series twice we see that the coefficients of η′ are (kπak)/h

74

and the coefficients of η′′ are −(kπ/h)2ak. Thus∫ xi

xi−1

η′2(x) dx =h

2

∞∑k=1

|ak|2k2π2

h2∫ xi

xi−1

η′′2(x) dx =h

2

∞∑k=1

|ak|2k4π4

h4

Note that η′′(x) = v′′(x)− Ihv′′(x) = v′′(x). Now∫ xi

xi−1

η2(x) dx =h

2

∞∑k=1

|ak|2 ≤h

2

∞∑k=1

|ak|2k4π4

h4

h4

π4=h4

π4

∫ xi

xi−1

η′′2(x) dx∫ xi

xi−1

η2(x) dx ≤ h2

π2

∫ xi

xi−1

η′′2(x) dx

‖η‖2L2(Ω) =N∑i=1

∫ xi

xi−1

η2(x) ≤ h4

π4‖v′′‖2L2(Ω)

‖η′‖2L2(Ω) ≤h2

π2‖v′′‖2L2(Ω).

Lemma 7.1.3. Suppose that the solution of (P ) satisfies u ∈ H2(I). Then

‖u− uh‖H1(I) ≤ Ch‖u′′‖L2(I). (7.9)

Proof :

‖u− uh‖2H1(I) ≤ ‖u− Ihu‖2H1(I) = ‖u− Ihu‖2L2(I) + ‖(u− Ihu)′‖2L2(I)

≤ h4

π4‖u′′‖2L2(I) +

h2

π2‖u′′‖2L2(I) ≤

2h2

π2‖u′′‖2L2(I)

as h < 1.

The fact that although our problem is posed in H1 and the solution is in H2 iscalled elliptic regularity. In our example since f ∈ L2 it is easy to show the desired

75

regularity:

‖u‖2H1 = a(u, u) = l(u) =∫ 1

0fu dx ≤ ‖f‖L2‖u‖L2

⇒ ‖u‖2L2 ≤ ‖u‖H1 ≤ ‖f‖L2‖u‖L2

⇒ ‖u‖L2 ≤ ‖f‖L2

⇒ ‖u′‖2L2 ≤ ‖u‖2H1 ≤ ‖f‖L2‖u‖L2 ≤ ‖f‖2L2

⇒ ‖u′‖L2 ≤ ‖f‖L2

and since u′′ = u− f

‖u′′‖L2 = ‖u− f‖L2 ≤ ‖u‖L2 + ‖f‖L2 ≤ 2‖f‖L2 .

Thus we can conclude that ‖u− uh‖H1(0,1) ≤ Kh‖f‖L2(0,1) where K is independentof u, h, f .

Remark 7.1.4. 1. This in an a priori bound. The number on the right hand sideis usually larger than the error. The order with respect to h is correct.

2. It says that the discretisation is convergent - limh→0 ‖u− uh‖H1 = 0.

3. It says that if h is reduced by a factor of a half say, then one expects the errorto be reduced by a factor of one half.

4. It is important for confidence in numerical calculations to have such errorbounds.

7.1.1 Bounding the L2 error

The above work has enabled us to get an H1 bound on the error e = u − uh (andhence also an L2 bound). But can the L2 bound be improved? Yes - by using anAubin-Nitsche duality argument. For example, consider the problem

−(pu′)′ + qu = f x ∈ (a, b)u(a) = u(b) = 0.

Regularity theory implies that ‖u′′‖L2(a,b) ≤ C‖f‖L2(a,b). Now consider the problem

−(pw′)′ + qw = e x ∈ (a, b)w(a) = w(b) = 0

76

where e = u − uh. Then from our standard results there exists a unique w solvingthis problem and ‖w′′‖L2(a,b) ≤ C‖e‖L2(a,b. Now we have that

‖e‖2L2(a,b) =∫ b

ae2

= (e, e)= a(w, e)= a(e, w)= a(u− uh, w)= a(u− uh, w − Ihw) (a(u− uh, Ihw) = 0 by Galerkin orthogonality)≤ γ‖u− uh‖H1(a,b)‖w − Ihw‖H1(a,b)

≤ γ(Ch‖f‖L2(a,b))(Ch‖w′′‖L2(a,b))

≤ Ch‖f‖L2(a,b)h‖e‖L2(a,b)

⇒ ‖e‖L2(a,b) ≤ Ch2‖f‖L2(a,b).

7.2 Two Dimensional Problem

Let Th be a triangulation of Ω. Suppose that h is the maximum diameter of anytriangle in the triangulation. We assume that the smallest angle of the triangulationis bounded below independently of h.

Theorem 7.2.1. Interpolation error Let Vh be the space of continuous piece-wiselinear functions on Th. Let v ∈ H2(Ω). Then

‖v − Ihv‖H1(Ω) ≤ k1h|v|2 (7.10)

‖v − Ihv‖L2(Ω) ≤ k2h2|v|2 (7.11)

where k1, k2 are independent of h and u and |u|2 is the L2 norm of all secondderivatives.

Here | · |2 is the semi-norm:

|v|22 =∫

Ω

∣∣∣∣ ∂2v

∂x12

∣∣∣∣+ 2∣∣∣∣ ∂2v

∂x1∂x2

∣∣∣∣2 +∣∣∣∣ ∂2v

∂x22

∣∣∣∣ dx1 dx2. (7.12)

Remark 7.2.2. The order of approximation in the H1 norm is 1, or linear, withrespect to h, and in the L2 norm it is 2, or quadratic, with respect to h. We hopeto reproduce these rates of convergence using our finite element discretisation.

77

Our variational problems for second order elliptic equation are set in the Sobolevspace H1(Ω) (or H1

0 (Ω) etc.). From the variational formulation we do not knowthat |u|2 is bounded! The fact that the solution of the equation lies in H2(Ω) wouldbe a regularity result. It is not true in general for polygons. It is true when theboundary is smooth or when the domain Ω is convex.

Example 7.2.3. Let Ω = (0, 1)× (0, 1) and consider the problem:

−∆w = g in Ωw = 0 on ∂Ω

Then there exists a unique w ∈ H10 (Ω) when g ∈ L2(Ω). Suppose that w ∈ H2(Ω) ∩

H10 (Ω). Then

‖∆w‖2L2(Ω) =∫

Ω

(∂2w

∂x12

+∂2w

∂x22

)2

dx1 dx2

=∫

Ω

(∂2w

∂x12

)2

+ 2(∂2w

∂x12

∂2w

∂x22

)+(∂2w

∂x22

)2

dx1 dx2∫Ω

∂2w

∂x12· ∂

2w

∂x22dx1 dx2 =

∫Ω

∣∣∣∣ ∂2w

∂x1∂x2

∣∣∣∣2 dx1 dx2

where we have used integration by parts and the boundary conditions for the lastpart. Thus for the square ‖∆w‖2L2(Ω) = |w|22 when w ∈ H2(Ω) ∩H1

0 (Ω). So for thiselliptic boundary value problem

‖w‖H2(Ω) ≤ ‖g‖L2(Ω). (7.13)

Equation (7.13) is an example of an elliiptic regularity result. If we wish to applyinterpolation error bounds to a finite element discretisation of an elliptic boundaryvalue problem we need H2 regularity.

Example 7.2.4. Let Ω = (0, 1)× (0, 1) and consider the problem:

−∆u = f in Ω,u = 0 on ∂Ω.

The weak formulation is the problem (P ): find u ∈ V such that

a(u, v) = l(v) ∀ v ∈ V.

78

We set V = H10 (Ω), a(u, v) =

∫Ω∇u∇v, l(v) =

∫Ω fv. The finite element problem is

(Ph) find uh ∈ Vh such that

a(uh, vh) = l(vh) ∀ vh ∈ Vh.

Since we have a convex domain in R2 we have that u ∈ H2(Ω)⇒ u ∈ C(Ω) (by theSobolev embedding theorem). Thus it follows that Ihu is well defined. Suppose thatwe have the interpolation error bound

‖v − Ihv‖H1(Ω) ≤ k1h‖v‖H2(Ω) ∀ v ∈ H2(Ω).

Then using the Galerkin orthogonality a(u− uh, vh) = 0∀ vh ∈ Vh we have that

a(u− uh, u− uh) = a(u− uh, u− Ihu) + a(u− uh, Ihu− uh)= a(u− uh, u− Ihu)

‖∇(u− uh)‖2L2(Ω) =∫

Ω∇(u− uh)∇(u− uh)

≤ ‖∇(u− uh)‖L2(Ω)‖∇(u− Ihu)‖L2(Ω)

⇒ ‖∇(u− uh)‖L2(Ω) ≤ ‖∇(u− Ihu)‖L2(Ω)

Recalling the Poincare inequality ‖v‖L2(Ω) ≤ C∗‖∇v‖L2(Ω) ∀ v ∈ H10 (Ω), we have

that

‖u− uh‖H1(Ω) ≤ C ′‖u− Ihu‖H1(Ω)

≤ C ′k1h‖v‖H2(Ω)

≤ Ch‖f‖L2(Ω)

where C depends only on the domain Ω and the fact that we are using a piecewise lin-ear finite element approximation on a triangulation. We note that C is independentof h and f .

As in the one dimensional case we can apply the Aubin-Nitsche trick to show thethe error in the L2 norm is of higher order than the error in the H1 norm.

Note that the dual problem is to find w(g) ∈ H10 (Ω) such that

(∇v,∇w(g)) = (g, v) ∀v ∈ H10 (Ω)

which, because the bilinear form is symmetric, is the variational formulation of

−∆w = g in Ωw = 0 on ∂Ω

79

for which we have a regularity result.

Let e = u− uh. Consider −∆w = eh in Ω, w = 0 on ∂Ω. Elliptic regularity impliesthat ‖w‖H2(Ω) ≤ C1‖eh‖L2(Ω). Now

‖u− uh‖2L2(Ω) = a(eh, eh)

= (eh,−∆w)= a(eh, w)= a(u− uh, w − Ihw)≤ ‖∇(u− uh)‖L2(Ω)‖∇(w − Ihw)‖L2(Ω)

≤ Ch‖f‖L2(Ω)k1h‖w‖H2(Ω)

≤ Ck1h2‖eh‖L2(Ω)‖f‖L2(Ω)

⇒ ‖eh‖L2(Ω) ≤ Ck1h2‖f‖L2(Ω)

= k2h2‖f‖L2(Ω)

where we have used Galerkin orthogonality.

7.3 Summary

To summarise how we obtain these error bounds:

Galerkin orthogonality + elliptic regularity⇒ H1 error bound

Aubin-Nitsche + regularity⇒ L2 error bound

80

Chapter 8

FEM:-Miscellaneous

8.1 Inhomogeneous Dirichlet boundary conditions

Consider the elliptic problem

−∇ · (p∇u) + qu = f x ∈ Ω (8.1)u = g x ∈ ∂Ω (8.2)

where Ω is a bounded open subset of R2. We assume that the data p, q, f, g aresufficiently smooth and that

pM ≥ p(x) ≥ p0 > 0 ∀x ∈ ΩqM ≥ q(x) ≥ q0 > 0 ∀x ∈ Ω

Thus, see Chapter 4, our variational problem is:

(Pg) Find u ∈ Vg such that

a(u, v) = l(v) ∀ v ∈ V0.

The bilinear form is symmetric so there is an energy and associated minimisationproblem with J(v) = 1

2a(v, v)− l(v):-

(Mg) Find u ∈ Vg s.t.

81

J(u) ≤ J(v) ∀ v ∈ Vg.

The finite element approach is then to construct V h0 := v ∈ C(Ω) : v|K is linear, v|∂Ω =

0 and V hg := v ∈ C(Ω) : v|K is linear, v|∂Ω = gh and to consider the problems:

(P hg ) Find uh ∈ V hg such that

a(uh, v) = l(v) ∀v ∈ V h0 .

(Mhg ) Find uh ∈ V h

g such that

J(uh) ≤ J(v) ∀ v ∈ V hg .

8.2 Other finite elements

There is an enormous zoo of finite elements. One generalisation is to increase theorder of the polynomial in each triangle. For example a quadratic function in twospace dimensions has 6 parameters which can be fixed by the values of function atthe three vertices and the three mid points. The finite element space is then definedas Vh := v ∈ C(Ω) : v|K is quadratic ∀K ∈ Th.

Another possibility is to use rectangular finite elements. For example a simpleelement is based on bilinear functions v = a+ bx+ cy+ dxy on a rectangle which isfixed by the four vertex values of v.

On the other hand one is also interested in higher space dimensions. The genral-ization to three space dimensions is to use a tetrahedron whose 4 vertices are notcoplanar. Triangles and tetrahedra are examples of simplices. A simplex in Rn has(n+ 1) vertices. A linear function is then fixed by the values at the vertices.

8.3 Programming

1. Mesh generation is fundamental. Sometimes a macro-triangulation with coarsetriangles (large diameter) may be defined by hand. Then a refinement methodmay be employed. For example a triangle may be subdivided into 4 congruenttriangles in a natural way by using the midpoints of each edge to define the

82

vertices of new triangles. On the other hand a triangle may be subdivided intotwo by adding an edge joining the midpoint of the largest edge to the oppositevertex.

2. Matrices and vectors defining the linear algebraic equations are assembledelement by element. That is each element is visited once, the element stiffnessmatrix is calculated as well as the contributions to the right hand side andthen added to the global matrix and righthand side vector.

8.4 Higher Order Equations

So far we have only considered the finite element approximation to secondorder partial differential equations. But what about higher order equations?In this section we will see how to tackle these types of problems.

4th Order Problem in 1D

Consider the problem

(u′′)′′ − (pu′)′ + qu = f x ∈ (0, 1)u(0) = u(1) = 0u′(0) = u′(1) = 0

As usual we multiply by a test function v and integrate, using integration byparts on the terms with derivatives:

(f, v) =∫ 1

0fv dx

=∫ 1

0(u′′)′′v − (pu′)′v + quv dx

= [u′′′v]10 −∫ 1

0u′′′v′ dx− [pu′v]10 +

∫ 1

0pu′v′ dx+

∫ 1

0qv dx

= [u′′′v]10 − [u′′v′]10 +∫ 1

0u′′v′′ dx− [pu′v]10 +

∫ 1

0pu′v′ dx+

∫ 1

0qv dx

Set V = v ∈ H2(0, 1) : v(0) = v(1) = v′(0) = v′(1) = 0. Then

(f, v) =∫ 1

0u′′v′′ dx+

∫ 1

0pu′v′ dx+

∫ 1

0qv dx

83

so our variational problem is to find u ∈ V such that

a(u, v) = l(v)

a(u, v) =∫ 1

0u′′v′′ + pu′v′ + qv dx

l(v) =∫ 1

0fv.

We now seek to check the conditions of the Lax-Milgran theorem. Let usassume that p, q ∈ C(0, 1) and that p, q ≥ 1. Then

a(v, v) ≥∫ 1

0v′′2 + v′2 + v2 dx = ‖v‖H2(0,1)

a(u, v) ≤ max(|p|, |q|)∫ 1

0|u′′||v′′|+ |u′||v′|+ |u||v| dx

≤ C‖u‖H2(0,1)‖v‖H2(0,1).

Similarily we could have consider the above problem with the following bound-ary conditions:

u(0) = u(1) = 0u′′(0) = u′′(1) = 0

where again we would set V = v ∈ H2(0, 1) : v(0) = v(1) = v′(0) = v′(1) =0.In these examples our test space V is a subset of H2. To approximate this withour finite element method we would need to use higher order elements than wehave done previous (until now we have only considered linear elements). How-ever, we can tackle a modified problem using only linear elements. Considerthe problem

−(u′′)′′ − u′′ = f x ∈ (0, 1)u(0) = u(1) = 0

u′′(0) = u′′(1) = 0

Let v = −u′′. Then we can rewrite our fourth order problem as a system ofsecond order problems:

−u′′ = v x ∈ (0, 1)−v′′ + v = f x ∈ (0, 1)

u(0) = u(1) = 0v(0) = v(1) = 0

84

We can now discretise these two problems using piecewise linear elements,remembering that we have this coupled system for u, v to solve.

85

Chapter 9

Finite element spaces

9.1 Definition of a finite element

Definition 9.1.1. A finite element is a triple (K,PK , NK), where

• (i) K ⊂ Rn is the closure of a bounded Lipshitz domain.

• (ii) PK is a finite dimensional space of functions: K → R.

• (iii) NK is a basis for (PK)′ , the dual space of PK .

Remark 9.1.2. • dim (PK)′ = dim PK

• Let d = dim PK and NK = N1, N2, ..Nd ⊂ (PK)′ then the following state-ments are equivalent: (i) NK is a basis for (PK)′

(ii)for all p ∈ PK , Ni(p) = 0 for all i = 1, 2..d implies p = 0.

We say that if these hold then NK determines PK .

Example 9.1.3. In R2 we set K to be the triangle with vertices (nodes) zi, i =1, 2, 3, PK to be the set of polynomials of dgree 1 in two varibles x1, x2 on K andNK = N1, N2, N3 where Ni(p) = p(zi), i = 1, 2, 3.

Let M be the 3 × 3 matrix whose ith row is (1, zTi ) which is nonsingular sincedet(M)=2Area(K). It follows that the equations p(zi) = 0 for the polynomial coeffi-cients of p(x) = α0 +α1x1 +α2x2 have a unique zero solution so that NK determinesPK .

86

In this special case, we denote the nodal basis for PK by λj , j = 1, 2, 3 with λj(zi) =δij. Note that λ1 + λ2 + λ3 − 1 = 0 (since this holds at each of the three nodes anda plane is uniquely determined by its values at three non-collinear points). Hence∑3

j=1 λj = 1. The λj are sometimes called barycentric coordinates since (again byuniqueness of linear interpolation at 3 points), any x may be written as the weightedsum: x =

∑3j=1 λj(x)zj .

Given an element (K,PK , N)K), let NK = N1, ..., Nd and choose pi : i = 1, ..., dto be the nodal basis for PK then for all v in the domain of Ni,∀i, we define the(local) interpolant

IKv =d∑i=1

(Niv)pi ∈ PK .

This interpolates v in the sense that

Nj(IKv) = Nj(v)j = 1, ..., d.

9.2 Construction of a finite element space on a mesh

Definition 9.2.1. A mesh on Ω ⊂ Rn is a subdivision T of Ω into closed triangles(n=2), tetrahedra (n=3) or simplices (general n) with the properties:

• Ω = ∪K∈TK and the elements K ∈ T have pairwise disjoint interiors.

• If K,K ′ ∈ T and K 6= K ′ then K ∩K ′ is either empty or a vertex or face ofeach element.

Note that these assumptions implicitly assume that Ω is polyhedral. Curved ele-ments are also possible. We also call K an element.

LethK = max|x− y| : x, y ∈ K and h = max hK , K ∈ T .

We usually write Th for T and consider a sequence of meshes with h→ 0. Also, letρK = the diameter of largest ball in Rn contained inside K. Note ρK ≤ hK .

By using IK on each K we can define a global interpolation operator Ih for functionson Ω by

(Ihv)|K = IKv∀ K ∈ Th.

87

(Note, Ihv may not be well-defined on the interface between 2 neighboring elements.)

Definition 9.2.2. The finite element space is called Hm conforming if Ihv ∈Hm(Ω) for v ∈ C(Ω).

We denote by (K, P , N) a standard reference element with the diamter of K beingorder 1.

9.3 Approximation theory

We wish to consider the approximation properties of the finite element space bybounding the interpolation error.

Throughout, to make statements simpler to write down, if A(h), B(h) are meshdependent quantities, we write A(h) / B(h) if A(h)/B(h) is bounded independentlyof h.

Definition 9.3.1. The mesh is called regular provided

hK / ρK , ∀K ∈ Th as h→ 0.

Theorem 9.3.2. Assume the mesh sequence Th is regular. Then if m ≥ 2 and

Pm−1(n) ⊆ P

for i = 0, ...,m, we have for each K ∈ Th,

||v − IKv||Hi(K) / hm−iK |v|Hm(K), for all v ∈ Hm(K).

Moreover if the element is H i conforming with 0 ≤ i ≤ m, then

||v − Ihv||Hi(Ω) / hm−i|v|Hm(Ω).

88

Chapter 10

Parabolic problems

10.1 Function spaces

Let X be a Banach space with norm|| · ||X .

Definition 10.1.1. The space Lp(0, T ;X) consists of all measurable functions η :[0, T ]→ X with

||η||Lp(0,T ;X) := (∫ T

0||η(t)||pXdt)

1/p <∞, 1 ≤ p <∞

and||η||L∞(0,T ;X) := ess sup

0≤t≤T||η(t)||X <∞.

Definition 10.1.2. The space C([0, T ];X) consists of all continuous functions η :[0, T ]→ X with

||η||C([0,T ];X) := max0≤t≤T

||η(t)||X <∞.

Definition 10.1.3. Let η ∈ L1(0, T ;X). We say that ξ is the weak derivative of ηwritten

η′ = ξ

provided ∫ T

0φ′(t)η(t)dt = −

∫ T

0φ(t)ξ(t)dt

for all test functions φ ∈ C∞0 (0, T ).

89

Definition 10.1.4. The space H1(0, T );X) consists of all functions η ∈ L2(0, T ;X)with a weak derivative η′ ∈ L2(0, T ;X).

10.2 Parabolic equation

Let Ω be a bounded domain in Rd, d = 1, 2. Let V = H10 (Ω), H = L2(Ω) and (·, ·)

denote the L2(Ω) inner product. Let f, p, q and u0 be given functions in C(Ω) withp(x) ≥ pm > 0, q(x) ≥ 0 for all x ∈ Ω. Consider the following initial value problem

ut = ∇(p(x)∇u)− q(x)u+ f(x), x ∈ Ω, 0 < t ≤ T ,

u = 0, x ∈ ∂Ω, u(x, 0) = u0(x) x ∈ Ω.

This may be formulated as a variational problem of the form:

Find u ∈ H1(0, T ;H) ∩ L2(0, T ;V ) such that

(ut, v) + a(u, v) = (f, v) ∀v ∈ V and a.e. t ∈ (0, T )

andu(0) := u0.

Here a(·, ·) : V × V → R is the bounded, coercive symmetric bilinear form

a(w, v) :=∫

Ωp∇w · ∇v + qwv.

This follows multiplying by a test function v ∈ H10 (Ω), integrating by parts and

using the boundary conditions on v.

It is convenient to recall the Poincare inequality

||v||H ≤ C∗||v||V , ∀v ∈ V

where ||v||H := ||v||L2(Ω) and for H10 (Ω) we take the norm ||v||V := ||∇v||L2(Ω) .

Lemma 10.2.1. There is a positive K independent of u, u0 and f such that

||u(t)||H ≤ e−Kt||u0||H +1K

(1− e−Kt)||f ||H .

90

Proof. Taking v = u in the variational formulation yields

(ut, u) + a(u, u) = (f, u)

and applying the Cauchy Schwarz inequality on the RHS and the Poincare inequalityon the LHS we find

12d

dt||u||2H +

pm(C∗)2

||u||2H ≤ ||f ||H ||u||H

which implies that (K := pm

(C∗)2 ) (since 12ddt ||u||

2H = ||u||H d

dt ||u||H)

d

dt||u||H +K||u||H ≤ ||f ||H

and using an integrating factor

d

dt(eKt||u||H) ≤ eKt||f ||H .

Integrating yields the desired inequality.

10.2.1 Semi-discrete finite element approximation

Let Vh be a finite element subspace of V . Here we may consider piecewise linearfunctions on a partition of Ω (d = 1) or on a triangulation of a polygonal Ω (d = 2).Find u(t) ∈ Vh, t ∈ [0, T ] such that

((uh)t, vh) + a(uh, vh) = (f, vh) ∀vh ∈ Vh and a.e. t ∈ (0, T )

anduh(0) := uh0

where uh0 ∈ Vh is an approximation to u0.

Lemma 10.2.2. There is a positive K independent of uh, uh0 and f such that

||uh(t)||H ≤ e−Kt||uh0 ||H +1K

(1− e−Kt)||f ||H .

Proof. This is the same as the proof for the continuous problem.

91

Let φjJj=1 be a basis for Vh. Let A,M, b be defined by

Aij = a(φj , φi),Mij = (φi, φj), Fi = (f, φi).

Then writing uh(t) :=∑J

j=1 U(t)jφj we have that

MdU

dt+AU = F , U(0) = U0

where uh0 =∑J

j=1 U(t)0φj .

10.2.2 Fully discrete finite element approximation

A fully discrete numerical scheme for the initial value problem may be obtained byusing difference quotients to approximate the time derivative.

The idea is to construct a sequence unhNn=0 with ∆t := T/N and unh ∈ Vh approxi-mating u(n∆t).

The backward Euler scheme in time is:-

(un+1h − unh

∆t, vh) + a(un+1

h , vh) = (f, vh) ∀vh ∈ Vh

with u0h given.

The system of linear algebraic equations resulting from the backward Euler schemeis easily seen to be

LUn+1 = MUn + b

where L = M + ∆tA and bi = ∆t(f, φi).

Lemma 10.2.3. Gronwall inequality

Let zk ≥ 0, k = 0, 1, 2, ...n, ..N satisfy

zn+1 ≤ λzn + λG

where λ > 0 and G ≥ 0. Then

zn ≤ λnz0 +1− λn

1− λλG , λ 6= 1

zn ≤ z0 + nG , λ = 1.

92

Proof. This follows by induction. We consider the case λ 6= 1. For a particular k, if

zk+1 ≤ λzk + λG

and

zk ≤ λkz0 +1− λk

1− λλG

it follows that

zk+1 ≤ λ(λkz0 +1− λk

1− λλG) + λG

and rearranging we find

zk+1 ≤ λk+1z0 +1− λk

1− λλG.

Lemma 10.2.4. For the backward Euler scheme, the following stability bound holds

||unh||2H ≤ (1 +K∆t)−n||u0||2H +1K2

(1− (1 +K∆t)−n)||f ||2H ∀n ≥ 0.

Proof. Taking vh = un+1h in the backward Euler scheme yields

(un+1h − unh

∆t, un+1

h ) + a(un+1h , un+1

h ) = (f, un+1h )

and rearranging we find

12

(||un+1h ||2H−||unh||2H+||un+1

h −unh||2H)+∆tK||un+1h ||2H ≤

12K

∆t||f ||2H+K

2∆t||un+1

h ||2H

which yields

(1 +K∆t)||un+1h ||2H ≤ ||unh||2H + ∆t

1K||f ||2H

from which using the Gronwall inequality we obtain the desired result.

Lemma 10.2.5. In the case f = 0 for the backward Euler scheme, the followingstability bound holds

||unh||2H ≤ (1 + 2K∆t)−n||u0||2H ∀n ≥ 0.

Proof. Exercise

93

The forward Euler scheme is:

(un+1h − unh

∆t, vh) + a(unh, vh) = (f, vh) ∀vh ∈ Vh

with u0h given.

In order to show stability results for this scheme we require an inverse inequality:-

||vh||V ≤ S(h)||vh||H ∀vh ∈ Vh.

That such an inequality holds follows from the fact that Vh is finite dimensional andall norms are equivalent in finite dimensions. However such an inequality does nothold for v ∈ V . For Vh being the space of piecewise linear functions it can be shownthat S(h) ≤ c

h .

Lemma 10.2.6. In the case f = 0 for the forward Euler scheme, the followingstability bound holds

||unh||2H ≤ (1 +K∆t)−n||u0||2H ∀n ≥ 0

provided the stability condition

∆t ≤ pmγ2S(h)2

holds

Proof. Taking vh = un+1h in the forward Euler scheme yields

(un+1h − unh

∆t, un+1

h ) + a(unh, un+1h ) = 0

and rearranging we find

12

(||un+1h ||2H − ||unh||2H + ||un+1

h − unh||2H) + ∆tpm||un+1h ||2V ≤ ∆ta(un+1

h , un+1h − unh)

and using

∆ta(un+1h , un+1

h − unh) ≤ γ∆t||un+1h ||V ||un+1

h − unh||V

≤ ∆tpm2||un+1

h ||2V +∆tγ2

2pmS(h)2||un+1

h − unh||2H

94

which yields(1 +K∆t)||un+1

h ||2H ≤ ||unh||2Hfrom which we obtain the desired inequality.

This is typical for explicit schemes for evolutionary PDEs in which in order to havestability the time step must satisfy a condition which restricts its size in terms ofthe spatial mesh size. In this case

∆t ≤ Ch2

for stability.

95

Chapter 11

Variational Inequalities

11.1 Projection theorem

Theorem 11.1.1. Let K be a closed convex subset of a Hilbert space H. It followsthat

• For all x ∈ H there exists a unique y ∈ K such that

||y − x|| = infη∈K||η − x||H .

We sety := PKx

and call PK : H → K the projection operator from H onto K.

•y = PKx ⇐⇒ y ∈ K and 〈y, η − y〉H ≥ 〈x, η − y〉H ∀η ∈ K.

• The operator P is non-expansive:-

||PKx1 − PKx2||H ≤ ||x1 − x2||H .

11.2 Elliptic variational inequality

Let K be a closed convex subset of a Hilbert space V . Let a(·, ·) : V × V → R be abounded coercive bilinear form satisfying

96

1) a(·, ·) is bounded, i.e.,

∃γ > 0 s.t. |a(v, w)| ≤ γ‖v‖V ‖w‖V ∀v, w ∈ V.

2) a(·, ·) is coercive i.e.,

∃α > 0 s.t. a(v, v) ≥ α‖v‖2V ∀v ∈ V.

and l(·) : V → R be a bounded linear functional, i.e.,

∃cl > 0 s.t. |l(v)| ≤ cl‖v‖V ∀v ∈ V.

Theorem 11.2.1. There exists a unique u ∈ K such that

(VI) a(u, v − u) ≥ l(v − u) ∀ v ∈ K.

Furthermore||u1 − u2||V ≤

1α||l1 − l2||V ∗

ui, i = 1, 2 solves (V I) for the linear forms l1 and l2, respectively.

11.3 Obstacle problem

Let V := H10 (Ω) where Ω is a bounded domain in Rd, d = 1, 2, 3. Set

a(w, v) :=∫

Ω∇w · ∇v , l(v) :=

∫Ωfv

where f ∈ L2(Ω) is given. Let ψ ∈ H1(Ω) ∪ C0(Ω) and ψ|∂Ω ≤ 0 and set

K := v ∈ H10 (Ω) : v ≥ ψa.e. ∈ Ω.

It follows that

1. K is non-empty.

Set ψ+ := 12(ψ + |ψ|) = max(ψ, )). Recall the following lemma

Lemma 11.3.1. Let θ : R→ R be Lipschitz continuous, i.e.,

|θ(t1)− θ(t2)| ≤ λθ|t1 − t2| ∀ t1, t2 ∈ R.

Suppose θ has a finite number of points of discontinuity. Then θ : H1(Ω) →H1(Ω) is continuous and θ : H1

0 (Ω)→ H10 (Ω) is continuous in the case θ(0) =

0.

97

Hence ψ+ ∈ H10 (Ω) and since ψ+ ≥ ψ it follows that K is non-empty.

2. K is convex because for t ∈ [0, 1], tη + (1− t)v ≥ ψ∀η, v ∈ K.

3. K is closed.

This follows from the fact that convergence in H10 (Ω) implies convergence

in L2(Ω) and hence convergence almost everywhere for a sub-sequence. Fromwhich we find that vn → v in V implies vni → v a.e. in in Ω and if vn ∈ K thenvni ≥ ψ a.e. in Ω which implies by the convergence of vn that v ≥ ψ a.e. in Ωand so v ∈ K.

Theorem 11.3.2. There exists a unique solution to the obstacle problem: Findu ∈ K := v ∈ H1

0 (Ω) : v ≥ ψ a.e. in Ω such that∫Ω∇u · (∇v −∇u) ≥

∫Ωf(v − u) ∀v ∈ K.

11.3.1 Finite element approximation

98

Part III

Finite Differences

99

Chapter 12

Introduction to FiniteDifference Methods

12.1 Finite Differences

The basic idea of finite difference methods is to seek approximations to solutionsof the PDE on a lattice. To approximate the derivatives appearing in the PDE,differences between lattice values at neighbouring points are used. We introducethe idea by considering functions of a single variable x.

Let xj = j∆x, ∆x 1 and consider a smooth function u : I → R for some openI ⊂ R. We set uj = u(xj). By Taylor expansion we have:

uj±1 = uj ±∆x∂u

∂x(xj) +

∆x2

2∂2u

∂x2(xj)±

∆x3

6∂3u

∂x3(xj) +O(∆x4) (12.1)

provided that u ∈ C4(I,R), xj ∈ I and ∆x is sufficiently small. 1 From this we seethat

∂2u

∂x2(xj) =

uj+1 − 2uj + uj−1

∆x2+O(∆x2) (12.2)

:=δ2uj∆x2

+O(∆x2) (12.3)

provided that u ∈ C4(I,R), xj ∈ I and ∆x is sufficiently small.1We write all derivatives as partial here because, in subsequent applications of these ideas, u

will typically be a function of several variables.

100

We can stop the Taylor expansion at different powers of ∆x and obtain similarapproximations for the first derivatives. For example

∂u

∂x(xj) =

uj+1 − uj∆x

+O(∆x), (12.4)

:=∆+uj∆x

+O(∆x) (12.5)

and∂u

∂x(xj) =

uj − uj−1

∆x+O(∆x), (12.6)

:=∆−uj∆x

+O(∆x) (12.7)

provided that u ∈ C2(I,R), xj ∈ I and ∆x is sufficiently small. With the as-sumption that u is three times continuously differentiable we can find an improvedapproximation to the first derivative:

∂u

∂x(xj) =

uj+1 − uj−1

2∆x+O(∆x2), (12.8)

:=∆0uj2∆x

+O(∆x2) (12.9)

provided that u ∈ C3(I,R), xj ∈ I and ∆x is sufficiently small.

12.2 Time-stepping

We illustrate the idea of finite difference methods through time-stepping methodsfor ODEs. Consider the equation

du

dt= f(u)

and let Un ≈ u(n∆t) denote an approximation. Such an approximation can becomputed by the following methods:

• Un+1−Un

∆t = f(Un) – Forward Euler;

• Un+1−Un

∆t = f(Un+1) – Backward Euler;

• Un+1−Un

∆t = θf(Un+1) + (1− θ)f(Un) – θ-method;

• Un+1−Un

∆t = f(θUn+1 + (1− θ)Un) – one-leg θ-method;

• Un+1−Un−1

2∆t = f(Un) – Leap-frog method.

101

12.3 Norms

Consider a function u : Ω → R with Ω ⊂ Rd. When we discretize in space we willobtain lattice approximations Uk where k is a multi-index ranging over a lattice Ω∆.We use U to denote the vector obtained from this indexed set of Uk. We use ∆ todenote the mesh-spacing. For simplicity we will always use the same mesh-spacingin all dimensions.

When considering maximum principles our topology will be the supremum norm inspace and we use the notation

‖u‖∞ = supx∈Ω|u(x))|, (12.10)

with Ω differing from example to example.

For the discretization we use the notation

‖U‖∞ = maxk∈Ω∆

|Uk|, (12.11)

with Ω∆ differing from example to example. No confusion should arise from thedual use of the notation ‖ · ‖∞ since it will always be clear from the context whethera function or a vector is being measured.

102

Chapter 13

Finite difference schemes for thediffusion equation

13.1 Introduction

In this chapter we study the Diffusion Problem (1.6) by means of finite differenceapproximations.

13.2 The Heat Equation

13.2.1 The PDE

Here we study the Diffusion Model Problem (1.6) in dimension d = 1, with Ω = (0, 1)and with f = 0. Let g ∈ C([0, 1],R) and consider the problem:

∂u∂t = ∂2u

∂x2 (x, t) ∈ (0, 1)× (0,∞),u = 0 (x, t) ∈ 0, 1 × (0,∞),u = g (x, t) ∈ [0, 1]× 0.

(13.1)

Theorem 13.2.1. Let t > s > 0. Then:

min0≤y≤1

u(y, s) ≤ u(x, t) ≤ max0≤y≤1

u(y, s) ∀x ∈ [0, 1] (13.2)

103

This well-posedness result can be used to establish uniqueness and continuous de-pendence of the solution on the initial data.

13.2.2 The Approximation

Again, letting xj = jh and Jh = 1, J ∈ N, we introduce Uj(t) as our approximationto u(xj , t) and consider the approximation

dUj

dt = 1h2 δ

2Uj (j, t) ∈ 1, . . . , J − 1 × [0, T ],Uj = 0, (j, t) ∈ 0, J × [0, T ],Uj = g(xj) (j, t) ∈ 0, 1, ...., J × 0.

Adopting vector notation (U = (U1, . . . , UJ−1)T ), we have:

dU

dt+AU = 0,

U(0) = G

where

A =−1h2

−2 1

1. . . . . .. . . . . . . . .

. . . . . . 11 −2

,

G = (g(x1), . . . , g(xJ−1))T .

Letting tn = n∆t and N∆t = T, N ∈ N, we now apply the theta method (withθ ∈ [0, 1]) in time to get:

Un+1j −Un

j

∆t = θh2 δ

2Un+1j + 1−θ

h2 δ2Unj (j, n) ∈ 1, . . . , J − 1 × 0, . . . , N − 1

Unj = 0 (j, n) ∈ 0, J × 1, . . . , NUnj = g(xj) (j, n) ∈ 0, . . . , J × 0

(13.3)

Set

λ =∆th2.

104

• Explicit scheme θ = 0

Un+1j = λUnj−1 + (1− 2λ)Unj + λUnj+1

• Fully implicit scheme θ = 1

−λUn+1j−1 + (1 + 2λ)Un+1

j − λUn+1j+1 = Unj

• Crank-Nicolson scheme θ = 1/2

Vectorially, we have, for Un = (Un1 , . . . , UnJ−1)T

(I + ∆tθA)Un+1 = (I −∆t(1− θ)A)Un

U0 = G(13.4)

Theorem 13.2.2. Discrete well-posedness If λ(1− θ) ≤ 12 then the solution at

time level n+ 1 is unique and for j ∈ 0, . . . , J,

mink∈0,...,J

Unk ≤ Un+1j ≤ max

k∈0,...,JUnk .

Proof. Because the schemes are linear uniqueness follows from the bounds and thefact that for the difference of two solutions the given data is zero.

We have, in the interior (j, n) ∈ 1, . . . , J − 1 × 0, . . . , N − 1,

(1 + 2λθ)Un+1j = λθ(Un+1

j−1 + Un+1j+1 ) + λ(1− θ)(Unj−1 + Unj+1) + [1− 2λ(1− θ)]Unj

Thus, defineUnmax = max

j∈0,...,JUnj .

The upper inequality simply states that

Un+1max ≤ Unmax

and it is this that we now prove.

Note that 1− 2λ(1− θ) ≥ 0, (1− θ) ≥ 0, θ ≥ 0 and λ ≥ 0. For (j, n) in the interior,

(1 + 2λθ)Un+1j ≤ 2λθUn+1

max + 2λ(1− θ)Unmax + [1− 2λ(1− θ)]Unmax

= 2λθUn+1max + Unmax

105

If Un+1max occurs for j ∈ 1, . . . , J − 1 then

(1 + 2λθ)Un+1max ≤ 2λθUmax + Unmax

=⇒ Un+1max ≤ Unmax

If Un+1max occurs for j ∈ 0, J then

Un+1max = 0 ≤ Unmax

Hence

Un+1max ≤ Unmax n ∈ 0, . . . , N − 1

and the upper inequality follows. The lower inequality is proved similarly, by con-sidering

Unmin = minj∈0,...,J

Unj

13.2.3 Convergence

Let unj = u(xj , tn), noting that Unj is the computed approximation to unj . Let

Tnj =un+1j − unj

∆t− θ

h2δ2un+1

j − (1− θ)h2

δ2unj (j, n) ∈ 1, . . . , J−1×0, . . . , N −1

This is the truncation error. We define Tn = (Tn1 , . . . , TnJ−1) ∈ RJ−1. By the tech-

niques in Chapter 12, expanding about tn+1+tn2 , the following may be shown, using

the discrete infinity norm.

Lemma 13.2.3. Consistency If u(x, t) ∈ C4×2 ([0, 1]× [0, T ],R) then

maxn∈0,...,(N−1)

‖Tn‖∞ ≤ C[∆t+ h2]

for some constant C independent of ∆t and h. Also, if θ = 12 and u(x, t) ∈

C4×3([0, 1]× [0, T ],R) then

maxn∈0,...,(N−1)

‖Tn‖∞ ≤ C[∆t2 + h2]

for some constant C independent of ∆t and h.

106

Assumption For simplicity we assume that

maxn∈0,...,(N−1)

‖Tn‖∞ ≤ C[∆t2 + (1− 2θ)∆t+ h2]

in the following. The Lemma 13.2.3 gives conditions under which this holds.

Remark

We prove convergence directly from this consistency result. Of course we are im-plicitly proving a stability result in the course of the proof.

Theorem 13.2.4. Let λ(1− θ) ≤ 12 and make the above assumption. Then

maxn∈0,...,N

‖un − Un‖∞ ≤ CT[(1− 2θ)∆t+ ∆t2 + h2

].

Proof. Let enj = unj − Unj . Then, by linearity,

en+1j − enj

∆t=

θ

h2δ2en+1

j +1− θh2

δ2enj + Tnj (j, n) ∈ 1, . . . , J − 1 × 0, . . . , N − 1

Thus, for (j, n) ∈ 1, . . . , J − 1 × 0, . . . , N − 1 we get:

(1 + 2λθ)en+1j = λθ(en+1

j−1 + en+1j+1 ) +λ(1− θ)(enj−1 + enj+1) + [1− 2λ(1− θ)]enj + ∆tTnj

with

en0 = enJ = 0,

e0j = 0, j = 1, . . . , J − 1.

We defineEn = (en1 , . . . , e

nJ−1)T , Tn = (Tn1 , . . . , T

nJ−1)T .

Since 1− 2λ(1− θ) ≥ 0, (1− θ) ≥ 0, θ ≥ 0 and λ ≥ 0 we have

(1+2λθ)|en+1j | ≤ 2λθ‖En+1‖∞+2λ(1−θ)‖En‖∞+[1−2λ(1−θ)]‖En‖∞+∆t‖Tn‖∞

Hence, for j ∈ 1, . . . , J − 1

(1 + 2λθ)|en+1j | ≤ 2λθ‖En+1‖∞ + ‖En‖∞ + ∆t‖Tn‖∞

which implies

(1 + 2λθ)‖En+1‖∞ ≤ 2λθ‖En+1‖∞ + ‖En‖∞ + ∆t‖Tn‖∞=⇒ ‖En+1‖∞ ≤ ‖En‖∞ + ∆t‖Tn‖∞.

By induction, using ‖E0‖∞ = 0 and 0 ≤ n∆t ≤ T , setting τ := maxn∈0,...,(N−1) ‖Tn‖∞we obtain

‖En‖∞ ≤ n∆tτ ≤ Tτas required.

107

13.3 Fourier analysis

13.3.1 Example

Consider the following finite difference approximation of the diffusion equation

Explicit scheme θ = 0

Un+1j = λUnj−1 + (1− 2λ)Unj + λUnj+1, j = 1, 2..., J − 1

where

U0j = αk sin(kπxj), j = 1, 2, .., J − 1 , Un0 = UnJ = 0, n = 0, 1, 2, ....

and we take J is even.

We seek a solution in the form

Unj = µnkαk sin(kπxj), j = 1, 2, .., J − 1, n ≥ 0.

Substitution into the scheme yields

µn+1k sin(kπjh) = µnk(λ(sin(kπ(j − 1)h) + sin(kπ(j + 1)h)) + (1− 2λ) sin(kπjh))

and applying the appropriate trigonometric addition formula yields

µn+1k sin(kπjh) = µnk(λ2 sin(kπjh) cos(kπh) + (1− 2λ) sin(kπjh))

so thatµn+1k sin(kπjh) = µnk(1− 2λ(1− cos(kπh)) sin(kπjh)

andµn+1k = µnk(1− 2λ(1− cos(kπh)) = (1− 4λ sin2(

kπh

2))µnk .

Thusµnk = (µk)n = exp(−ωk∆t)n = exp(−ωktn)αk

whereµk := exp(−ωk∆t) = (1− 4λ sin2(

kπh

2)).

108

It follows that the solution of the finite difference scheme may be written as

Unj = αk exp(−ωktn) sin(kπxj), j = 1, 2, .., J − 1, n ≥ 0.

This may be compared with the general solution of the diffusion equation

u(x, t) =∞∑k=1

αk exp(−k2t) sin(kπx)

with the initial data

u(x, t) =∞∑k=1

αk sin(kπx).

We see that in this general solution the Fourier coefficients decay in time so thatthe Fourier series converges if the series converges for the initial data. It is clearlydesirable for the numerical solution to have non-growing Fourier coefficients. Inorder for the discrete solution to converge as ∆t and h converge to zero with λ fixedit is necessary for the discrete solution to be bounded at any fixed time.

Observe two situations:

• Stability

0 < λ ≤ 12

It follows that for all ∆t, h and k that

|µk| ≤ 1

since

1 ≥ 1− 4λ sin2(kπh

2) ≥ 1− 2 sin2(

kπh

2) ≥ −1.

In this case we find the discrete coefficient

αk exp(−ωktn) = αkµnk

does not grow as n→∞.

• Instability

λ >12

109

It follows that for fixed λ > 12 and h sufficiently small there exists k = k∗ such

that|µk∗ | > 1.

To show this, write λ = 12 + δ

4 for some positive δ, and choosing k∗ := J − 1we find that, since sin2(π(1−h)

2 ) > 1− ch2 for h sufficiently small,

µk∗ = 1− 4λ sin2(π(1− h)

2) < 1− 4λ(1− ch2) = −1− δ + 4λch2 < −1

for h sufficiently small.

Thus for initial data with k = k∗ and αk∗ 6= 0 consider Unj for j = J/2 whenJ is even and k∗ is odd so that

| sin(k∗πjh)| = | sin(k∗π/2)| = 1

we find that|Unj | = |αk∗ ||µk∗ |n →∞ as n→∞

for fixed λ.

This is an example of instability. Choosing to reduce h and ∆t to zero whilstmaintaining λ > 1

2 will lead to divergence of the numerical solution in general.

13.3.2 Initial value problems with periodic boundary conditions

We place ourselves, for convenience, in the setting of periodic complex mesh func-tions Mh := V := Vjj∈Z such that Vj+J = Vj where Jh = 2π and xj := jh.The discrete L2

h inner product is

(V,W )h := h

J∑j=1

VjWj , ||V ||h := (V, V )12h .

We use i :=√−1. Set Φk ∈Mh by

Φkj := exp(ikjh).

It follows that(Φk,Φm)h = 2πδkm, k,m = 1, 2, ...J

110

Thus ΦkJk=1 form an orthogonal basis ofMh. Any mesh function may be writtenin as

V :=J∑k=1

VkΦk or Vj :=J∑k=1

VkΦkj

where the Vk are unique.

Consider the constant coefficient finite difference formula∑p

αpUn+1j+p =

∑p

βpUnj+p, ∀j (13.5)

where Un+1 and Un are periodic mesh functions. It follows that

∑p

αp

J∑k=1

Un+1k Φk

j+p =∑p

βp

J∑k=1

Unk Φkj+p

and rearranging

J∑k=1

Un+1k exp(ikjh)

∑p

αp exp(ikph) =J∑k=1

Unk exp(ikjh)∑p

βp exp(ikph)

which implies thatUn+1k = µkU

nk

where

µk :=

∑p βp exp(ikph)∑p αp exp(ikph)

so thatUn+1k = µnk U

0k .

The solution of the initial value problem may be written as

Un =J∑k=1

exp(−ωktn)U0kΦk (13.6)

Unj =J∑k=1

U0k exp(−ωktn) exp(ikxj) (13.7)

whereexp(−ωk∆t) := µk.

111

This may be contrasted with the solution

u(x, t) =∞∑k=1

uk(0) exp(−ωkt) exp(ikx) (13.8)

of the initial value problem

ut = Lu, u(x, 0) =∞∑k=1

uk(0) exp(ikx) (13.9)

Lu := P (∂x)u =m∑r=1

Ar∂rxu, P (z) :=

m∑r=1

Amzr (13.10)

whereωk = −P (ik). (13.11)

Example

In the case of the heat equation

P (r) = r2, wk = k2

and

u(x, t) =∞∑k=1

uk(0) exp(−k2t) exp(ikx).

On the other hand the finite difference scheme

(1 + 2λθ)Un+1j − λθ(Un+1

j−1 + Un+1j+1 ) = λ(1− θ)(Unj−1 + Unj+1) + [1− 2λ(1− θ)]Unj

has

α1 = α−1 = −λθ, α0 = 1 + 2λθ, β1 = β−1 = λ(1− θ), β0 = 1− 2λ(1− θ)

so that

µk =1− 2λ(1− θ) + λ(1− θ)(exp(ikh) + exp(−ikh))

1 + 2λθ − λθ(exp(ikh) + exp(−ikh))

112

yielding

µk =1− 4λ(1− θ) sin2(kh2 )

1 + 4λθ sin2(kh2 ).

Clearly µk < 1. If θ ≥ 1/2 or if

θ <12, λ ≤ 1

2(1− 2θ)

then |µk| ≤ 1 and the scheme is said to be stable.

On the other hand ifθ <

12, λ >

12(1− 2θ)

then k can be chosen such that |µk| > 1 and the scheme is unstable and does notconverge.

113