a discrete calculus with applications to differential equations

85
Discrete Calculus A Discrete Calculus with Applications to Differential Equations School of Partial Differential Equation Universidad Nacional Autónoma de México 25 to 29 of October 2004 Stanly Steinberg Department of Mathematics and Statistics University of New Mexico Albuquerque NM 87131 http://math.unm.edu/stanly/ Collaborators: J. Castillo, J.M. Hyman, D.A.R. Justo, M. Longoni de Castro, N. Robidoux, J. Zingano, M. Shashkov . – p.1/35

Upload: jp2020

Post on 11-May-2017

234 views

Category:

Documents


3 download

TRANSCRIPT

Discrete Calculus

A Discrete Calculus with Applications to Differential EquationsSchool of Partial Differential Equation

Universidad Nacional Autónoma de México25 to 29 of October 2004

Stanly SteinbergDepartment of Mathematics and Statistics

University of New MexicoAlbuquerque NM 87131

http://math.unm.edu/∼stanly/

Collaborators: J. Castillo, J.M. Hyman, D.A.R. Justo, M. Longoni deCastro, N. Robidoux, J. Zingano, M. Shashkov

. – p.1/35

Introduction

Why is integration by parts so important? Many important properties ofinitial-boundary value problems follow from the divergence theorem,which in one dimension is integration by parts.

. – p.2/35

Introduction

Why is integration by parts so important? Many important properties ofinitial-boundary value problems follow from the divergence theorem,which in one dimension is integration by parts.

Summation by parts is the discrete analog of integration by parts.Discretization methods that have a summation by parts that isanalogous to integration by parts have strong stability properties.

. – p.2/35

Important Calculus

The Fundamental Theorem:

∫ 1

0

df

dxdx = f(1) − f(0)

. – p.3/35

Important Calculus

The Fundamental Theorem:

∫ 1

0

df

dxdx = f(1) − f(0)

Integration by Parts:

∫ 1

0

df

dxg dx +

∫ 1

0

fdg

dxdx = f(1) g(1) − f(0) g(0)

. – p.3/35

Important Calculus

The Fundamental Theorem:

∫ 1

0

df

dxdx = f(1) − f(0)

Integration by Parts:

∫ 1

0

df

dxg dx +

∫ 1

0

fdg

dxdx = f(1) g(1) − f(0) g(0)

Follows from the Product Rule and the Fundamental Theorem:

d

dx(f g) =

df

dxg + f

dg

dx

. – p.3/35

Initial-Boundary Value Problems

The region: 0 ≤ x ≤ 1 , t ≥ 0

. – p.4/35

Initial-Boundary Value Problems

The region: 0 ≤ x ≤ 1 , t ≥ 0

The diffusion or heat equation and the wave equation:

∂f

∂t=

∂2f

∂x2,

∂2f

∂t2=

∂2f

∂x2

. – p.4/35

Initial-Boundary Value Problems

The region: 0 ≤ x ≤ 1 , t ≥ 0

The diffusion or heat equation and the wave equation:

∂f

∂t=

∂2f

∂x2,

∂2f

∂t2=

∂2f

∂x2

Initial Conditions:

f(x, 0) = f0(x) , diffusion and wave ,∂f

∂t(x, 0) = f1(x) wave

. – p.4/35

Initial-Boundary Value Problems

The region: 0 ≤ x ≤ 1 , t ≥ 0

The diffusion or heat equation and the wave equation:

∂f

∂t=

∂2f

∂x2,

∂2f

∂t2=

∂2f

∂x2

Initial Conditions:

f(x, 0) = f0(x) , diffusion and wave ,∂f

∂t(x, 0) = f1(x) wave

Boundary Conditions:

−α0

∂f

∂x(0, t) + β0f(0, t) = γ0

+α1

∂f

∂x(1, t) + β1f(1, t) = γ1

. – p.4/35

Conservation Laws

The amount of stuff in [0, 1]:

A(t) =

∫ 1

0

f(x, t) dx

. – p.5/35

Conservation Laws

The amount of stuff in [0, 1]:

A(t) =

∫ 1

0

f(x, t) dx

The derivation of the conservation law:

∂A

∂t=

∫ 1

0

∂f

∂t=

∫ 1

0

∂2f

∂x2dx

=

[

∂f

∂x

]x=1

x=0

= −

