Symbolic Generation of Finite Difference Formulae 

Robert M. Corless
Department of Applied Mathematics
and the Ontario Research Centre for Computer Algebra
University of Western Ontario
 

 

This work is joint work with Jichao Zhao, a Ph.D. student working under my direction, and is based in part on work done with Jacek Rokicki (T.U.Warsaw).  The applications in mathematical finance (not talked about here) are joint work with Matt Davison (Applied Math, Western) and Jichao Zhao. 

Introduction 

The finite difference calculus is very old, going back at least to Newton; even as a topic in modern numerical analysis it is very old.  It would be surprising if there were something really new to say...today we will have a tour around some old results, and do some bookkeeping & programming, and make a neat, though minor, refinement on a classical but recently more popular finite difference technique, now called "compact finite differences".  We will end (time permitting) with a discussion of some stability aspects. 

 

From "A Treatise on the Calculus of Finite Differences" by George Boole, 1st ed. 1860, 2nd ed. 1872 edited by J. F. Moulton: 

"The Calculus of Finite Differences may be strictly defined as the science which is occupied about the ratios of the simultaneous increments of quantities mutually dependent." 

 

From "The Calculus of Finite Differences" by L. M. Milne-Thompson, 1933: 

"Let f(x) be a given function of the variable x.  The Differential Calculus is concerned with the properties of which is still a function of the single variable




which is a function of the two variables
x and omega." 

 

Familiar finite differences include the forward difference above, which approximates the derivative to order h: 

> Delta[h](f)(x) = (f(x+h)-f(x))/h;
 

(Delta[h](f))(x) = (f(x+h)-f(x))/h 

> lhs() = series(rhs(),h,3);
 

(Delta[h](f))(x) = (series((D(f))(x)+1/2*((`@@`(D, 2))(f))(x)*h+O(h^2),h,2)) 

The central difference operator which approximates the derivative to order h^2: 

> delta[h](f)(x) = (f(x+h/2)-f(x-h/2))/h;
 

(delta[h](f))(x) = (f(x+1/2*h)-f(x-1/2*h))/h 

> lhs() = series(rhs(),h,4);
 

(delta[h](f))(x) = (series((D(f))(x)+1/24*((`@@`(D, 3))(f))(x)*h^2+O(h^3),h,3)) 

The old-fashioned usages of finite difference formulae were different from today's needs (indeed the first use of the Method of Lines was to derive a partial differential equation, not solve it! (see Hairer, Norsett & Wanner, Solving ODE I, section I.6, for a discussion of the contributions of Brook Taylor 1715, Johann Bernoulli 1727, and d'Alembert 1747), and by and large their operational methods for generation of formulae have fallen by the wayside: we know pretty much all the formulae we need.  Or do we? 

>
 

Symbolic Generation, the easy way 

Generation of finite difference formulae is, nowadays, pretty easy: just look them up, many of them are known already.  But, how can we find them ourselves? 

Operator Formalism 

The older texts make the connection between operator expansions and series: 

> restart;
 

> f(x+h) = series( f(x+h),h );
 

f(x+h) = (series(f(x)+(D(f))(x)*h+1/2*((`@@`(D, 2))(f))(x)*h^2+1/6*((`@@`(D, 3))(f))(x)*h^3+1/24*((`@@`(D, 4))(f))(x)*h^4+1/120*((`@@`(D, 5))(f))(x)*h^5+O(h^6),h,6))
f(x+h) = (series(f(x)+(D(f))(x)*h+1/2*((`@@`(D, 2))(f))(x)*h^2+1/6*((`@@`(D, 3))(f))(x)*h^3+1/24*((`@@`(D, 4))(f))(x)*h^4+1/120*((`@@`(D, 5))(f))(x)*h^5+O(h^6),h,6))
f(x+h) = (series(f(x)+(D(f))(x)*h+1/2*((`@@`(D, 2))(f))(x)*h^2+1/6*((`@@`(D, 3))(f))(x)*h^3+1/24*((`@@`(D, 4))(f))(x)*h^4+1/120*((`@@`(D, 5))(f))(x)*h^5+O(h^6),h,6))
 

The following is the "shift" operator; it takes a function, and returns a function with shifted argument: 

> E := f -> (t->f(t+h));
 

