Two-dimensional relaxation calculations commonly use sites on a square lattice with spacing Δx=Δy=h, and label the sites by (i,j), where i,j are integers and xi=ih+x0, yj=jh+y0. The value of the potential at (i,j) can be approximated by the average of the values at neighboring sites. [Recall the relevant theorem about harmonic functions.] But what average?
((a)) If F(x,y) is a well-behaved function in the neighborhood of the origin, but not necessarily harmonic, by explicit Taylor series expansions, show that the ``cross'' sum
Sc=F(h,0)+F(0,h)+F(−h,0)+F(0,−h)
can be expressed as
Sc=4F(0,0)+h2∇2F+12h4(Fxxxx+Fyyyy)+O(h6)
((b)) Similarly, show that the ``square'' sum,
SS=F(h,h)+F(−h,h)+F(−h,−h)+F(h,−h)
can be expressed as
SS=4F(0,0)+2h2∇2F−3h4(Fxxxx+Fyyyy)+2h4∇2(∇2F)+O(h6)
Here Fxxxx is the fourth partial derivative of F with respect to x, evaluated at x=0, y=0, etc. If ∇2F=0, the averages Sc/4 and Ss/4 each give the value of F(0,0), correct to order h3 inclusive. Note that an improvement can be obtained by forming the ``improved'' average,
⟨⟨F(0,0)⟩⟩=51[Sc+41Ss]
where
⟨⟨F(0,0)⟩⟩=F(0,0)+103h2∇2F+40h4∇2(∇2F)+O(h6)
If ∇2F=0, then Sˉ gives F(0,0), correct to order h5 inclusive. For Poisson's equation, the charge density and its lowest order Laplacian can be inserted for the same accuracy.