(

β1

α1

f(1, t) +β0

α0

f(0, t)

)

. – p.5/35

Conservation Laws

The amount of stuff in [0, 1]:

A(t) =

∫ 1

0

f(x, t) dx

The derivation of the conservation law:

∂A

∂t=

∫ 1

0

∂f

∂t=

∫ 1

0

∂2f

∂x2dx

=

[

∂f

∂x

]x=1

x=0

= −

(

β1

α1

f(1, t) +β0

α0

f(0, t)

)

Result: If f ≥ 0, α0 β0 ≥ 0, α1 β1 ≥ 0, then A(t) cannot increase.

. – p.5/35

Dissipation Law

The amount of “energy” in [0, 1]:

E(t) =1

2

∫ 1

0

f2(x, t) dx

. – p.6/35

Dissipation Law

The amount of “energy” in [0, 1]:

E(t) =1

2

∫ 1

0

f2(x, t) dx

The derivation of the decay law:

∂E

∂t=

∫ 1

0

f∂f

∂tdx =

∫ 1

0

f∂2f

∂x2dx = −

∫ 1

0

(

∂f

∂x

)2

dx +

[

f∂f

∂x

]x=1

x=0

= −

∫ 1

0

(

∂f

∂x

)2

dx −

(

β1

α1

f2(1, t) +β0

α0

f2(0, t)

)

. – p.6/35

Dissipation Law

The amount of “energy” in [0, 1]:

E(t) =1

2

∫ 1

0

f2(x, t) dx

The derivation of the decay law:

∂E

∂t=

∫ 1

0

f∂f

∂tdx =

∫ 1

0

f∂2f

∂x2dx = −

∫ 1

0

(

∂f

∂x

)2

dx +

[

f∂f

∂x

]x=1

x=0

= −

∫ 1

0

(

∂f

∂x

)2

dx −

(

β1

α1

f2(1, t) +β0

α0

f2(0, t)

)

Result: If α0 β0 ≥ 0, α1 β1 ≥ 0, then E(t) cannot increase.Better: f not constant implies E(t) decreases.

. – p.6/35

The Wave Equation

The energy (kinetic plus potential) is:

E(t) =1

2

∫ 1

0

(

∂f

∂t

)2

+

(

∂f

∂x

)2

dx

. – p.7/35

The Wave Equation

The energy (kinetic plus potential) is:

E(t) =1

2

∫ 1

0

(

∂f

∂t

)2

+

(

∂f

∂x

)2

dx

∂E

∂t=

∫ 1

0

{

∂f

∂t

∂2f

∂t2+

∂f

∂x

∂2f

∂t ∂x

}

dx

=

∫ 1

0

{

∂f

∂t

∂2f

∂x2−

∂f

∂t

∂2f

∂x2

}

dx +

[

∂f

∂t

∂f

∂x

]x=1

x=0

=

[

∂f

∂t

∂f

∂x

]x=1

x=0

= −1

2

∂t

(

β1

α1

f2(1, t) +β0

α0

f2(0, t)

)

. – p.7/35

The Wave Equation

The energy (kinetic plus potential) is:

E(t) =1

2

∫ 1

0

(

∂f

∂t

)2

+

(

∂f

∂x

)2

dx

Result: If α0 β0 = 0, α1 β1 = 0 then E(t) is constant.

. – p.7/35

The Wave Equation

The energy (kinetic plus potential) is:

E(t) =1

2

∫ 1

0

(

∂f

∂t

)2

+

(

∂f

∂x

)2

dx

Result: If α0 β0 = 0, α1 β1 = 0 then E(t) is constant.Better: Define

E(t) =1

2

∫ 1

0

(

∂f

∂t

)2

+

(

∂f

∂x

)2

dx +1

2

(

β1

α1

f2(1, t) +β0

α0

f2(0, t)

)

. – p.7/35

Summary

The Fundamental Theorem:

∫ 1

0

df

dxdx = f(1) − f(0)

. – p.8/35

Summary

The Fundamental Theorem:

∫ 1

0

df

dxdx = f(1) − f(0)

Integration by Parts:

∫ 1

0

df

dxg dx +

∫ 1

0

fdg

dxdx = f(1) g(1) − f(0) g(0)

. – p.8/35

Summary

The Fundamental Theorem:

∫ 1

0

df