(Typesetting:-mprintslash)([E := proc (f) options operator, arrow; proc (t) options operator, arrow; f(t+h) end proc end proc], [proc (f) options operator, arrow; proc (t) options operator, arrow; f(t... 

> E(sin);
 

proc (t) options operator, arrow; sin(t+h) end proc 

> E(sin)(x);
 

sin(x+h) 

Composition of operators is represented by the symbol @.  Repeated composition is by @@, analogous to the old Fortran * for times and ** for power. 

> (E@@3)(sin)(x);
 

sin(x+3*h) 

"It is obvious that" Taylor expansion means that the operators E and D may be related by the following series, which looks like the exponential series: 

> E = I + h*D + h^2*(D@@2)/2! + h^3*(D@@3)/3! + O(h^4);
 

E = I+h*D+1/2*h^2*`@@`(D, 2)+1/6*h^3*`@@`(D, 3)+O(h^4) 

In other words, for a slightly modified meaning of the exponential function, 

> E = exp(h*D);
 

E = exp(h*D) 

Of course, that statement is a shorthand notation for an operator relation: 

> Delta = E - I;
 

Delta = E-I 

> Delta = (exp(h*D) - 1)/h;
 

Delta = (exp(h*D)-1)/h 

> Dln := solve(%,D);
 

(Typesetting:-mprintslash)([Dln := ln(Delta*h+1)/h], [ln(Delta*h+1)/h]) 

Wait a minute, that only LOOKED like an exponential---now this one LOOKS LIKE a logarithm... 

> series( %, h );
 

series(Delta-1/2*Delta^2*h+1/3*Delta^3*h^2-1/4*Delta^4*h^3+1/5*Delta^5*h^4+O(h^5),h,5) 

> D = %;
 

D = (series(Delta-1/2*Delta^2*h+1/3*Delta^3*h^2-1/4*Delta^4*h^3+1/5*Delta^5*h^4+O(h^5),h,5)) 

Let's check this, that seems somewhat strange: 

> D(f)(x) - (f(x+h)-f(x))/h + (f(x+2*h)-2*f(x+h)+f(x))/2/h ;
 

(D(f))(x)-(f(x+h)-f(x))/h+1/2*(f(x+2*h)-2*f(x+h)+f(x))/h 

> series(%,h,4);
 

series(1/3*((`@@`(D, 3))(f))(x)*h^2+O(h^3),h,3) 

So this technique appears to work!  Can we soup it up? 

> (f(x+h/2) - f(x-h/2))/h;
 

(f(x+1/2*h)-f(x-1/2*h))/h 

> series( %, h, 8 );
 

series((D(f))(x)+1/24*((`@@`(D, 3))(f))(x)*h^2+1/1920*((`@@`(D, 5))(f))(x)*h^4+1/322560*((`@@`(D, 7))(f))(x)*h^6+O(h^7),h,7)
series((D(f))(x)+1/24*((`@@`(D, 3))(f))(x)*h^2+1/1920*((`@@`(D, 5))(f))(x)*h^4+1/322560*((`@@`(D, 7))(f))(x)*h^6+O(h^7),h,7)
 

Of course everyone immediately recognizes that series as being a hyperbolic sine... 

> series( 2*sinh(h*D/2)/h, h, 8 );
 

series(D+1/24*D^3*h^2+1/1920*D^5*h^4+1/322560*D^7*h^6+O(h^7),h,7) 

> (exp(h*D/2) - exp(-h*D/2))/h = convert( (exp(h*D/2) - exp(-h*D/2))/h, trigh );
 

(exp(1/2*h*D)-exp(-1/2*h*D))/h = 2*sinh(1/2*h*D)/h 

> delta = 2*sinh( h*D/2 )/h;
 

delta = 2*sinh(1/2*h*D)/h 

> Ddelta := solve(%,D);
 

(Typesetting:-mprintslash)([Ddelta := 2*arcsinh(1/2*delta*h)/h], [2*arcsinh(1/2*delta*h)/h]) 

> D = series(%,h,8);
 

D = (series(delta-1/24*delta^3*h^2+3/640*delta^5*h^4-5/7168*delta^7*h^6+O(h^7),h,7)) 

> delta := f -> (t->(f(t+h/2)-f(t-h/2))/h);
 

(Typesetting:-mprintslash)([delta := proc (f) options operator, arrow; proc (t) options operator, arrow; (f(t+1/2*h)-f(t-1/2*h))/h end proc end proc], [proc (f) options operator, arrow; proc (t) optio...
(Typesetting:-mprintslash)([delta := proc (f) options operator, arrow; proc (t) options operator, arrow; (f(t+1/2*h)-f(t-1/2*h))/h end proc end proc], [proc (f) options operator, arrow; proc (t) optio...
(Typesetting:-mprintslash)([delta := proc (f) options operator, arrow; proc (t) options operator, arrow; (f(t+1/2*h)-f(t-1/2*h))/h end proc end proc], [proc (f) options operator, arrow; proc (t) optio...
(Typesetting:-mprintslash)([delta := proc (f) options operator, arrow; proc (t) options operator, arrow; (f(t+1/2*h)-f(t-1/2*h))/h end proc end proc], [proc (f) options operator, arrow; proc (t) optio...
 

The following is a "Maple trick" to ensure that h is treated as a constant in the following applications of operators. 

> h := t -> h;
 

(Typesetting:-mprintslash)([h := proc (t) options operator, arrow; h end proc], [proc (t) options operator, arrow; h end proc]) 

> D6 := delta - h^2*(delta@@3)/24 + 3/640*h^4*(delta@@5);
 

(Typesetting:-mprintslash)([D6 := delta-1/24*h^2*`@@`(delta, 3)+3/640*h^4*`@@`(delta, 5)], [delta-1/24*h^2*`@@`(delta, 3)+3/640*h^4*`@@`(delta, 5)]) 

> expand(D6(f)(t));
 

75/64*f(t+1/2*h)/h-75/64*f(t-1/2*h)/h-25/384*f(t+3/2*h)/h+25/384*f(t-3/2*h)/h+3/640*f(t+5/2*h)/h-3/640*f(t-5/2*h)/h
75/64*f(t+1/2*h)/h-75/64*f(t-1/2*h)/h-25/384*f(t+3/2*h)/h+25/384*f(t-3/2*h)/h+3/640*f(t+5/2*h)/h-3/640*f(t-5/2*h)/h
 

> series(%,h,8);
 

series((D(f))(t)+5/7168*((`@@`(D, 7))(f))(t)*h^6+O(h^7),h,7) 

Hey, rather neat!  This operator--series correspondence is fun stuff! 

 

One last trick: using Pade approximants instead of series. 

> series(Ddelta,h,6);
 

series(delta-1/24*delta^3*h^2+3/640*delta^5*h^4+O(h^6),h,6) 

> convert(%,ratpoly);
 

1/3*(240*delta+17*delta^3*h^2)/(80+9*delta^2*h^2) 

> small := expand( (80*(t->t)+9*h^2*(delta@@2))(D(f))(t) - 240/3*delta(f)(t) - 17/3*h^2*(delta@@3)(f)(t) );
 

(Typesetting:-mprintslash)([small := 62*(D(f))(t)+9*(D(f))(t+h)+9*(D(f))(t-h)-63*f(t+1/2*h)/h+63*f(t-1/2*h)/h-17/3*f(t+3/2*h)/h+17/3*f(t-3/2*h)/h], [62*(D(f))(t)+9*(D(f))(t+h)+9*(D(f))(t-h)-63*f(t+1/2...
(Typesetting:-mprintslash)([small := 62*(D(f))(t)+9*(D(f))(t+h)+9*(D(f))(t-h)-63*f(t+1/2*h)/h+63*f(t-1/2*h)/h-17/3*f(t+3/2*h)/h+17/3*f(t-3/2*h)/h], [62*(D(f))(t)+9*(D(f))(t+h)+9*(D(f))(t-h)-63*f(t+1/2...
(Typesetting:-mprintslash)([small := 62*(D(f))(t)+9*(D(f))(t+h)+9*(D(f))(t-h)-63*f(t+1/2*h)/h+63*f(t-1/2*h)/h-17/3*f(t+3/2*h)/h+17/3*f(t-3/2*h)/h], [62*(D(f))(t)+9*(D(f))(t+h)+9*(D(f))(t-h)-63*f(t+1/2...
 

> series( small, h, 8 ):
 

> simplify(%);
 

series(-61/4480*((`@@`(D, 7))(f))(t)*h^6+O(h^7),h,7) 

We have just seen our first "compact" finite difference formula, also known as a Pade method.  Let's try another: 

> series(Dln,h,6);
 

series(Delta-1/2*Delta^2*h+1/3*Delta^3*h^2-1/4*Delta^4*h^3+1/5*Delta^5*h^4+O(h^5),h,5) 

> convert(%,ratpoly, 2,2 );
 

1/3*(30*Delta+21*Delta^2*h+Delta^3*h^2)/(3*h^2*Delta^2+12*Delta*h+10) 

> Delta := f -> (t->(f(t+h)-f(t))/h);
 

(Typesetting:-mprintslash)([Delta := proc (f) options operator, arrow; proc (t) options operator, arrow; (f(t+h)-f(t))/h end proc end proc], [proc (f) options operator, arrow; proc (t) options operato... 

> small := expand((10*(t->t) + 12*h*Delta + 3*h^2*(Delta@@2))(D(f))(t) - (10*Delta + 7*h*(Delta@@2) + h^2*(Delta@@3)/3)(f)(t));
 

(Typesetting:-mprintslash)([small := (D(f))(t)+6*(D(f))(t+h)+3*(D(f))(t+2*h)+3*f(t+h)/h+10/3*f(t)/h-6*f(t+2*h)/h-1/3*f(t+3*h)/h], [(D(f))(t)+6*(D(f))(t+h)+3*(D(f))(t+2*h)+3*f(t+h)/h+10/3*f(t)/h-6*f(t+...
(Typesetting:-mprintslash)([small := (D(f))(t)+6*(D(f))(t+h)+3*(D(f))(t+2*h)+3*f(t+h)/h+10/3*f(t)/h-6*f(t+2*h)/h-1/3*f(t+3*h)/h], [(D(f))(t)+6*(D(f))(t+h)+3*(D(f))(t+2*h)+3*f(t+h)/h+10/3*f(t)/h-6*f(t+...
 

> series( small, h, 7 );
 

series(-1/60*((`@@`(D, 6))(f))(t)*h^5+O(h^6),h,6) 

Good, so we have a fifth-order accurate formula that uses four sample points...maybe we can do better??  And, wait a minute, that formula gives us a relation between the derivative of f, at three points, and the values of f, at four points.  We'll have to do some work to sort that out! 

>
 

 

 

Brute Force
 

Maxim #31, from http://web.comlab.ox.ac.uk/oucl/work/nick.trefethen/maxims.html 

Computational mathematics is mainly based on two ideas: Taylor series, and linear algebra. 

 

 

We don't have to be clever about this kind of thing, any more, though: we can simply use brute force. 

> stencil := [[0,0],[h,0],[-h,0],[0,h],[0,-h]];
 

(Typesetting:-mprintslash)([stencil := [[0, 0], [h, 0], [-h, 0], [0, h], [0, -h]]], [[[0, 0], [h, 0], [-h, 0], [0, h], [0, -h]]]) 

The stencil is the description of where (which grid points) we know information at. 

> N := nops( stencil );
 

(Typesetting:-mprintslash)([N := 5], [5]) 

> anszatz := add( b[i]*f(stencil[i][1],stencil[i][2]),i=1..N ) + b[N+1]*h^2*(D[1,1])(f)(-h,0) + b[N+2]*h^2*(D[1,1])(f)(h,0)
;
 

(Typesetting:-mprintslash)([anszatz := b[1]*f(0, 0)+b[2]*f(h, 0)+b[3]*f(-h, 0)+b[4]*f(0, h)+b[5]*f(0, -h)+b[6]*h^2*(D[1, 1](f))(-h, 0)+b[7]*h^2*(D[1, 1](f))(h, 0)], [b[1]*f(0, 0)+b[2]*f(h, 0)+b[3]*f(-...
(Typesetting:-mprintslash)([anszatz := b[1]*f(0, 0)+b[2]*f(h, 0)+b[3]*f(-h, 0)+b[4]*f(0, h)+b[5]*f(0, -h)+b[6]*h^2*(D[1, 1](f))(-h, 0)+b[7]*h^2*(D[1, 1](f))(h, 0)], [b[1]*f(0, 0)+b[2]*f(h, 0)+b[3]*f(-...
(Typesetting:-mprintslash)([anszatz := b[1]*f(0, 0)+b[2]*f(h, 0)+b[3]*f(-h, 0)+b[4]*f(0, h)+b[5]*f(0, -h)+b[6]*h^2*(D[1, 1](f))(-h, 0)+b[7]*h^2*(D[1, 1](f))(h, 0)], [b[1]*f(0, 0)+b[2]*f(h, 0)+b[3]*f(-...
 

The anszatz is a description of what we know at the stencil, and reflects the desired form of the finite difference approximation.  In the way I have written it above, the anszatz has "zero weight". 

> difexp := h*(D[1])(f)(0,0);
 

(Typesetting:-mprintslash)([difexp := h*(D[1](f))(0, 0)], [h*(D[1](f))(0, 0)]) 

The differential expression is what we wish to approximate by the anszatz.  Now we take Taylor series of the difference between the anszatz and the differential expression, and set the coefficients to zero. 

> zero := series( difexp - anszatz, h, N+3 );
 

(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
(Typesetting:-mprintslash)([zero := series((-b[1]*f(0, 0)-b[2]*f(0, 0)-b[5]*f(0, 0)-b[4]*f(0, 0)-b[3]*f(0, 0))+((D[1](f))(0, 0)+b[5]*(D[2](f))(0, 0)-b[4]*(D[2](f))(0, 0)+b[3]*(D[1](f))(0, 0)-b[2]*(D[1...
 

> indets(zero); 1
 

{h, b[1], b[2], b[3], b[4], b[5], b[6], b[7]} 

> indets(zero, function); 1
 

{O(1), (D[2](f))(0, 0), (D[2, 2, 2, 2](f))(0, 0), (D[2, 2, 2, 2, 2, 2](f))(0, 0), (D[2, 2](f))(0, 0), (D[2, 2, 2, 2, 2](f))(0, 0), (D[2, 2, 2](f))(0, 0), f(0, 0), (D[1](f))(0, 0), (D[2, 2, 2, 2, 2, 2,...
{O(1), (D[2](f))(0, 0), (D[2, 2, 2, 2](f))(0, 0), (D[2, 2, 2, 2, 2, 2](f))(0, 0), (D[2, 2](f))(0, 0), (D[2, 2, 2, 2, 2](f))(0, 0), (D[2, 2, 2](f))(0, 0), f(0, 0), (D[1](f))(0, 0), (D[2, 2, 2, 2, 2, 2,...
{O(1), (D[2](f))(0, 0), (D[2, 2, 2, 2](f))(0, 0), (D[2, 2, 2, 2, 2, 2](f))(0, 0), (D[2, 2](f))(0, 0), (D[2, 2, 2, 2, 2](f))(0, 0), (D[2, 2, 2](f))(0, 0), f(0, 0), (D[1](f))(0, 0), (D[2, 2, 2, 2, 2, 2,...
{O(1), (D[2](f))(0, 0), (D[2, 2, 2, 2](f))(0, 0), (D[2, 2, 2, 2, 2, 2](f))(0, 0), (D[2, 2](f))(0, 0), (D[2, 2, 2, 2, 2](f))(0, 0), (D[2, 2, 2](f))(0, 0), f(0, 0), (D[1](f))(0, 0), (D[2, 2, 2, 2, 2, 2,...
{O(1), (D[2](f))(0, 0), (D[2, 2, 2, 2](f))(0, 0), (D[2, 2, 2, 2, 2, 2](f))(0, 0), (D[2, 2](f))(0, 0), (D[2, 2, 2, 2, 2](f))(0, 0), (D[2, 2, 2](f))(0, 0), f(0, 0), (D[1](f))(0, 0), (D[2, 2, 2, 2, 2, 2,...
{O(1), (D[2](f))(0, 0), (D[2, 2, 2, 2](f))(0, 0), (D[2, 2, 2, 2, 2, 2](f))(0, 0), (D[2, 2](f))(0, 0), (D[2, 2, 2, 2, 2](f))(0, 0), (D[2, 2, 2](f))(0, 0), f(0, 0), (D[1](f))(0, 0), (D[2, 2, 2, 2, 2, 2,...
 

> nz := collect(convert(zero, polynom), indets(zero, function), factor); 1
 

(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
(Typesetting:-mprintslash)([nz := -(-b[5]+b[4])*h*(D[2](f))(0, 0)-1/24*(b[5]+b[4])*h^4*(D[2, 2, 2, 2](f))(0, 0)-1/720*(b[5]+b[4])*h^6*(D[2, 2, 2, 2, 2, 2](f))(0, 0)-1/2*(b[5]+b[4])*h^2*(D[2, 2](f))(0,...
 

> eqs := select(proc (t) options operator, arrow; degree(t, h) <= 4 end proc, {coeffs(nz, indets(zero, function))}); 1
eqs := select(proc (t) options operator, arrow; degree(t, h) <= 4 end proc, {coeffs(nz, indets(zero, function))}); 1
 

(Typesetting:-mprintslash)([eqs := {-(-b[5]+b[4])*h, -1/24*(b[5]+b[4])*h^4, -1/2*(b[5]+b[4])*h^2, -1/6*(-b[5]+b[4])*h^3, -(-1-b[3]+b[2])*h, -1/2*(2*b[7]+2*b[6]+b[3]+b[2])*h^2, -1/6*(6*b[7]-6*b[6]-b[3]...
(Typesetting:-mprintslash)([eqs := {-(-b[5]+b[4])*h, -1/24*(b[5]+b[4])*h^4, -1/2*(b[5]+b[4])*h^2, -1/6*(-b[5]+b[4])*h^3, -(-1-b[3]+b[2])*h, -1/2*(2*b[7]+2*b[6]+b[3]+b[2])*h^2, -1/6*(6*b[7]-6*b[6]-b[3]...
(Typesetting:-mprintslash)([eqs := {-(-b[5]+b[4])*h, -1/24*(b[5]+b[4])*h^4, -1/2*(b[5]+b[4])*h^2, -1/6*(-b[5]+b[4])*h^3, -(-1-b[3]+b[2])*h, -1/2*(2*b[7]+2*b[6]+b[3]+b[2])*h^2, -1/6*(6*b[7]-6*b[6]-b[3]...
(Typesetting:-mprintslash)([eqs := {-(-b[5]+b[4])*h, -1/24*(b[5]+b[4])*h^4, -1/2*(b[5]+b[4])*h^2, -1/6*(-b[5]+b[4])*h^3, -(-1-b[3]+b[2])*h, -1/2*(2*b[7]+2*b[6]+b[3]+b[2])*h^2, -1/6*(6*b[7]-6*b[6]-b[3]...
 

> vars := remove(proc (t) options operator, arrow; has(t, h) end proc, indets(eqs)); 1
 

(Typesetting:-mprintslash)([vars := {b[1], b[2], b[3], b[4], b[5], b[6], b[7]}], [{b[1], b[2], b[3], b[4], b[5], b[6], b[7]}]) 

> sol := solve( eqs, vars );
 

(Typesetting:-mprintslash)([sol := {b[7] = (-1)/12, b[6] = 1/12, b[5] = 0, b[4] = 0, b[3] = (-1)/2, b[2] = 1/2, b[1] = 0}], [{b[7] = (-1)/12, b[6] = 1/12, b[5] = 0, b[4] = 0, b[3] = (-1)/2, b[2] = 1/2... 

> subs(sol, eqs); 1
 

{0} 

> formula := map( factor, subs( sol, anszatz ) );
 

(Typesetting:-mprintslash)([formula := 1/2*f(h, 0)-1/2*f(-h, 0)+1/12*h^2*(D[1, 1](f))(-h, 0)-1/12*h^2*(D[1, 1](f))(h, 0)], [1/2*f(h, 0)-1/2*f(-h, 0)+1/12*h^2*(D[1, 1](f))(-h, 0)-1/12*h^2*(D[1, 1](f))(...
(Typesetting:-mprintslash)([formula := 1/2*f(h, 0)-1/2*f(-h, 0)+1/12*h^2*(D[1, 1](f))(-h, 0)-1/12*h^2*(D[1, 1](f))(h, 0)], [1/2*f(h, 0)-1/2*f(-h, 0)+1/12*h^2*(D[1, 1](f))(-h, 0)-1/12*h^2*(D[1, 1](f))(...
 

> err := map(factor, series( difexp - formula, h, 7 ) );
 

(Typesetting:-mprintslash)([err := series(7/360*(D[1, 1, 1, 1, 1](f))(0, 0)*h^5+O(h^7),h,7)], [series(7/360*(D[1, 1, 1, 1, 1](f))(0, 0)*h^5+O(h^7),h,7)]) 

This worksheet procedure can be modified for whatever purpose you desire...in some sense this is all one needs.  It's a bit clumsy, sort of like re-writing your Fortran every time you want to run the program again, and to make it work one has to ensure that all weights are correct, and that enough series terms are taken, but the final step (generation of the error coefficients) ensures that the results are correct. 

>
 

>
 

Programmatic Generation 

The brute force approach discussed above has been turned into a reasonably easy to use program. 

> read "C:/Data/Talks/CAIMS2005/findif10.mpl";
 

> fd,err := FINDIF( f, [h], [[0],[h],[2*h]], [[[0]],[[0]],[[0]]], h*D[1](f)(h), 3, d );
 

(Typesetting:-mprintslash)([fd, err := -1/2*f(0)+1/2*f(2*h), -1/6*h^3*((`@@`(D, 3))(f))(0)-1/6*h^4*((`@@`(D, 4))(f))(0)-11/120*h^5*((`@@`(D, 5))(f))(0)-13/360*h^6*((`@@`(D, 6))(f))(0)], [-1/2*f(0)+1/2...
(Typesetting:-mprintslash)([fd, err := -1/2*f(0)+1/2*f(2*h), -1/6*h^3*((`@@`(D, 3))(f))(0)-1/6*h^4*((`@@`(D, 4))(f))(0)-11/120*h^5*((`@@`(D, 5))(f))(0)-13/360*h^6*((`@@`(D, 6))(f))(0)], [-1/2*f(0)+1/2...
(Typesetting:-mprintslash)([fd, err := -1/2*f(0)+1/2*f(2*h), -1/6*h^3*((`@@`(D, 3))(f))(0)-1/6*h^4*((`@@`(D, 4))(f))(0)-11/120*h^5*((`@@`(D, 5))(f))(0)-13/360*h^6*((`@@`(D, 6))(f))(0)], [-1/2*f(0)+1/2...
 

> stencil := [[0,0,0], [Delta[x],0,0], [-Delta[x],0,0], [0,Delta[y],0], [0,-Delta[y],0], [0,0,Delta[z]], [0,0,-Delta[z]]];
 

(Typesetting:-mprintslash)([stencil := [[0, 0, 0], [Delta[x], 0, 0], [-Delta[x], 0, 0], [0, Delta[y], 0], [0, -Delta[y], 0], [0, 0, Delta[z]], [0, 0, -Delta[z]]]], [[[0, 0, 0], [Delta[x], 0, 0], [-Del...
(Typesetting:-mprintslash)([stencil := [[0, 0, 0], [Delta[x], 0, 0], [-Delta[x], 0, 0], [0, Delta[y], 0], [0, -Delta[y], 0], [0, 0, Delta[z]], [0, 0, -Delta[z]]]], [[[0, 0, 0], [Delta[x], 0, 0], [-Del...
 

> mask := [seq([[0,0,0],[1,0,0],[0,1,0],[0,0,1]],i=1..nops(stencil))];
 

(Typesetting:-mprintslash)([mask := [[[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0...
(Typesetting:-mprintslash)([mask := [[[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0...
(Typesetting:-mprintslash)([mask := [[[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0...
(Typesetting:-mprintslash)([mask := [[[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0...
(Typesetting:-mprintslash)([mask := [[[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0...
(Typesetting:-mprintslash)([mask := [[[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0...
(Typesetting:-mprintslash)([mask := [[[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 0, 0], [1, 0, 0], [0...
 

> intrp := FINDIF( f, [Delta[x],Delta[y],Delta[z]], stencil, mask, Delta[x]*D[1](f)(a*Delta[x],b*Delta[y],c*Delta[z]), 3, d );
 

(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
(Typesetting:-mprintslash)([intrp := d[5, 2]*Delta[x]*(D[1](f))(0, -Delta[y], 0)+d[4, 4]*Delta[z]*(D[3](f))(0, Delta[y], 0)+d[4, 3]*Delta[y]*(D[2](f))(0, Delta[y], 0)+d[4, 2]*Delta[x]*(D[1](f))(0, Del...
 

> leftoverds := select(proc (t) options operator, arrow; has(t, d) end proc, indets(intrp[1])); -1
 

> removeds := map(proc (t) options operator, arrow; t = 0 end proc, leftoverds); -1
 

> eval(intrp[1], removeds); 1
 

(-1-2*a+c-b)*Delta[x]*(D[1](f))(-Delta[x], 0, 0)+b*Delta[z]*(D[3](f))(0, -Delta[y], 0)+(c-b)*Delta[x]*(D[1](f))(0, 0, Delta[z])+b*Delta[y]*(D[2](f))(0, 0, Delta[z])-b*Delta[y]*(D[2](f))(-Delta[x], 0, ...
(-1-2*a+c-b)*Delta[x]*(D[1](f))(-Delta[x], 0, 0)+b*Delta[z]*(D[3](f))(0, -Delta[y], 0)+(c-b)*Delta[x]*(D[1](f))(0, 0, Delta[z])+b*Delta[y]*(D[2](f))(0, 0, Delta[z])-b*Delta[y]*(D[2](f))(-Delta[x], 0, ...
(-1-2*a+c-b)*Delta[x]*(D[1](f))(-Delta[x], 0, 0)+b*Delta[z]*(D[3](f))(0, -Delta[y], 0)+(c-b)*Delta[x]*(D[1](f))(0, 0, Delta[z])+b*Delta[y]*(D[2](f))(0, 0, Delta[z])-b*Delta[y]*(D[2](f))(-Delta[x], 0, ...
(-1-2*a+c-b)*Delta[x]*(D[1](f))(-Delta[x], 0, 0)+b*Delta[z]*(D[3](f))(0, -Delta[y], 0)+(c-b)*Delta[x]*(D[1](f))(0, 0, Delta[z])+b*Delta[y]*(D[2](f))(0, 0, Delta[z])-b*Delta[y]*(D[2](f))(-Delta[x], 0, ...
(-1-2*a+c-b)*Delta[x]*(D[1](f))(-Delta[x], 0, 0)+b*Delta[z]*(D[3](f))(0, -Delta[y], 0)+(c-b)*Delta[x]*(D[1](f))(0, 0, Delta[z])+b*Delta[y]*(D[2](f))(0, 0, Delta[z])-b*Delta[y]*(D[2](f))(-Delta[x], 0, ...
 

> mtaylor(eval(intrp[2], removeds), [Delta[x], Delta[y], Delta[z]], 4); 1
 

1/6*(4*a-c+b+1+3*a^2)*(D[1, 1, 1](f))(0, 0, 0)*Delta[x]^3+1/2*(b+2*a*b)*(D[1, 1, 2](f))(0, 0, 0)*Delta[y]*Delta[x]^2+1/2*(2*a*c+b)*(D[1, 1, 3](f))(0, 0, 0)*Delta[z]*Delta[x]^2+1/2*b^2*(D[1, 2, 2](f))(...
1/6*(4*a-c+b+1+3*a^2)*(D[1, 1, 1](f))(0, 0, 0)*Delta[x]^3+1/2*(b+2*a*b)*(D[1, 1, 2](f))(0, 0, 0)*Delta[y]*Delta[x]^2+1/2*(2*a*c+b)*(D[1, 1, 3](f))(0, 0, 0)*Delta[z]*Delta[x]^2+1/2*b^2*(D[1, 2, 2](f))(...
1/6*(4*a-c+b+1+3*a^2)*(D[1, 1, 1](f))(0, 0, 0)*Delta[x]^3+1/2*(b+2*a*b)*(D[1, 1, 2](f))(0, 0, 0)*Delta[y]*Delta[x]^2+1/2*(2*a*c+b)*(D[1, 1, 3](f))(0, 0, 0)*Delta[z]*Delta[x]^2+1/2*b^2*(D[1, 2, 2](f))(...
1/6*(4*a-c+b+1+3*a^2)*(D[1, 1, 1](f))(0, 0, 0)*Delta[x]^3+1/2*(b+2*a*b)*(D[1, 1, 2](f))(0, 0, 0)*Delta[y]*Delta[x]^2+1/2*(2*a*c+b)*(D[1, 1, 3](f))(0, 0, 0)*Delta[z]*Delta[x]^2+1/2*b^2*(D[1, 2, 2](f))(...
1/6*(4*a-c+b+1+3*a^2)*(D[1, 1, 1](f))(0, 0, 0)*Delta[x]^3+1/2*(b+2*a*b)*(D[1, 1, 2](f))(0, 0, 0)*Delta[y]*Delta[x]^2+1/2*(2*a*c+b)*(D[1, 1, 3](f))(0, 0, 0)*Delta[z]*Delta[x]^2+1/2*b^2*(D[1, 2, 2](f))(...
1/6*(4*a-c+b+1+3*a^2)*(D[1, 1, 1](f))(0, 0, 0)*Delta[x]^3+1/2*(b+2*a*b)*(D[1, 1, 2](f))(0, 0, 0)*Delta[y]*Delta[x]^2+1/2*(2*a*c+b)*(D[1, 1, 3](f))(0, 0, 0)*Delta[z]*Delta[x]^2+1/2*b^2*(D[1, 2, 2](f))(...
 

>
 

Minimizing error coefficients 

> leadtrm := mtaylor(intrp[2], [Delta[x], Delta[y], Delta[z]], 4); -1
 

> diffvrs := indets(leadtrm, function); 1
 

(Typesetting:-mprintslash)([diffvrs := {(D[1, 1, 1](f))(0, 0, 0), (D[1, 3, 3](f))(0, 0, 0), (D[1, 1, 2](f))(0, 0, 0), (D[1, 1, 3](f))(0, 0, 0), (D[1, 2, 2](f))(0, 0, 0), (D[1, 2, 3](f))(0, 0, 0), (D[3...
(Typesetting:-mprintslash)([diffvrs := {(D[1, 1, 1](f))(0, 0, 0), (D[1, 3, 3](f))(0, 0, 0), (D[1, 1, 2](f))(0, 0, 0), (D[1, 1, 3](f))(0, 0, 0), (D[1, 2, 2](f))(0, 0, 0), (D[1, 2, 3](f))(0, 0, 0), (D[3...
(Typesetting:-mprintslash)([diffvrs := {(D[1, 1, 1](f))(0, 0, 0), (D[1, 3, 3](f))(0, 0, 0), (D[1, 1, 2](f))(0, 0, 0), (D[1, 1, 3](f))(0, 0, 0), (D[1, 2, 2](f))(0, 0, 0), (D[1, 2, 3](f))(0, 0, 0), (D[3...
(Typesetting:-mprintslash)([diffvrs := {(D[1, 1, 1](f))(0, 0, 0), (D[1, 3, 3](f))(0, 0, 0), (D[1, 1, 2](f))(0, 0, 0), (D[1, 1, 3](f))(0, 0, 0), (D[1, 2, 2](f))(0, 0, 0), (D[1, 2, 3](f))(0, 0, 0), (D[3...
 

> eqs := coeffs(leadtrm, diffvrs); 1
 

(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
(Typesetting:-mprintslash)([eqs := 1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]-2*d[...
 

> tosolve := select(proc (t) options operator, arrow; has(t, d) end proc, {eqs}); 1
 

(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
(Typesetting:-mprintslash)([tosolve := {1/6*(4*a-c+b+1+3*d[6, 4]+2*d[6, 1]-2*d[7, 2]+2*d[4, 4]-2*d[7, 3]-d[7, 4]-2*d[4, 1]+d[5, 3]-2*d[4, 2]-4*d[2, 1]+3*a^2-3*d[4, 3]-d[1, 2]-d[1, 3]+d[1, 4]-8*d[2, 2]...
 

> minimal := solve(tosolve, leftoverds); 1
 

(Typesetting:-mprintslash)([minimal := {d[4, 2] = b^2-d[5, 2], d[2, 3] = -1/2*b^2+d[5, 2]+1/2*b+a*b, d[5, 3] = -2*d[4, 1]-5*d[4, 3], d[1, 3] = -4*d[4, 1]-8*d[4, 3]-2*a*b, d[4, 4] = d[7, 3], d[2, 4] = ...
(Typesetting:-mprintslash)([minimal := {d[4, 2] = b^2-d[5, 2], d[2, 3] = -1/2*b^2+d[5, 2]+1/2*b+a*b, d[5, 3] = -2*d[4, 1]-5*d[4, 3], d[1, 3] = -4*d[4, 1]-8*d[4, 3]-2*a*b, d[4, 4] = d[7, 3], d[2, 4] = ...
(Typesetting:-mprintslash)([minimal := {d[4, 2] = b^2-d[5, 2], d[2, 3] = -1/2*b^2+d[5, 2]+1/2*b+a*b, d[5, 3] = -2*d[4, 1]-5*d[4, 3], d[1, 3] = -4*d[4, 1]-8*d[4, 3]-2*a*b, d[4, 4] = d[7, 3], d[2, 4] = ...
(Typesetting:-mprintslash)([minimal := {d[4, 2] = b^2-d[5, 2], d[2, 3] = -1/2*b^2+d[5, 2]+1/2*b+a*b, d[5, 3] = -2*d[4, 1]-5*d[4, 3], d[1, 3] = -4*d[4, 1]-8*d[4, 3]-2*a*b, d[4, 4] = d[7, 3], d[2, 4] = ...
(Typesetting:-mprintslash)([minimal := {d[4, 2] = b^2-d[5, 2], d[2, 3] = -1/2*b^2+d[5, 2]+1/2*b+a*b, d[5, 3] = -2*d[4, 1]-5*d[4, 3], d[1, 3] = -4*d[4, 1]-8*d[4, 3]-2*a*b, d[4, 4] = d[7, 3], d[2, 4] = ...
(Typesetting:-mprintslash)([minimal := {d[4, 2] = b^2-d[5, 2], d[2, 3] = -1/2*b^2+d[5, 2]+1/2*b+a*b, d[5, 3] = -2*d[4, 1]-5*d[4, 3], d[1, 3] = -4*d[4, 1]-8*d[4, 3]-2*a*b, d[4, 4] = d[7, 3], d[2, 4] = ...
(Typesetting:-mprintslash)([minimal := {d[4, 2] = b^2-d[5, 2], d[2, 3] = -1/2*b^2+d[5, 2]+1/2*b+a*b, d[5, 3] = -2*d[4, 1]-5*d[4, 3], d[1, 3] = -4*d[4, 1]-8*d[4, 3]-2*a*b, d[4, 4] = d[7, 3], d[2, 4] = ...
(Typesetting:-mprintslash)([minimal := {d[4, 2] = b^2-d[5, 2], d[2, 3] = -1/2*b^2+d[5, 2]+1/2*b+a*b, d[5, 3] = -2*d[4, 1]-5*d[4, 3], d[1, 3] = -4*d[4, 1]-8*d[4, 3]-2*a*b, d[4, 4] = d[7, 3], d[2, 4] = ...
 

> eval(leadtrm, minimal); 1
 

b*(D[1, 2, 3](f))(0, 0, 0)*c*Delta[y]*Delta[z]*Delta[x] 

> interm := eval(intrp[1], minimal); -1
 

> zerod := select(proc (t) options operator, arrow; has(t, d) end proc, indets(interm)); 1
 

(Typesetting:-mprintslash)([zerod := {d[6, 4], d[6, 1], d[7, 2], d[7, 3], d[4, 1], d[5, 2], d[2, 1], d[4, 3], d[2, 2]}], [{d[6, 4], d[6, 1], d[7, 2], d[7, 3], d[4, 1], d[5, 2], d[2, 1], d[4, 3], d[2, ... 

> eval(interm, map(proc (t) options operator, arrow; t = 0 end proc, zerod)); 1
 

(1/2*c+a*c-1/2*c^2)*Delta[z]*(D[3](f))(Delta[x], 0, 0)+(-1/2*b^2+1/2*b+a*b)*Delta[y]*(D[2](f))(Delta[x], 0, 0)+b^2*Delta[x]*(D[1](f))(0, Delta[y], 0)+(-1/2*c+a*c+1/2*c^2)*Delta[z]*(D[3](f))(-Delta[x],...
(1/2*c+a*c-1/2*c^2)*Delta[z]*(D[3](f))(Delta[x], 0, 0)+(-1/2*b^2+1/2*b+a*b)*Delta[y]*(D[2](f))(Delta[x], 0, 0)+b^2*Delta[x]*(D[1](f))(0, Delta[y], 0)+(-1/2*c+a*c+1/2*c^2)*Delta[z]*(D[3](f))(-Delta[x],...
(1/2*c+a*c-1/2*c^2)*Delta[z]*(D[3](f))(Delta[x], 0, 0)+(-1/2*b^2+1/2*b+a*b)*Delta[y]*(D[2](f))(Delta[x], 0, 0)+b^2*Delta[x]*(D[1](f))(0, Delta[y], 0)+(-1/2*c+a*c+1/2*c^2)*Delta[z]*(D[3](f))(-Delta[x],...
(1/2*c+a*c-1/2*c^2)*Delta[z]*(D[3](f))(Delta[x], 0, 0)+(-1/2*b^2+1/2*b+a*b)*Delta[y]*(D[2](f))(Delta[x], 0, 0)+b^2*Delta[x]*(D[1](f))(0, Delta[y], 0)+(-1/2*c+a*c+1/2*c^2)*Delta[z]*(D[3](f))(-Delta[x],...
(1/2*c+a*c-1/2*c^2)*Delta[z]*(D[3](f))(Delta[x], 0, 0)+(-1/2*b^2+1/2*b+a*b)*Delta[y]*(D[2](f))(Delta[x], 0, 0)+b^2*Delta[x]*(D[1](f))(0, Delta[y], 0)+(-1/2*c+a*c+1/2*c^2)*Delta[z]*(D[3](f))(-Delta[x],...
(1/2*c+a*c-1/2*c^2)*Delta[z]*(D[3](f))(Delta[x], 0, 0)+(-1/2*b^2+1/2*b+a*b)*Delta[y]*(D[2](f))(Delta[x], 0, 0)+b^2*Delta[x]*(D[1](f))(0, Delta[y], 0)+(-1/2*c+a*c+1/2*c^2)*Delta[z]*(D[3](f))(-Delta[x],...
(1/2*c+a*c-1/2*c^2)*Delta[z]*(D[3](f))(Delta[x], 0, 0)+(-1/2*b^2+1/2*b+a*b)*Delta[y]*(D[2](f))(Delta[x], 0, 0)+b^2*Delta[x]*(D[1](f))(0, Delta[y], 0)+(-1/2*c+a*c+1/2*c^2)*Delta[z]*(D[3](f))(-Delta[x],...
(1/2*c+a*c-1/2*c^2)*Delta[z]*(D[3](f))(Delta[x], 0, 0)+(-1/2*b^2+1/2*b+a*b)*Delta[y]*(D[2](f))(Delta[x], 0, 0)+b^2*Delta[x]*(D[1](f))(0, Delta[y], 0)+(-1/2*c+a*c+1/2*c^2)*Delta[z]*(D[3](f))(-Delta[x],...
 

>
 

Compact Finite Difference Formulae 

Maxim #18: Symbolic computing is mainly useful when you want a symbolic answer. 

 

We have used this approach to generate a number of new formulae; new chiefly in the issue of closure at the boundary.  I give a brief tutorial on the use of compact finite difference formulae here, and then discuss the refinements.  First, let us look at a compact finite difference formula for the first derivative. 

> restart;
 

> read "c:/data/talks/caims2005/jichao/first.mpl";
 

> Digits := trunc(evalhf(Digits));
 

(Typesetting:-mprintslash)([Digits := 14], [14]) 

> f := x -> sin(Pi*x)+cos(2*x);
 

(Typesetting:-mprintslash)([f := proc (x) options operator, arrow; sin(Pi*x)+cos(2*x) end proc], [proc (x) options operator, arrow; sin(Pi*x)+cos(2*x) end proc]) 

> df := (D)(f);
 

(Typesetting:-mprintslash)([df := proc (x) options operator, arrow; cos(Pi*x)*Pi-2*sin(2*x) end proc], [proc (x) options operator, arrow; cos(Pi*x)*Pi-2*sin(2*x) end proc]) 

FDMP = First Derivative Matrix Pencil 

We use this program to have a look at a particular family of compact finite differences, generated using FINDIF in order for fast solution.  Each row of the matrix pencil represents one invocation of a compact finite difference formula; the first row and the last row are special because they cannot involve points to the left (for the first row) or points to the right (for the last row), and special formulae were generated for those equations. 

> N := 16; 1
 

(Typesetting:-mprintslash)([N := 16], [16]) 

> h := 1/N; 1
 

(Typesetting:-mprintslash)([h := 1/16], [1/16]) 

> M, C := FDMP( N, h, 0, 0, float[8] );
 

M, C := Vector[column](%id = 152492664), Vector[column](%id = 152492664) 

> C; 1
 

 

Why such a peculiar M matrix?  We have that M D(f) = C f, and so in order to find our derivatives we must solve the system.  We see above that M is tridiagonal, which makes it easy...but in fact the first entry of M was chosen to make it even easier! 

>
 

> L,U :=LinearAlgebra:-LUDecomposition( M, output=['L','U'] );
 

L, U := Vector[column](%id = 152031472), Vector[column](%id = 146779132) 

> L; 1
 

 

> 2.0+sqrt(3.0);  1/(2.0+sqrt(3.0));
 

3.7320508075689 

.26794919243112 

The LU factoring of M can be done exactly, analytically, and consists of factors with constant diagonals...therefore the solution of M f[x] = C f can be carried out in a matrix-free, division-free manner!  See the file FirstBox.mpl.  This is very close to as fast as evaluation of an explicit finite difference formula.  The matrix L is well-conditioned if we choose c = 2 + sqrt(3) (but not if we choose c=2 - sqrt(3), which also formally allows exact factoring). 

>
 

> X := Vector(N,i->evalf(i/N));
 

X := Vector[column](%id = 147912664) 

> U := Vector(N, proc (i) options operator, arrow; evalf(f(X[i])) end proc); 1
 

U := Vector[column](%id = 145440752) 

> `.`(C, U); 1
 

 

The following can be done very quickly (almost as fast as central differences) if the analytical factoring of M is used (in fact, of course, neither M, nor C, nor even the explicit factors, are formed explicitly: instead the differences are done in a black-box manner; for this talk we show the matrices explicitly for comprehension, not execution). 

> dU := (LinearAlgebra:-LinearSolve)(M, `.`(C, U)); 1
 

dU := Vector[column](%id = 152785500) 

>
 

> exactdU := Vector(N, proc (i) options operator, arrow; evalf(df(X[i])) end proc); 1
 

exactdU := Vector[column](%id = 152518296) 

In the following, we just check that our procedure really does generate fourth order accuracy: 

> (LinearAlgebra:-Norm)(dU-exactdU, 1); 1
 

0.240704525568544159e-2 

> #Digits := 30;
 

> Ns := [seq( combinat[fibonacci](k), k=8..14 ) ];
 

(Typesetting:-mprintslash)([Ns := [21, 34, 55, 89, 144, 233, 377]], [[21, 34, 55, 89, 144, 233, 377]]) 

> err := table();
 

(Typesetting:-mprintslash)([err := TABLE([])], [table( [ ] )]) 

> for i to nops(Ns) do
 N := Ns[i];
 h := 1.0/N;
 M,C := FDMP(N,h,-10,-10,float[8]);
 Vals := Vector( N, datatype=float[8], i -> evalf(f(i*h)) );
 C0   := LinearAlgebra:-LinearSolve(M,C.Vals);
 Z0 := C0 - Vector( N, datatype=float[8], i-> evalf( df(i*h)) );
 err[i] := LinearAlgebra:-Norm(Z0,2);
end do:
 

> p1 := plots[loglogplot]( [seq([Ns[i],err[i]], i=1..nops(Ns))], style=POINT, symbol=DIAMOND, symbolsize=30 ):
 

> p2 := plots[loglogplot]( [seq([Ns[i], err[3]*(Ns[3]/Ns[i])^4], i=1..nops(Ns))] ):
plots[display]( {p1,p2} );
 

Plot 

>
 

>
 

>
 

>
 

Stability Issues 

A good reference here is Carpenter, Gottlieb and Abarbanel, J. Comp. Phys, 108, 1993.  Studying semidiscretized PDE by the method of lines where the spatial derivatives are done by these compact methods leads to studying the eigenvalues (generalized eigenvalues) of the matrix pencils presented here. 

Eigenvalues of First Derivative Matrix Pencil 

with(LinearAlgebra): 

> read "C:/data/talks/caims2005/Jichao/first.mpl";
 

> with(LinearAlgebra):
 

> N := 377; h := 1.0/N;
 

(Typesetting:-mprintslash)([N := 377], [377]) 

(Typesetting:-mprintslash)([h := 0.26525198938992e-2], [0.26525198938992e-2]) 

> M, C := FDMP( N, h, 0, 0, float[8] );
 

M, C := Vector[column](%id = 152245416), Vector[column](%id = 152245416) 

> A := `.`(1/M, C); 1
 

A := Vector[column](%id = 148769396) 

> st := time(): E,V:= Eigenvectors( A, output=['values','vectors'] ); time()-st;
 

E, V := Vector[column](%id = 153933536), Vector[column](%id = 152767316) 

8.533 

> for i to N do if Re(E[i])>0 then break end if end do;
 

> i;
 

358 

> E[i];
 

.905343781231674360+.504538326268035298*I 

> Norm( V[1..-1,i] );
 

0.756846255486120778e-1 

> plot( [seq([Re(V[k,i]),Im(V[k,i])], k=1..N)], style=POINT );
 

Plot 

> #
 

> plot([seq([Re(E[i]),Im(E[i])],i=1..N)],style=POINT,view=[0..7,-50..50]);
 

Plot 

> E;
 

 

 

 

Eigenvalues of Bound Second Derivative Matrix Pencil 

In solving (say) with one wants to discretize u and replace the second spatial derivative with a compact finite difference operator MU[xx] = CU so that we may instead solve the vector differential equation  The eigenvalues of C/M then become of interest; they should all be negative, to preserve the stability of this equation for positive It turns out that the use of the boundary conditions is important here, and if we do use them, then the eigenvalues are indeed all real and negative.  The pseudospectra are also quite nice, though C/M is not a normal matrix. 

> read "C:/data/talks/caims2005/Jichao/boundsecond.mpl";
 

> Digits := trunc(evalhf(Digits));
 

(Typesetting:-mprintslash)([Digits := 14], [14]) 

> Ns := [seq( combinat[fibonacci](k), k=8..14 ) ];
 

(Typesetting:-mprintslash)([Ns := [21, 34, 55, 89, 144, 233, 377]], [[21, 34, 55, 89, 144, 233, 377]]) 

> err := table();
 

(Typesetting:-mprintslash)([err := TABLE([])], [table( [ ] )]) 

> f := x -> sin(Pi*x);
 

(Typesetting:-mprintslash)([f := proc (x) options operator, arrow; sin(Pi*x) end proc], [proc (x) options operator, arrow; sin(Pi*x) end proc]) 

> d2f := (D@@2)(f);
 

(Typesetting:-mprintslash)([d2f := proc (x) options operator, arrow; -sin(Pi*x)*Pi^2 end proc], [proc (x) options operator, arrow; -sin(Pi*x)*Pi^2 end proc]) 

> for i to nops(Ns) do
 N := Ns[i];
 h := 1.0/(N+1);
 M,C := SDMP(N,h,float[8]);
 Vals := Vector( N, datatype=float[8], i -> evalf(f(i*h)) );
 C0   := LinearAlgebra:-LinearSolve(M,C.Vals);
 Z0 := C0 - Vector( N, datatype=float[8], i-> evalf( d2f(i*h)) );
 err[i] := LinearAlgebra:-Norm(Z0,2);
end do:
 

> p1 := plots[loglogplot]( [seq([Ns[i],err[i]], i=1..nops(Ns))], style=POINT, symbol=BOX ):
 

> p2 := plots[loglogplot]( [seq([Ns[i], err[1]*(Ns[1]/Ns[i])^4], i=1..nops(Ns))] ):
plots[display]( {p1,p2} );
 

Plot 

>  N := Ns[2];
 h := 1.0/(N+1);
 M,C := SDMP(N,h,float[8]);
 

(Typesetting:-mprintslash)([N := 34], [34]) 

(Typesetting:-mprintslash)([h := 0.28571428571429e-1], [0.28571428571429e-1]) 

M, C := Vector[column](%id = 152637736), Vector[column](%id = 152637736) 

> with(LinearAlgebra):
 

> E,V := Eigenvectors( C, M, output=['values','vectors']);
 

E, V := Vector[column](%id = 152584108), Vector[column](%id = 148599864) 

> bigE := max( seq(Re(E[i]),i=1..N) );
 

(Typesetting:-mprintslash)([bigE := -9.86960184317979916], [-9.86960184317979916]) 

> plot([seq(h^2/12*[Re(E[i]),Im(E[i])],i=1..N)],style=POINT);
 

Plot 

From EigTool (see the Pseudospectra Gateway) we can see that the largest eigenvalue is bounded away from zero, on the left, as are pseudospectra for perturbations that are of reasonably small size. 

Image 

Future work 

Of course, it is the pseudospectra that probably really matters here.  We wish to investigate (more fully) the pseudospectra of these analytically factorable matrices (In the bound 2nd derivative case, the pseudospectra are very well behaved, even though the matrix is quite far from normal).   A detailed description of just how much the computation really costs, and how much we really save by pre-factoring the compact finite difference matrix, would be useful. 

 

>