dxdx = f(1) − f(0)

Integration by Parts:

∫ 1

0

df

dxg dx +

∫ 1

0

fdg

dxdx = f(1) g(1) − f(0) g(0)

Follows from the Product Rule and the Fundamental Theorem:

d

dx(f g) =

df

dxg + f

dg

dx

. – p.8/35

Summary

The Fundamental Theorem:

∫ 1

0

df

dxdx = f(1) − f(0)

Integration by Parts:

∫ 1

0

df

dxg dx +

∫ 1

0

fdg

dxdx = f(1) g(1) − f(0) g(0)

Follows from the Product Rule and the Fundamental Theorem:

d

dx(f g) =

df

dxg + f

dg

dx

Mimetic means to have discrete analogs of the fundamental theoremand integration by parts.

. – p.8/35

The Staggered Grid

ii−1 i+1

i+1/2i−1/2

. – p.9/35

The Staggered Grid

ii−1 i+1

i+1/2i−1/2

Regular grid:

1. xi < xi+1 for 0 ≤ i ≤ N − 1

2. xi < xi+1/2 < xi+1 for 0 ≤ i ≤ N − 1

. – p.9/35

The Staggered Grid

ii−1 i+1

i+1/2i−1/2

Regular grid:

1. xi < xi+1 for 0 ≤ i ≤ N − 1

2. xi < xi+1/2 < xi+1 for 0 ≤ i ≤ N − 1

Cell-based grid:

xi+1/2 =xi+1 + xi

2, 0 ≤ i ≤ N − 1

. – p.9/35

Difference Quotients

v f

vD

v f

f vD

v f

f vD

0 1 2

fG G G

. – p.10/35

Difference Quotients

v f

vD

v f

f vD

v f

f vD

0 1 2

fG G G

Grid functions:

vi , 0 ≤ i ≤ N ,

fi+1/2 , 0 ≤ i ≤ N − 1 ,

. – p.10/35

Difference Quotients

v f

vD

v f

f vD

v f

f vD

0 1 2

fG G G

The basic differences:

(δx)i = xi+1/2 − xi−1/2 , 1 ≤ i ≤ N − 1

(δf)i = fi+1/2 − fi−1/2 , 1 ≤ i ≤ N − 1

(δx)i+1/2= xi+1 − xi , 0 ≤ i ≤ N − 1

(δv)i+1/2= vi+1 − vi , 0 ≤ i ≤ N − 1

. – p.10/35

Difference Quotients

v f

vD

v f

f vD

v f

f vD

0 1 2

fG G G

The first divided differences:

(G f)i =(δf)i

(δx)i

, 1 ≤ i ≤ N − 1

(D v)i+1/2=

(δv)i+1/2

(δx)i+1/2

, 0 ≤ i ≤ N − 1

. – p.10/35

Boundary Difference Quotients

v f

vD

v f

f vD

v f

f vD

0 1 2

fG G G

. – p.11/35

Boundary Difference Quotients

v f

vD

v f

f vD

v f

f vD

0 1 2

fG G G

Assume we are given (to be determined later):

(δx)0

, (δx)N

(δf)0

, (δf)N

. – p.11/35

Boundary Difference Quotients

v f

vD

v f

f vD

v f

f vD

0 1 2

fG G G

Define the divided differences as:

(G f)0

=(δf)

0

(δx)0

(G f)N =(δf)N

(δx)N

. – p.11/35

Summation (Integration)

Use the mid-point and trapezoid rules to define discrete integration:

(I f)k =

k−1∑

i=0

fi+1/2 (δx)i+1/2, 0 ≤ k ≤ N

(I v)k+1/2=

k∑

0

vi (δx)i , 0 ≤ k ≤ N − 1

. – p.12/35

The Fundamental Theorem

THEOREM:

(I D v)k = vk − v0 , 0 ≤ k ≤ N

(I G f)k+1/2= fk+1/2−f1/2 + (δf)

0, 0 ≤ k ≤ N − 1

and

(G I v)k = vk

(DI f)k+1/2= fk+1/2

. – p.13/35

The Boundary Again

We want

f1/2 − (δf)0

= f0

or

(δf)0

= f1/2 − f0

01

2

Df

Dv

fv vv f f

Dv Dvf Gf Gf Gf

. – p.14/35

Summation by Parts

The Basic Summation-by-Parts Formula is:PROPOSITION:

N−1∑

i=0

(δv)i+1/2fi+1/2 +

N−1∑

i=1

vi(δf)i = vNfN−1/2 − v0f1/2

. – p.15/35

Proof of By Parts

PROOF: An analog of the product rule is

vi+1 fi+1/2 − vi fi−1/2 = (vi+1 − vi) fi+1/2 + vi

(

fi+1/2 − fi−1/2

)

. – p.16/35

Proof of By Parts

PROOF: An analog of the product rule is

vi+1 fi+1/2 − vi fi−1/2 = (vi+1 − vi) fi+1/2 + vi

(

fi+1/2 − fi−1/2

)

Summing this gives

N−1∑

i=1

(vi+1 − vi) fi+1/2 +

N−1∑

i=1

vi

(

fi+1/2 − fi−1/2

)

= vNfN−1/2 − v1f1/2

. – p.16/35

Proof of By Parts

PROOF: An analog of the product rule is

vi+1 fi+1/2 − vi fi−1/2 = (vi+1 − vi) fi+1/2 + vi

(

fi+1/2 − fi−1/2

)

Summing this gives

N−1∑

i=1

(vi+1 − vi) fi+1/2 +

N−1∑

i=1

vi

(

fi+1/2 − fi−1/2

)

= vNfN−1/2 − v1f1/2

and adding one more term to the first sum gives

N−1∑

i=0

(vi+1 − vi) fi+1/2 +N−1∑

i=1

vi

(

fi+1/2 − fi−1/2

)

= vNfN−1/2 − v0f1/2

. – p.16/35

Summation by Parts

The Summation-by-Parts Formula is:PROPOSITION:

N−1∑

i=0

(δv)i+1/2fi+1/2 +

N−1∑

i=1

vi(δf)i = vNfN−1/2 − v0f1/2

. – p.17/35

Summation by Parts

The Summation-by-Parts Formula is:PROPOSITION:

N−1∑

i=0

(δv)i+1/2fi+1/2 +

N−1∑

i=1

vi(δf)i = vNfN−1/2 − v0f1/2

Now we rewrite this using divided differences:COROLLARY:

N−1∑

i=0

(D v)i+1/2 fi+1/2 (δx)i+1/2+

N−1∑

i=1

vi (G f)i (δx)i = vNfN−1/2−v0f1/2

. – p.17/35

Summation by Parts

Now we rewrite this using divided differences:COROLLARY:

N−1∑

i=0

(D v)i+1/2 fi+1/2 (δx)i+1/2+

N−1∑

i=1

vi (G f)i (δx)i = vNfN−1/2 − v0f1/2

. – p.18/35

Summation by Parts

Now we rewrite this using divided differences:COROLLARY:

N−1∑

i=0

(D v)i+1/2 fi+1/2 (δx)i+1/2+

N−1∑

i=1

vi (G f)i (δx)i = vNfN−1/2 − v0f1/2

Choose:

(δx)0

= x1/2 − x0 , (δx)N = xN+1/2 − xN

(δf)0

= f1/2 − f0 , (δf)N = fN+1/2 − fN

. – p.18/35

Summation by Parts

Now we rewrite this using divided differences:COROLLARY:

N−1∑

i=0

(D v)i+1/2 fi+1/2 (δx)i+1/2+

N−1∑

i=1

vi (G f)i (δx)i = vNfN−1/2 − v0f1/2

Choose:

(δx)0

= x1/2 − x0 , (δx)N = xN+1/2 − xN

(δf)0

= f1/2 − f0 , (δf)N = fN+1/2 − fN

COROLLARY:

N−1∑

i=0

(D v)i+1/2 fi+1/2 (δx)i+1/2+

N∑

i=0

vi (G f)i (δx)i = vN fN − v0 f0

. – p.18/35

Inner Products

Inner products make the formulas even simpler:

〈u, v〉 =N∑

i=0

ui vi (δx)i ||u||2 = 〈u, u〉

〈f, g〉 =

N−1∑

i=0

fi+1/2 gi+1/2 (δx)i+1/2||f ||2 = 〈f, f〉

. – p.19/35

Inner Products

Inner products make the formulas even simpler:

〈u, v〉 =N∑

i=0

ui vi (δx)i ||u||2 = 〈u, u〉

〈f, g〉 =

N−1∑

i=0

fi+1/2 gi+1/2 (δx)i+1/2||f ||2 = 〈f, f〉

THEOREM:

〈D v, f〉 + 〈v,G f〉 = vN fN − v0 f0

. – p.19/35

Inner Products

Inner products make the formulas even simpler:

〈u, v〉 =N∑

i=0

ui vi (δx)i ||u||2 = 〈u, u〉

〈f, g〉 =

N−1∑

i=0

fi+1/2 gi+1/2 (δx)i+1/2||f ||2 = 〈f, f〉

THEOREM:

〈D v, f〉 + 〈v,G f〉 = vN fN − v0 f0

THEOREM: The difference operators kill and only kill constants:

G f = 0 ⇔ f = c , D v = 0 ⇔ v = c

where c is constant.. – p.19/35

Second-Order Operators

0 1 2

Df

f f f f

GfKGf

GfKGf

Gf

DKGf DKGfDKGfKGf

. – p.20/35

Second-Order Operators

0 1 2

Df

f f f f

GfKGf

GfKGf

Gf

DKGf DKGfDKGfKGf

L = D K G , (K v)i =N∑

j=0

K i,jvj .

. – p.20/35

The Flux Operator

The Flux Operator is

F f = KG f .

. – p.21/35

The Flux Operator

The Flux Operator is

F f = KG f .

Now we can analyze the second-order operator. Set:

v = F f = KG f

. – p.21/35

The Flux Operator

The Flux Operator is

F f = KG f .

Now we can analyze the second-order operator. Set:

v = F f = KG f

Then summation by parts gives:

〈DKG f, f〉 + 〈K G f,G f〉 = (KG f)N fN − (KG f)0

f0

. – p.21/35

A Boundary-Value Problem

DKG f = g

−αl (KG f)0

+ βl f0 = γl

+αr (KG f)N + βr fN = γr

. – p.22/35

A Boundary-Value Problem

DKG f = g

−αl (KG f)0

+ βl f0 = γl

+αr (KG f)N + βr fN = γr

ASSUME:

1. Non-Degeneracy: |αl| + |βl| > 0, |αr| + |βr| > 0;

2. Non-Inflow: αl βl ≥ 0 αr βr ≥ 0;

3. Non-Flux: |βl| + |βr| > 0;

4. Positive K : 〈K v, v〉 ≥ 0, 〈K v, v〉 = 0⇒v = 0.

. – p.22/35

The BVP is Solvable

THEOREM: The boundary-value problem has a unique solution.

. – p.23/35

The BVP is Solvable

THEOREM: The boundary-value problem has a unique solution.PROOF: For the case of Dirichlet boundary conditions, f0 = fN = 0, thesummation by parts formula

〈DKG f, f〉 + 〈K G f,G f〉 = (KG f)N fN − (KG f)0

f0

gives

〈−DKG f, f〉 = 〈K G f,G f〉

. – p.23/35

The BVP is Solvable

THEOREM: The boundary-value problem has a unique solution.PROOF: For the case of Dirichlet boundary conditions, f0 = fN = 0, thesummation by parts formula

〈DKG f, f〉 + 〈K G f,G f〉 = (KG f)N fN − (KG f)0

f0

gives

〈−DKG f, f〉 = 〈K G f,G f〉

Positive K gives

〈K G f,G f〉 ≥ C ||G f ||2

. – p.23/35

The BVP is Solvable

THEOREM: The boundary-value problem has a unique solution.PROOF: For the case of Dirichlet boundary conditions, f0 = fN = 0, thesummation by parts formula

〈DKG f, f〉 + 〈K G f,G f〉 = (KG f)N fN − (KG f)0

f0

gives

〈−DKG f, f〉 = 〈K G f,G f〉

Positive K gives

〈K G f,G f〉 ≥ C ||G f ||2

Poincaré–Friedricks gives

||G f || ≥ C||f ||

. – p.23/35

Approximating the Continuum

If f(x) and v(x) are a smooth continuum functions and f and v arediscrete functions, then how do we get the following?

. – p.24/35

Approximating the Continuum

If f(x) and v(x) are a smooth continuum functions and f and v arediscrete functions, then how do we get the following?

(G f)k ≈df

dx(xk) (D v)k+1/2

≈dv

dx(xk+1/2)

. – p.24/35

Approximating the Continuum

If f(x) and v(x) are a smooth continuum functions and f and v arediscrete functions, then how do we get the following?

(G f)k ≈df

dx(xk) (D v)k+1/2

≈dv

dx(xk+1/2)

(I f)k ≈

∫ xk

0

f(x) dx (I v)k+1/2≈

∫ xk+1/2

0

v(x) dx

. – p.24/35

Approximating the Continuum

If f(x) and v(x) are a smooth continuum functions and f and v arediscrete functions, then how do we get the following?

(G f)k ≈df

dx(xk) (D v)k+1/2

≈dv

dx(xk+1/2)

(I f)k ≈

∫ xk

0

f(x) dx (I v)k+1/2≈

∫ xk+1/2

0

v(x) dx

(L f)k+1/2≈ Lf(xk+1/2)

. – p.24/35

Projections

Cell projection:

fi+1/2 = (Pf)i+1/2 =1

δxi+1/2

∫ xi+1

xi

f(ξ) dξ , 0 ≤ i ≤ N − 1

. – p.25/35

Projections

Cell projection:

fi+1/2 = (Pf)i+1/2 =1

δxi+1/2

∫ xi+1

xi

f(ξ) dξ , 0 ≤ i ≤ N − 1

Nodal projection

vi = (Π v)i = v(xi) , 0 ≤ i ≤ N

. – p.25/35

Derivatives and Differences

Ti+1/2 =

(

Pdv

dx

)

i+1/2

− (DΠ v)i+1/2

=1

δxi+1/2

∫ xi+1

xi

dv

dξdξ −

vi+1 − vi

xi+1 − xi≡ 0

. – p.26/35

Derivatives and Differences

Ti+1/2 =

(

Pdv

dx

)

i+1/2

− (DΠ v)i+1/2

=1

δxi+1/2

∫ xi+1

xi

dv

dξdξ −

vi+1 − vi

xi+1 − xi≡ 0

Ti =

(

Πdf

dx

)

i

− (DP f)i

=df

dx(xi) −

(P f)i+1/2 − (P f)i−1/2

xi+1/2 − xi−1/2

=df

dx(xi) −

1

(δx)i

(

1

(δx)i+1/2

∫ xi+1

xi

f(s) ds −1

(δx)i−1/2

∫ xi

xi−1

f(s) ds

)

≈(δx)i−1/2

− (δx)i+1/2

3f ′′(xi)

. – p.26/35

Second-Order Operators

Use the flux form!

. – p.27/35

Second-Order Operators

Use the flux form!Recall that for the discrete operator

L = DF F = KG (discrete flux)

. – p.27/35

Second-Order Operators

Use the flux form!Recall that for the discrete operator

L = DF F = KG (discrete flux)

For the continuum operator,

L =d

dxF F = k

d

dx(continuum flux)

where k is a smooth function.

. – p.27/35

Truncation Error

(Tf)i+1/2= (PL f)i+1/2

− LP f = (P ((F f)′))i+1/2− (DF P f)i+1/2

=1

δxi+1/2

∫ xi+1

xi

d

dξ(F f) (ξ) dξ − (DF P f)i+1/2

=(F f)(xi+1) − (F f)(xi)

δxi+1/2

−(F P f)i+1

− (F P f)i

δxi+1/2

=(Ef)i+1

− (Ef)i

δxi+1/2

=δ (Ef)i+1/2

δxi+1/2

= (DEf)i+1/2

. – p.28/35

Truncation Error

(Tf)i+1/2= (PL f)i+1/2

− LP f = (P ((F f)′))i+1/2− (DF P f)i+1/2

=1

δxi+1/2

∫ xi+1

xi

d

dξ(F f) (ξ) dξ − (DF P f)i+1/2

=(F f)(xi+1) − (F f)(xi)

δxi+1/2

−(F P f)i+1

− (F P f)i

δxi+1/2

=(Ef)i+1

− (Ef)i

δxi+1/2

=δ (Ef)i+1/2

δxi+1/2

= (DEf)i+1/2

where

(Ef)i = (F f)(xi) − (F P f)i .

. – p.28/35

Truncation Error

(Tf)i+1/2= (PL f)i+1/2

− LP f = (P ((F f)′))i+1/2− (DF P f)i+1/2

=1

δxi+1/2

∫ xi+1

xi

d

dξ(F f) (ξ) dξ − (DF P f)i+1/2

=(F f)(xi+1) − (F f)(xi)

δxi+1/2

−(F P f)i+1

− (F P f)i

δxi+1/2

=(Ef)i+1

− (Ef)i

δxi+1/2

=δ (Ef)i+1/2

δxi+1/2

= (DEf)i+1/2

where

(Ef)i = (F f)(xi) − (F P f)i .

To find an accurate approximation to the boundary-value problem, weonly need find an accurate approximation to the flux.

. – p.28/35

A Representation for Operators

LEMMA If H is a discrete operator that kills the discrete function that isidentically one, then

H f = KG f

So, we can always represent a differentiation operator by N + 1 byN + 1 matrix K on grids with N cells.

. – p.29/35

A Representation for Operators

LEMMA If H is a discrete operator that kills the discrete function that isidentically one, then

H f = KG f

So, we can always represent a differentiation operator by N + 1 byN + 1 matrix K on grids with N cells.

For this presentation:Assume that k ≡ 1, and the grid is uniform. Note that even if k = 1, Kmay be non-trivial.We will display the results for uniform grids. For general grids, use theMathematica notebooks on my web page.

. – p.29/35

The Simplest Example

We first write out the low-order accuracy example where K is theidentity. This method has

• Second-Order flux truncation in the interior

• First-Order flux truncation at the boundary

• Second-Order accurate solution (by computing).

. – p.30/35

The Simplest Example

We first write out the low-order accuracy example where K is theidentity. This method has

• Second-Order flux truncation in the interior

• First-Order flux truncation at the boundary

• Second-Order accurate solution (by computing).

DKG =1

h2

2 −3 1 0 0 0 . . .

1 −2 1 0 0 0 . . .

0 1 −2 1 0 0 . . .

0 0 1 −2 1 0 . . .

......

......

......

. . .

.

. – p.30/35

A Fourth-Order Method

We now use a computer algebra system to find a higher-order method.

• Fourth-Order flux truncation in the interior

• Fourth-Order flux truncation at the boundary

• Fourth-Order accurate solution (by numerics)

. – p.31/35

A Fourth-Order Method

When N = 6,

K =

25

12− 115

72

23

36− 1

80 0 0

− 5

24

197

144− 13

72

1

480 0 0

0 − 1

12

7

6− 1

120 0 0

0 0 − 1

12

7

6− 1

120 0

0 0 0 − 1

12

7

6− 1

120

0 0 0 1

48− 13

72

197

144− 5

12

0 0 0 − 1

8

23

36− 115

72

25

6

,

. – p.32/35

A Fourth-Order Method

DKG =1

h2

55

12− 1087

144

545

144− 139

144

7

480 . . .

− 5

12

269

144− 403

144

209

144− 5

480 . . .

0 − 1

12

4

3− 5

2

4

3− 1

12. . .

0 0 − 1

12

4

3− 5

2

4

3. . .

0 0 0 − 1

12

4

3− 5

2. . .

0 0 0 0 − 1

12

4

3. . .

......

......

......

. . .

.

. – p.33/35

Truncation Errors

The truncation error for the first few rows of L = DKG are

point K = I fourth

x = h2

f (2)

3, − 5 h3 f (5)

72

x = 3 h2

−h2 f (4)

12, h3 f (5)

72

x = 5 h2

−h2 f (4)

12, h4 f (6)

90

When K = I the scheme is inconsistent.

. – p.34/35

Conclusion

The formulas for methods of any order in an arbitrary grid can becomputed using the Mathematica notebooks on my web page:math.unm.edu/∼stanly

. – p.35/35

Conclusion

The formulas for methods of any order in an arbitrary grid can becomputed using the Mathematica notebooks on my web page:math.unm.edu/∼stanly

A preprint of a paper that solves a more general problem is availablefrom my web page:A Discrete Calculus with Applications to High-Order Discretizations ofBoundary-Value Problems

. – p.35/35

Conclusion

The formulas for methods of any order in an arbitrary grid can becomputed using the Mathematica notebooks on my web page:math.unm.edu/∼stanly

A preprint of a paper that solves a more general problem is availablefrom my web page:A Discrete Calculus with Applications to High-Order Discretizations ofBoundary-Value Problems

¿Questions?¡Thanks!

. – p.35/35