Using High Order Finite Differences/Preliminary Estimates

Continuous Problem
This book is primarily concerned with finite difference approximations to the solutions of partial differential equations. However, it is both useful in itself and instructive to study the solution of some one-dimensional problems by finite differences.

Consider the meager problem to solve

$$-y^{\prime\prime}(x)\;=\;f(x)$$   on  $$a\;\le\;x\;\le\;b$$

subject to the boundary conditions

$$y(a)\;=\;y(b)\;=\;0$$.

The following inequality derived next motivates the analysis of the higher-dimensional problems involving the Laplacian operator.

$$\int_a^b-y(x)y^{\prime\prime}(x)dx\;=\; \mid_a^b\,-y(x)y^{\prime}(x)+\int_a^b\left\vert\,y^{\prime}(x)\,\right\vert^2\,dx\;=\;\int_a^b\left\vert\,y^{\prime}(x)\,\right\vert^2\,dx$$

Making use of inequality  that

$$\int_a^b\left\vert\,y^{\prime}(x)\,\right\vert^2\,dx\;\ge\;\frac{\pi^2}{(b-a)^2}\int_a^b\left\vert\,y(x)\,\right\vert^2\,dx$$

and using the equation together with the Cauchy Schwartz inequality

$$\int_a^b-y(x)y^{\prime\prime}(x)\,dx\;=\;\int_a^b y(x)f(x)\,dx\;\le\;\sqrt{\int_a^b\left\vert\,y(x)\,\right\vert^2\,dx\;}\sqrt{\int_a^b\left\vert\,f(x)\,\right\vert^2\,dx\;}$$.

It follows

$$\frac{\pi^2}{(b-a)^2}\int_a^b\left\vert\,y(x)\,\right\vert^2\,dx\;\le\;\sqrt{\int_a^b\left\vert\,y(x)\,\right\vert^2\,dx\;}\sqrt{\int_a^b\left\vert\,f(x)\,\right\vert^2\,dx\;}$$.

and that

$$\sqrt{\int_a^b\left\vert\,y(x)\,\right\vert^2\,dx\;}\;\le\;\frac{(b-a)^2}{\pi^2}\sqrt{\int_a^b\left\vert\,f(x)\,\right\vert^2\,dx\;}$$.

Now, consider when $$z(x)$$  solves the approximate problem

$$-z^{\prime\prime}(x)\;=\;g(x)$$   on  $$a\;\le\;x\;\le\;b$$

subject to the boundary conditions $$z(a)\;=\;z(b)\;=\;0$$, with $$g(x)$$  near  $$f(x)$$. Since $$-(y(x)-z(x))^{\prime\prime}\;=\;(f(x)-g(x))$$ , $$\sqrt{\int_a^b\left\vert\,y(x)-z(x)\,\right\vert^2\,dx\;}\;\le\;\frac{(b-a)^2}{\pi^2}\sqrt{\int_a^b\left\vert\,f(x)-g(x)\,\right\vert^2\,dx\;}$$.

This inequality just above will be generalized to both discrete and higher dimensional analogs. This will enable the analysis of the accuracy of finite difference methods for several kinds of equations.

Another point to make is, if non-zero boundary conditions

$$y(a)\;=A,\quad\;y(b)\;=\;B$$,

are wanted, then

$$y(x)+\frac{(B-A)}{(b-a)}(x-a)+A$$

will solve the new problem. So there will not be a loss of generality by assuming zero boundary conditions, in most cases. In the higher dimensional case this will have the effect of separating the problem into two parts.

Solution by Finite Differences
Return to  the problem to solve from the previous section.

$$-y^{\prime\prime}(x)\;=\;f(x)$$   on  $$a\;\le\;x\;\le\;b$$

subject to the boundary conditions

$$y(a)\;=\;y(b)\;=\;0$$.

This problem may be better by means other than finite differences. For example,

letting $$g(x)\;=\;\int_{a}^{x}(x-t)f(t)\,dt$$,  and applying the rule ,  $$g^{\prime}(x)\;=\;(x-x)f(x)+\int_{a}^{x}\tfrac{\partial}{\partial x}(x-t)f(t)\,dt\;=\;\int_{a}^{x}f(t)\,dt$$  so that   $$g^{\prime\prime}(x)\;=\;f(x)$$. Then  $$y(x)\;=\;g(x)-\frac{g(b)}{b-a}(x-a)$$   is a solution of the problem.

However, it will illustrate the finite difference method without being to difficult to follow, for a start. Partial differential equations can on the other hand be difficult to solve by direct analytic methods.

Begin with a partition of the interval given by

$$a\;=\;x_0\;<\;x_1\;<\;x_2\;<\;\ldots \;<\;x_n\;<\;x_{n+1}\;=\;b$$.

For simplicities sake, assume a uniform mesh $$h\;=\;(b-a)\,/\,(n+1)$$.

That is to say $$x_i-x_{i-1}\,=\,h$$    for   $$i\,=\,1,\;2\;,\ldots ,\;n+1$$.

For the beginning approximate the second derivative by the second order accurate difference operator

$$\frac{d_h^2}{d_h x^2}y(x)\,=\,h^{-2}(y(x-h)-2\,y(x)+y(x+h))$$.

Define $$f_i\,=\,f(x_i)$$. It will be shown that there exist unique

$$y_0,\;y_1,\;y_2,\;,\ldots ,\;y_n,\;y_{n+1}$$  with   $$y_0\,=\,y_{n+1}\,=\,0$$

that solve the equations

$$-h^{-2}(y_{i-1}-2\,y_i+y_{i+1})\;=\;f_i$$  for   $$i\,=\,1,\;2,\ldots ,\;n$$.

In addition, and most importantly, the $$y_i$$  approximate  $$y(x)$$  in the sense

$$\sqrt{\textstyle\sum_{i\,=\,1}^{\,n}\left\vert\,y(x_i)-y_i\,\right\vert^2\;}\;\le\;\sqrt n\,B\,h^2$$

for some bound $$B$$  independent of  $$h$$.

At this point some clarification must be made and some notation introduced. The term finite difference operator is used for two different, but related operators. One is the difference quotient applied to the function $$y(x)$$,  namely

$$\frac{d_h^2}{d_h x^2}y(x)\,=\,h^{-2}(y(x-h)-2\,y(x)+y(x+h))$$

and the other is the linear operator

$$h^{-2}(y_{i-1}-2\,y_i+y_{i+1})$$

applied to the vector $$\vec{y}\,=\,$$.

The notation

$$(\frac{d_h^2}{d_h x^2})_{i}\,\vec y\,=\,h^{-2}(y_{i-1}-2\,y_i+y_{i+1})$$

will be used to distinguish between the two. The equations  can be written as

$$-(\frac{d_h^2}{d_h x^2})_{i}\,\vec y\,=\,f_i$$.

The linear operator  $$(\frac{d_h^2}{d_h x^2})_{I}$$  is defined by

$$(\frac{d_h^2}{d_h x^2})_{I}\,\vec y\;=\;<(\frac{d_h^2}{d_h x^2})_{1}\,\vec y\;\;\;(\frac{d_h^2}{d_h x^2})_{2}\,\vec y\;\;\ldots\;\;(\frac{d_h^2}{d_h x^2})_{n}\,\vec y>$$.

Then  $$(\frac{d_h^2}{d_h x^2})_{I}$$  can be thought of as

$$(\frac{d_h^2}{d_h x^2})_{I}\;=\;<(\frac{d_h^2}{d_h x^2})_{1}\;\;(\frac{d_h^2}{d_h x^2})_{2}\;\;\ldots\;\;(\frac{d_h^2}{d_h x^2})_{n}>$$.

This representation of a linear operator differs from the matrix notation usually used. This has the advantage of allowing estimates to be generalized more easily to higher order operators and two or three dimensional domains.

In fact this linear operator is well studied and has the matrix representation

$$\begin{bmatrix} -2 & 1 & 0 & 0 & \cdots & 0 & 0 & 0 & 0 \\ 1 & -2 & 1 & 0 & \cdots & 0 & 0 & 0 & 0 \\ \vdots & \vdots & \ddots & \vdots & \cdots & \vdots & \vdots & \vdots & \vdots \\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \vdots \\ \vdots & \vdots & \vdots & \vdots & \cdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & 0 & 0 & \cdots & 0 & 1 & -2 & 1 \\ 0 & 0 & 0 & 0 & \cdots & 0 & 0 & 1 & -2 \\ \end{bmatrix}$$,

when applied to the vector $$^{T}$$.

The eigenvalues, eigenvectors, and inverse are known for this matrix, and can be found in some references. If it were just for the sake of this one introductory example the details of this matrix would be used for the analysis. As is being pointed out a method of analysis that generalizes to higher order operators and domains is being developed instead.

Finally the equations  can be written as

$$-(\frac{d_h^2}{d_h x^2})_{I}\,\vec y\,=\,\vec f$$,

where the vector $$\vec{f}\,=\,$$.

One last piece of notation, for the vector $$\vec y\;=\;$$,  the interior points of  $$\vec y$$,  denoted by  $$\vec y^{\,o}$$,  is the  $$n$$  dimensional vector

$$\vec y^{\,o}\;=\;$$.

Restating the problem, it will be shown that there exist unique

$$\vec y\;=\;$$  with   $$y_0\,=\,y_{n+1}\,=\,0$$

that solve the equation 

$$-(\frac{d_h^2}{d_h x^2})_{I}\,\vec y\,=\,\vec f$$,

In addition, and most importantly, the $$y_i$$  approximate  $$y(x)$$  in the sense

$$\sqrt{\textstyle\sum_{i\,=\,1}^{\,n}\left\vert\,y(x_i)-y_i\,\right\vert^2\;}\;\le\;\sqrt n\,B\,h^2$$

where the bound $$B$$  is independent of  $$h$$  and if fact a good estimate of  $$B$$  is

$$B\;=\;M\,(\alpha_n)^{-1}\,h^2$$

where  $$M\;=\;\tfrac{1}{12}\;\underset{a\;\le\;x\;\le\;b}{\max}(f^{(iv)}(x))$$,

$$\alpha_n\;=\;2\,(1-\cos(\pi\,\tfrac{1}{n+2}))\;\to\;\frac{\pi^2}{(n+2)^2}$$,

and  $$B\;\to\;\frac{M}{\pi^2}$$.

The remainder of this section is a proof of the claim  immediately above.

The proof is done by first showing that the operator  $$-(\frac{d_h^2}{d_h x^2})_{I}$$   is positive definite.

In particular for $$\alpha_n\;=\;2\,(1-\cos(\pi\,\tfrac{1}{n+2}))\;\to\;\frac{\pi^2}{(n+2)^2}$$

$$-(\vec y^{\,o})^{T}(\frac{d_h^2}{d_h x^2})_{I}\,\vec y\;\ge\;\alpha_n\,h^{-2}\,\lVert \,\vec y^{\,o}\, \rVert_2^2$$.

To prove what is said immediately above

$$\begin{align} -h^2(\vec y^{\,o})^{T}(\frac{d_h^2}{d_h x^2})_{I}\,\vec y\;= & \;\textstyle\sum_{i\,=\,1}^{\,n}y_i(-y_{i-1}+2\,y_i-y_{i+1}) \\ \;= & \;-\textstyle\sum_{i\,=\,1}^{\,n}y_i((y_{i+1}-y_i)-(y_i-y_{i-1})) \end{align}$$.

Rearrange summation by parts  

$$ \sum_{i = 1}^m w_i\,(v_i - v_{i-1}) = w_m\,v_m - w_0\,v_0 - \sum_{i = 0}^{m-1} v_i\,(w_{i+1} - w_i) $$

as

$$ - \sum_{i = 0}^{m-1} v_i\,(w_{i+1} - w_i)\;=\;-w_m\,v_m + w_0\,v_0\;+\sum_{i = 1}^m w_i\,(v_i - v_{i-1}) $$

Now, let $$m\;=\;n+1$$  to get

$$ - \sum_{i = 0}^{\,n} v_i\,(w_{i+1} - w_i)\;=\;-w_{n+1}\,v_{n+1} + w_0\,v_0\;+\sum_{i = 1}^{\,n+1} w_i\,(v_i - v_{i-1}) $$

Set  $$v_i\;=\;y_i$$   for   $$i\;=\;0,\;1,\;\ldots ,\;n+1$$.

Set  $$w_0\;=\;y_0$$   and   $$w_i\;=\;y_i-y_{i-1}$$   for   $$i\;=\;1,\;2,\;\ldots ,\;n+1$$.

Since  $$v_0\;=\;v_{n+1}\;=\;0$$,   the identity becomes

$$ - \sum_{i = 1}^{\,n} v_i\,(w_{i+1} - w_i)\;=\;\sum_{i = 1}^{\,n+1} w_i\,(v_i - v_{i-1}) $$,

which is then in turn

$$ - \sum_{i = 1}^{\,n} y_i\,((y_{i+1}-y_i) - (y_i-y_{i-1}))\;=\;\sum_{i = 1}^{\,n+1} (y_i - y_{i-1})(y_i - y_{i-1}) $$.

This has proven the equality

$$ -h^2(\vec y^{\,o})^{T}(\frac{d_h^2}{d_h x^2})_{I}\,\vec y\;=\;\sum_{i = 1}^{\,n+1} (y_i - y_{i-1})^2 $$.

Making use of 

If $$v_0\,=\,v_{n+1}\,=\,0$$  then

$$\sqrt{\textstyle\sum_{\,i\,=\,1}^{\,n+1}(v_i-v_{i-1})^2}\ge\,\sqrt{2\,(1-\cos(\pi\,\tfrac{1}{n+2}))}\,\sqrt{\textstyle\sum_{\,i\,=\,1}^{\,n}\,v_i^2} $$

and

$$\sqrt{2\,(1-\cos(\pi\,\tfrac{1}{n+2}))}\;\to\;\frac{\pi}{n+2}$$.

We have the following

$$\textstyle\sum_{\,i\,=\,1}^{\,n+1}(y_i-y_{i-1})^2\;\ge\;2\,(1-\cos(\pi\,\tfrac{1}{n+2}))\,\textstyle\sum_{\,i\,=\,1}^{\,n}\,y_i^2 $$,

where  $$2\,(1-\cos(\pi\,\tfrac{1}{n+2}))\;\to\;\frac{\pi^2}{(n+2)^2}$$.

This finishes the proof of the claim .

Since the operator is linear and positive definite,   $$\vec y$$,   the solution to , exists and is unique.

The next part is to observe

$$ -(\vec y^{\,o})^{T}(\frac{d_h^2}{d_h x^2})_{I}\,\vec y\;=\;(\vec y^{\,o})^{T}\vec f\;\le\;\sqrt{(\vec y^{\,o})^{T}\vec y^{\,o}\;}\sqrt{(\vec f)^{T}\vec f\;} $$.

and putting this together with     $$-(\vec y^{\,o})^{T}(\frac{d_h^2}{d_h x^2})_{I}\,\vec y\;\ge\;\alpha_n\,h^{-2}\lVert \,\vec y^{\,o}\, \rVert^2$$

$$\alpha_n\,h^{-2}(\vec y^{\,o})^{T}\vec y^{\,o}\;\le\;\sqrt{(\vec y^{\,o})^{T}\vec y^{\,o}\;}\sqrt{(\vec f)^{T}\vec f\;}$$

and

$$\sqrt{(\vec y^{\,o})^{T}\vec y^{\,o}\;}\;\le\;(\alpha_n)^{-1}h^2\,\sqrt{(\vec f)^{T}\vec f\;}$$.

The notation

$$\vec y(x)\;=\;$$

will be used for the exact values of $$y(x)$$,  as well as the notation

$$\vec y^{\,o}(x)\;=\;$$

for the interior points of $$\vec y(x)$$.

The vector $$(\vec y(x)-\vec y\,)$$  satisfies the problem

$$-(\frac{d_h^2}{d_h x^2})_{I}\,(\vec y(x)-\vec y\,)\,=\,(\frac{d_h^2}{d_h x^2})_{I}\,\vec y(x)-\vec f$$,

with $$(y(a)-y_0)\;=\;(y(b)-y_{n+1})\;=\;0$$.

So the estimate  can be applied to get

$$\sqrt{(\vec y^{\,o}(x)-\vec y^{\,o})^{T}(\vec y^{\,o}(x)-\vec y^{\,o})\;}\;\le\;(\alpha_n)^{-1}h^2\,\sqrt{((\frac{d_h^2}{d_h x^2})_{I}\,\vec y(x)-\vec f\; )^{T}((\frac{d_h^2}{d_h x^2})_{I}\,\vec y(x)-\vec f\;)\;}$$.

Recall 

$$ \frac{d_h^2}{d_h x^2}\,f(x)\;=\;f^{\prime\prime}(x)+(\tfrac{1}{24}\,f^{(iv)}(z_{h})+\tfrac{1}{24}\,f^{(iv)}(z_{-h}))\,h^2 $$,

where $$x-h\;<\;z_{-h}\;<\;x$$  and  $$x\;<\;z_{h}\;<\;x+h$$.

Now,

$$(\frac{d_h^2}{d_h x^2})_{I}\,\vec y(x)\;=\;<\frac{d_h^2}{d_h x^2}\,y(x_1)\;\;\frac{d_h^2}{d_h x^2}\,y(x_2)\;\;\ldots\;\;\frac{d_h^2}{d_h x^2}\,y(x_n)>$$

and

$$\vec f\;=\;$$.

So each component of   $$((\frac{d_h^2}{d_h x^2})_{I}\,\vec y(x)-\vec f\;)$$    has the form

$$ (\tfrac{1}{24}\,f^{(iv)}(z_{h})+\tfrac{1}{24}\,f^{(iv)}(z_{-h}))\,h^2 $$.

This leads to the estimate

$$\sqrt{((\frac{d_h^2}{d_h x^2})_{I}\,\vec y(x)-\vec f\; )^{T}((\frac{d_h^2}{d_h x^2})_{I}\,\vec y(x)-\vec f\;)\;}\;\le\;\sqrt n\,M\,h^2$$,

where

$$M\;=\;\tfrac{1}{12}\;\underset{a\;\le\;x\;\le\;b}{\max}(f^{(iv)}(x))$$.

After combining the inequalities ' and '

$$\lVert \,\vec y^{\,o}(x)-\vec y^{\,o}\, \rVert_2\;\le\;\sqrt n\,M\,(\alpha_n)^{-1}\,h^4$$.

Generalities about Difference Solutions
Before moving on to describe the effect of using a higher order finite difference operator, it is useful to study some generalities about the solutions of linear equations. This provides the needed motivation to the design of methods and proofs.

Suppose $$L$$  is a linear operator that is positive definite, which means to say there exists a constant  $$\alpha\;>\;0$$,  not depending on  $$\vec x$$  such that

$$\vec x^{\,T}L\,\vec x\;\ge\;\alpha\,\vec x^{\,T}\vec x$$.

Then as was explained for matrices at 

$$\lVert \,L^{-1}\, \rVert_2\;\le\;(\alpha)^{-1}$$.

Now, if the exact solution $$\vec y(x)$$  to some problem is given by

$$L\,\vec y(x)\;=\;\vec f(x)$$

except that $$\vec f(x)$$  is only known up to some degree of approximation by  $$\vec f$$,  then the solution  $$\vec y$$  to the equation

$$L\,\vec y\;=\;\vec f$$,

is an approximation to the desired exact solution $$\vec y(x)$$. Since

$$L\,(\vec y(x)-\vec y)\;=\;(\vec f(x)-\vec f\,)$$,

the closeness of the approximation can be estimated with

$$\lVert \,(\vec y(x)-\vec y)\, \rVert_2\;\le\;\lVert \,L^{-1}\, \rVert_2\,\lVert\,(\vec f(x)-\vec f\,)\,\rVert_2\;\le\;\,(\alpha)^{-1}\lVert\,(\vec f(x)-\vec f\,)\,\rVert_2$$.

With regards to finite difference methods the strategy will be to define a linear operator $$L_h$$  such that

$$\vec y^{\,T}L_h\,\vec y\;\ge\;\alpha\,\vec y^{\,T}\vec y$$,

with $$\alpha$$  independent of  $$h$$. Then for the exact solution $$\vec y(x)$$,  to whatever problem,

$$\lVert \,(\vec y(x)-\vec y)\, \rVert_2\;\le\;\,(\alpha)^{-1}\lVert\,(L_h\,\vec y(x)-L_h\,\vec y)\,\rVert_2$$.

When $$L_h\,\vec y(x)$$  is known to some degree of approximation by  $$\vec f$$, that is when

$$\lVert\,L_h\,\vec y(x)-\vec f\,\rVert_2\;\le\;B_h$$

then for $$\vec y$$,  the solution to  $$L_h\,\vec y\;=\;\vec f$$,

$$\lVert \,(\vec y(x)-\vec y)\, \rVert_2\;\le\;\,(\alpha)^{-1}\lVert\,(L_h\,\vec y(x)-\vec f\,)\,\rVert_2\;\le\;(\alpha)^{-1}B_h$$.

Third Order Estimation
In this section the properties of the five-point finite difference operator for the approximation to the second derivative is studied. The notations introduced in the previous sections of this chapter will be reused. The notations  $$\vec y$$   and   $$\vec y^{\,o}$$   will have the same meaning as in the section Solution by Finite Differences. The notations

$$(\frac{d_h^2}{d_h x^2})_{i}$$  and   $$(\frac{d_h^2}{d_h x^2})_{I}$$

are redefined to represent the five-point operator.

$$-h^2({\partial_h^2\over\partial_h x^2})_{1}\ y\ =$$. $$\frac{1}{12}\,y_{4}-\frac{1}{3}\,y_{3} -\frac{1}{2}\,y_{2}+\frac{5}{3}\,y_{1} -\frac{11}{12}\,y_{0}$$

$$-h^2({\partial_h^2\over\partial_h x^2})_{i}\ y\ =$$. $$\frac{1}{12}\,y_{i+2}-\frac{4}{3}\,y_{i+1} +\frac{5}{2}\,y_{i}-\frac{4}{3}\,y_{i-1} +\frac{1}{12}\,y_{i-2}$$

$$\text{for}\ i\,=\,2,\ 3,\ \ldots\, n-1 \quad \text{and}$$

$$-h^2({\partial_h^2\over\partial_h x^2})_{n}\ y\ =$$. $$-\frac{11}{12}\,y_{n+1}+\frac{5}{3}\,y_{n} -\frac{1}{2}\,y_{n-1}-\frac{1}{3}\,y_{n-2} +\frac{1}{12}\,y_{n-3}$$

The five-point operator for the second derivative is third-order accurate at the ponts nearest the endpoints of the interval and being a centered difference operator, is fourth-order accurate for the more internal points.

The expressions for  $$(\frac{d_h^2}{d_h x^2})_{i}$$  are rearranged to make the summation procedure to be performed easier to follow. These identities are verified simply by comparing coefficients.

$$-h^2({\partial_h^2\over\partial_h x^2})_{1}\ y\;=\;\frac{7}{6}(-y_{2}+2\,y_{1}-y_{0})$$

$$\begin{align} +\; & (\frac{1}{12}\,(y_{4}-y_{3})-\frac{1}{3}\,(y_{3}-y_{2}) +\frac{5}{12}\,(y_{2}-y_{1}) -\frac{1}{6}\,(y_{1}-y_{0})) \\ \end{align}$$

$$-\frac{1}{12}\,(-y_{2}+2\,y_{1}-y_{0})$$

$$-\frac{1}{12}\,(-y_{3}+2\,y_{2}-y_{1})$$

$$-h^2({\partial_h^2\over\partial_h x^2})_{i}\ y\;=\;\frac{7}{6}\,(-y_{i+1}+2\,y_{i}-y_{i-1})$$

$$-\frac{1}{12}\,(-y_{i+2}+2\,y_{i+1}-y_{i})$$

$$-\frac{1}{12}\,(-y_{i}+2\,y_{i-1}-y_{i-2})$$

$$\text{for}\ i\,=\,2,\ 3,\ \ldots\, n-1 \quad \text{and}$$

$$-h^2({\partial_h^2\over\partial_h x^2})_{n}\ y\;=\;\frac{7}{6}(-y_{n+1}+2\,y_{n}-y_{n-1})$$

$$\begin{align} +\; & (-\frac{1}{12}\,(y_{n-2}-y_{n-3})+\frac{1}{3}\,(y_{n-1}-y_{n-2}) -\frac{5}{12}\,(y_{n}-y_{n-1}) +\frac{1}{6}\,(y_{n+1}-y_{n})) \\ \end{align}$$

$$-\frac{1}{12}\,(-y_{n}+2\,y_{n-1}-y_{n-2})$$

$$-\frac{1}{12}\,(-y_{n+1}+2\,y_{n}-y_{n-1})$$

The intent of this section is to establish the inequality.

$$-h^2(\vec y^{\,o})^{T}({\partial_h^2\over\partial_h x^2})_{I}\;\vec y\; \ge\;\frac{2}{3}\,{\textstyle\sum_{\,i\,=\,1}^{\,n+1}}\,(y_{i}-y_{i-1})^2$$.

This is the most technically difficult part of making estimates as to the accuracy of finite difference approximations. The remainder of the analysis follows by applying the reasoning described in the section Generalities about Difference Solutions. The estimates of the accuracy to which five-point finite differences estimate the second derivative of a function are easier and will be covered in a separate section.

Take into account that $$y_0\,=\,0$$. So $$y_1\,=\,(y_1-y_0)$$  and then

$$-h^2y_1\,({\partial_h^2\over\partial_h x^2})_{1}\vec y\;=\frac{7}{6}\,y_1(-y_{2}+2\,y_{1}-y_{0})$$

$$\begin{align} +\; & y_1(\frac{1}{12}\,(y_{4}-y_{3})-\frac{1}{3}\,(y_{3}-y_{2}) +\frac{5}{12}\,(y_{2}-y_{1}) -\frac{1}{6}\,(y_{1}-y_{0})) \\ \end{align}$$

$$-\frac{1}{12}\,y_1(-y_{2}+2\,y_{1}-y_{0})-\frac{1}{12}\,y_1(-y_{3}+2\,y_{2}-y_{1})$$

$$=\frac{7}{6}\,y_1(-y_{2}+2\,y_{1}-y_{0})$$

$$-\frac{1}{12}\,y_1(-y_{2}+2\,y_{1}-y_{0})-\frac{1}{12}\,y_2(-y_{3}+2\,y_{2}-y_{1})$$

$$+\frac{1}{12}\,(y_2-y_1)^2+\frac{1}{6}\,(y_1-y_0)^2$$

$$-\frac{1}{12}\,(y_3-y_2)(y_2-y_1)+\frac{1}{12}\,(y_2-y_1)(y_1-y_0)$$

$$\begin{align} +\; & (\frac{1}{12}\,(y_{4}-y_{3})-\frac{1}{3}\,(y_{3}-y_{2}) +\frac{1}{3}\,(y_{2}-y_{1}) -\frac{1}{3}\,(y_{1}-y_{0}))(y_1-y_0) \\ \end{align}$$

$$-h^2y_i\,({\partial_h^2\over\partial_h x^2})_{i}\,\vec y\;=\frac{7}{6}\,y_i\,(-y_{i+1}+2\,y_{i}-y_{i-1})$$

$$-\frac{1}{12}\,y_i\,(-y_{i+2}+2\,y_{i+1}-y_{i})-\frac{1}{12}\,y_i\,(-y_{i}+2\,y_{i-1}-y_{i-2})$$

$$=\frac{7}{6}\,y_i\,(-y_{i+1}+2\,y_{i}-y_{i-1})$$

$$-\frac{1}{12}\,y_{i+1}\,(-y_{i+2}+2\,y_{i+1}-y_{i})-\frac{1}{12}\,y_{i-1}\,(-y_{i}+2\,y_{i-1}-y_{i-2})$$

$$+\frac{1}{12}\,(y_{i+1}-y_i)^2\,+\frac{1}{12}\,(y_i-y_{i-1})^2$$

$$-\frac{1}{12}\,(y_{i+2}-y_{i+1})(y_{i+1}-y_{i})\,-\,\frac{1}{12}\,(y_{i}-y_{i-1})(y_{i-1}-y_{i-2})$$

$$\text{for}\ i\,=\,2,\ 3,\ \ldots\, n-1 \quad \text{and}$$

Take into account that $$y_{n+1}\,=\,0$$. So $$y_n\,=\,-(y_{n+1}-y_n)$$  and then

$$-h^2y_n\,({\partial_h^2\over\partial_h x^2})_{n}\,\vec y\;=\frac{7}{6}\,y_n\,(-y_{n+1}+2\,y_{n}-y_{n-1})$$

$$\begin{align} +\; & y_n(-\frac{1}{12}\,(y_{n-2}-y_{n-3})+\frac{1}{3}\,(y_{n-1}-y_{n-2}) -\frac{5}{12}\,(y_{n}-y_{n-1}) +\frac{1}{6}\,(y_{n+1}-y_{n})) \\ \end{align}$$

$$-\frac{1}{12}\,y_n\,(-y_{n}+2\,y_{n-1}-y_{n-2})-\frac{1}{12}\,y_n\,(-y_{n+1}+2\,y_{n}-y_{n-1})$$

$$=\frac{7}{6}\,y_n\,(-y_{n+1}+2\,y_{n}-y_{n-1})$$

$$-\frac{1}{12}\,y_{n-1}\,(-y_{n}+2\,y_{n-1}-y_{n-2})-\frac{1}{12}\,y_n\,(-y_{n+1}+2\,y_{n}-y_{n-1})$$

$$+\frac{1}{6}\,(y_{n+1}-y_{n})^2\,+\frac{1}{12}\,(y_n-y_{n-1})^2$$

$$-\frac{1}{12}\,(y_{n}-y_{n-1})(y_{n-1}-y_{n-2})+\frac{1}{12}\,(y_{n+1}-y_{n})(y_{n}-y_{n-1})$$

$$\begin{align} +\; & (y_{n+1}-y_n)(\frac{1}{12}\,(y_{n-2}-y_{n-3})-\frac{1}{3}\,(y_{n-1}-y_{n-2}) +\frac{1}{3}\,(y_{n}-y_{n-1}) -\frac{1}{3}\,(y_{n+1}-y_{n})) \\ \end{align}$$

This organization of the terms leads to

$$-h^2(\vec y^{\,o})^{T}({\partial_h^2\over\partial_h x^2})_{I}\;\vec y\; =\;-h^2{\textstyle\sum_{\,i\,=\,1}^{\,n}}\,y_i\,({\partial_h^2\over\partial_h x^2})_{i}\;\vec y\;=$$

$${\textstyle\sum_{\,i\,=\,1}^{\,n}}\,y_i\,(-y_{i+1}+2\,y_{i}-y_{i-1})+\frac{1}{6}\,{\textstyle\sum_{\,i\,=\,1}^{\,n+1}}\,(y_{i}-y_{i-1})^2-\frac{1}{6}\,{\textstyle\sum_{\,i\,=\,2}^{\,n-1}}\,(y_{i+1}-y_{i})(y_{i}-y_{i-1})$$

$$\begin{align} +\; & (\frac{1}{12}\,(y_{4}-y_{3})-\frac{1}{3}\,(y_{3}-y_{2}) +\frac{1}{3}\,(y_{2}-y_{1}) -\frac{1}{3}\,(y_{1}-y_{0}))(y_1-y_0) \\ \end{align}$$

$$\begin{align} +\; & (y_{n+1}-y_n)(\frac{1}{12}\,(y_{n-2}-y_{n-3})-\frac{1}{3}\,(y_{n-1}-y_{n-2}) +\frac{1}{3}\,(y_{n}-y_{n-1}) -\frac{1}{3}\,(y_{n+1}-y_{n})) \\ \end{align}$$

It is known from  that the sum  $${\textstyle\sum_{\,i\,=\,1}^{\,n}}\,y_i\,(-y_{i+1}+2\,y_{i}-y_{i-1})\,=\,{\textstyle\sum_{\,i\,=\,1}^{\,n+1}}\,(y_{i}-y_{i-1})^2$$. Using this and moving the first and last terms of the second sum

$$-h^2(\vec y^{\,o})^{T}({\partial_h^2\over\partial_h x^2})_{I}\;\vec y\; =$$

$${\textstyle\sum_{\,i\,=\,1}^{\,n+1}}\,(y_{i}-y_{i-1})^2+\frac{1}{6}\,{\textstyle\sum_{\,i\,=\,2}^{\,n}}\,(y_{i}-y_{i-1})^2-\frac{1}{6}\,{\textstyle\sum_{\,i\,=\,2}^{\,n-1}}\,(y_{i+1}-y_{i})(y_{i}-y_{i-1})$$

$$\begin{align} +\; & (\frac{1}{12}\,(y_{4}-y_{3})-\frac{1}{3}\,(y_{3}-y_{2}) +\frac{1}{3}\,(y_{2}-y_{1}) -\frac{1}{6}\,(y_{1}-y_{0}))(y_1-y_0) \\ \end{align}$$

$$\begin{align} +\; & (y_{n+1}-y_n)(\frac{1}{12}\,(y_{n-2}-y_{n-3})-\frac{1}{3}\,(y_{n-1}-y_{n-2}) +\frac{1}{3}\,(y_{n}-y_{n-1}) -\frac{1}{6}\,(y_{n+1}-y_{n})) \\ \end{align}$$

Using 

$$\left\vert \,{\textstyle\sum_{\,i\,=\,3}^{\,n-2}}\,(y_{i+1}-y_{i})(y_{i}-y_{i-1})\,\right\vert\;\le\;\frac{1}{2}\,(y_{3}-y_{2})^2\,+\,{\textstyle\sum_{\,i\,=\,4}^{\,n-2}}\,(y_{i}-y_{i-1})^2\,+\,\frac{1}{2}\,(y_{n-1}-y_{n-2})^2$$,

$$\left\vert \,(y_{3}-y_{2})(y_{2}-y_{1})\,\right\vert\;\le\;\frac{1}{2}\,\alpha_1^2\,(y_{2}-y_{1})^2\,+\,\frac{1}{2}\,(y_{3}-y_{2})^2\,/\,\alpha_1^2$$,

$$\left\vert \,(y_{n}-y_{n-1})(y_{n-1}-y_{n-2})\,\right\vert\;\le\;\frac{1}{2}\,\beta_1^2\,(y_{n}-y_{n-1})^2\,+\,\frac{1}{2}\,(y_{n-1}-y_{n-2})^2\,/\,\beta_1^2$$,

the inequality next follows.

$$-h^2(\vec y^{\,o})^{T}({\partial_h^2\over\partial_h x^2})_{I}\;\vec y\; \ge\;{\textstyle\sum_{\,i\,=\,1}^{\,n+1}}\,(y_{i}-y_{i-1})^2-\frac{1}{6}\,(y_{1}-y_{0})^2-\frac{1}{6}\,(y_{n+1}-y_{n})^2$$

$$+\,\frac{1}{12}\,(1-1\,/\,\alpha_1^2)(y_{3}-y_{2})^2\,+\,\frac{1}{6}\,(1-\frac{1}{2}\,\alpha_1^2)(y_{2}-y_{1})^2$$

$$+\,\frac{1}{6}\,(1-\frac{1}{2}\,\beta_1^2)(y_{n}-y_{n-1})^2\,+\,\frac{1}{12}\,(1-1\,/\,\beta_1^2)(y_{n-1}-y_{n-2})^2$$

$$\begin{align} +\; & (\frac{1}{12}\,(y_{4}-y_{3})-\frac{1}{3}\,(y_{3}-y_{2}) +\frac{1}{3}\,(y_{2}-y_{1}) )(y_1-y_0) \\ \end{align}$$

$$\begin{align} +\; & (y_{n+1}-y_n)(\frac{1}{12}\,(y_{n-2}-y_{n-3})-\frac{1}{3}\,(y_{n-1}-y_{n-2}) +\frac{1}{3}\,(y_{n}-y_{n-1}) ) \\ \end{align}$$

Now, using 

$$\left\vert\, (\frac{1}{12}\,(y_{4}-y_{3})-\frac{1}{3}\,(y_{3}-y_{2}) +\frac{1}{3}\,(y_{2}-y_{1}))(y_1-y_0) \,\right\vert\;\le$$

$$\frac{1}{24}\,(\alpha_2^2\,(y_{4}-y_{3})^2+\frac{1}{\alpha_2^2}\,(y_{1}-y_{0})^2)+\frac{1}{6}\,(\alpha_3^2\,(y_{3}-y_{2})^2+\frac{1}{\alpha_3^2}\,(y_{1}-y_{0})^2)$$

$$\frac{1}{6}\,(\alpha_4^2\,(y_{2}-y_{1})^2+\frac{1}{\alpha_4^2}\,(y_{1}-y_{0})^2)$$.

Taking  $$\alpha_1^2\,=\,\frac{1 + \sqrt 5 }{2},\;\alpha_2^2\,=\,8,$$   and   $$\alpha_3^2\,=\,\alpha_4^2\,=\,2+\frac{3-\sqrt 5}{4}$$   yields

$$-\frac{1}{6}\,(y_{1}-y_{0})^2+\,\frac{1}{12}\,(1-1\,/\,\alpha_1^2)(y_{3}-y_{2})^2\,+\,\frac{1}{6}\,(1-\frac{1}{2}\,\alpha_1^2)(y_{2}-y_{1})^2$$

$$+(\frac{1}{12}\,(y_{4}-y_{3})-\frac{1}{3}\,(y_{3}-y_{2}) +\frac{1}{3}\,(y_{2}-y_{1}))(y_1-y_0)\;\ge$$

$$-\frac{1}{3}((y_{4}-y_{3})^2\,+\,(y_{3}-y_{2})^2\,+\,(y_{2}-y_{1})^2\,+\,(y_1-y_0)^2)$$.

In identical fashion

$$-\frac{1}{6}\,(y_{n+1}-y_{n})^2+\,\frac{1}{6}\,(1-\frac{1}{2}\,\beta_1^2)(y_{n}-y_{n-1})^2\,+\,\frac{1}{12}\,(1-1\,/\,\beta_1^2)(y_{n-1}-y_{n-2})^2$$

$$+(y_{n+1}-y_n)(\frac{1}{12}\,(y_{n-2}-y_{n-3})-\frac{1}{3}\,(y_{n-1}-y_{n-2}) +\frac{1}{3}\,(y_{n}-y_{n-1}))\;\ge$$

$$-\frac{1}{3}((y_{n+1}-y_{n})^2\,+\,(y_{n}-y_{n-1})^2\,+\,(y_{n-1}-y_{n-2})^2\,+\,(y_{n-2}-y_{n-3})^2)$$.

The sought inequality has been established.

$$-h^2(\vec y^{\,o})^{T}({\partial_h^2\over\partial_h x^2})_{I}\;\vec y\; \ge\;\frac{2}{3}\,{\textstyle\sum_{\,i\,=\,1}^{\,n+1}}\,(y_{i}-y_{i-1})^2$$.

Two-dimensional Domain
$$-h^2({\partial_h^2\over\partial_h x^2})_{1,\,j}\ e\ =$$. $$\frac{1}{12}\,e_{4,\,j}-\frac{1}{3}\,e_{3,\,j} -\frac{1}{2}\,e_{2,\,j}+\frac{5}{3}\,e_{1,\,j} -\frac{11}{12}\,e_{0,\,j}$$

$$=\frac{7}{6}(-\frac{1}{1}\,e_{2,\,j} +\frac{2}{1}\,e_{1,\,j}-\frac{1}{1}\,e_{0,\,j}) $$

$$\begin{align} +\; & (\frac{1}{12}\,(e_{4,\,j}-e_{3,\,j})-\frac{1}{4}\,(e_{3,\,j}-e_{2,\,j}) +\frac{5}{12}\,(e_{2,\,j}-e_{1,\,j}) -\frac{1}{4}\,(e_{1,\,j}-e_{0,\,j})) \\ \end{align}$$

$$-h^2({\partial_h^2\over\partial_h x^2})_{i,\,j}\ e\ =$$. $$\frac{1}{12}\,e_{i+2,\,j}-\frac{4}{3}\,e_{i+1,\,j} +\frac{5}{2}\,e_{i,\,j}-\frac{4}{3}\,e_{i-1,\,j} +\frac{1}{12}\,e_{i-2,\,j}$$

$$=\frac{7}{6}\,(-\frac{1}{1}\,e_{i+1,\,j} +\frac{2}{1}\,e_{i,\,j}-\frac{1}{1}\,e_{i-1,\,j}) $$

$$+\frac{1}{12}\,(e_{i+2,\,j}-e_{i+1,\,j}) -\frac{1}{12}\,(e_{i+1,\,j} -e_{i,\,j})$$

$$+\frac{1}{12}\,(e_{i,\,j}-e_{i-1,\,j}) -\frac{1}{12}\,(e_{i-1,\,j} -e_{i-2,\,j})$$

$$\text{for}\ i\,=\,2,\ 3,\ \ldots\, m-1 \quad \text{and}$$

$$-h^2({\partial_h^2\over\partial_h x^2})_{m,\,j}\ e\ =$$. $$-\frac{11}{12}\,e_{m+1,\,j}+\frac{5}{3}\,e_{m,\,j} -\frac{1}{2}\,e_{m-1,\,j}-\frac{1}{3}\,e_{m-2,\,j} +\frac{1}{12}\,e_{m-3,\,j}$$

$$=\frac{7}{6}(-\frac{1}{1}\,e_{m+1,\,j} +\frac{2}{1}\,e_{m,\,j}-\frac{1}{1}\,e_{m-1,\,j}) $$

$$\begin{align} +\; & (-\frac{1}{12}\,(e_{m-2,\,j}-e_{m-3,\,j})+\frac{1}{4}\,(e_{m-1,\,j}-e_{m-2,\,j}) -\frac{5}{12}\,(e_{m,\,j}-e_{m-1,\,j}) +\frac{1}{4}\,(e_{m+1,\,j}-e_{m,\,j})) \\ \end{align}$$

Discrete Laplacian
To approximate u(x, y) numerically, use the grid

$$(x_i, y_j),\ 0 \le i \le m+1,\ 0 \le j \le n+1$$. with $$x_i = i\,h,\,y_i = j\ k$$ and $$h = a\,/\,(m+1), k = b\,/\,(n+1)$$

The second partial derivatives

$${\partial^2\over\partial x^2}\ u(x, y)$$ and $${\partial^2\over\partial y^2}\ u(x, y)$$

can be approximated on the grid by difference quotients

$$({\partial_h^2\over\partial_h x^2})\ u(x_i, y_j)$$ and $$({\partial_k^2\over\partial_k y^2})\ u(x_i, y_j)$$.

These difference quotients can be chosen by the number of points or the order of accuracy. In either case they will be the same as explained in the section on difference quotients in the chapter Definitions and Basics. The possibilities arising from choosing difference quotients with less than the maximum order of accuracy using some other criteria such as a minimization of the size of or differences in the coefficients, relative to order, is not analyzed at this point.

Since it is cumbersome to include many indices in notations for difference operators the same expression for a difference quotient that approximates a second derivative will be reused for different order operators. The matter as to which one will be made clear when needed. Certain generalities apply to any one of them and can be discussed in this light.

The Laplacian $$\Delta u(x, y)$$  then can be approximated on the interior of the grid by

$$\Delta_{h,\,k} u(x_i, y_j) = {\partial_h^2\over\partial_h x^2}u(x_i, y_j) + {\partial_k^2\over\partial_k y^2}u(x_i, y_j)$$

$$({\partial_h^2\over\partial_h x^2})\ u(x_1, y_j)\ =$$. $${-\frac{1}{12}\,u(x_1+3\,h, y_j)+\frac{1}{3}\,u(x_1+2\,h, y_j) +\frac{1}{2}\,u(x_1+h, y_j)-\frac{5}{3}\,u(x_1, y_j) +\frac{11}{12}\,u(x_1-h, y_j)\over\ h^2}$$

$$({\partial_h^2\over\partial_h x^2})\ u(x_i, y_j)\ =$$. $${-\frac{1}{12}\,u(x_i+2\,h, y_j)+\frac{4}{3}\,u(x_i+h, y_j) -\frac{5}{2}\,u(x_i, y_j)+\frac{4}{3}\,u(x_i-h, y_j) -\frac{1}{12}\,u(x_i-2\,h, y_j)\over\ h^2}$$

$$\text{for}\ i\,=\,2,\ 3,\ \ldots\, m-1 \quad \text{and}$$

$$({\partial_h^2\over\partial_h x^2})\ u(x_m, y_j)\ =$$. $${\frac{11}{12}\,u(x_m+h, y_j)-\frac{5}{3}\,u(x_m, y_j) +\frac{1}{2}\,u(x_m-h, y_j)+\frac{1}{3}\,u(x_m-2\,h, y_j) -\frac{1}{12}\,u(x_m-3\,h, y_j)\over\ h^2}$$

The second partial derivative $${\partial^2\over\partial y^2}\ u(x, y)$$ can be approximated on the grid by difference quotients $$({\partial_k^2\over\partial_k y^2})\ u(x_i, y_j)$$. These difference quotients are given by

$$({\partial_k^2\over\partial_k y^2})\ u(x_i, y_1)\ =$$. $${-\frac{1}{12}\,u(x_i, y_1+3\,k)+\frac{1}{3}\,u(x_i, y_1+2\,k) +\frac{1}{2}\,u(x_i, y_1+k)-\frac{5}{3}\,u(x_i, y_1) +\frac{11}{12}\,u(x_i, y_1-k)\over\ k^2}$$

$$({\partial_k^2\over\partial_k y^2})\ u(x_i, y_j)\ =$$. $${-\frac{1}{12}\,u(x_i, y_j+2\,k)+\frac{4}{3}\,u(x_i, y_j+k) -\frac{5}{2}\,u(x_i, y_j)+\frac{4}{3}\,u(x_i, y_j-k) -\frac{1}{12}\,u(x_i, y_j-2\,k)\over\ k^2}$$

$$\text{for}\ j\,=\,2,\ 3,\ \ldots\, n-1 \quad \text{and}$$

$$({\partial_k^2\over\partial_k y^2})\ u(x_i, y_n)\ =$$. $${\frac{11}{12}\,u(x_i, y_n+k)-\frac{5}{3}\,u(x_i, y_n) +\frac{1}{2}\,u(x_i, y_n-k)+\frac{1}{3}\,u(x_i, y_n-2\,k) -\frac{1}{12}\,u(x_i, y_n-3\,k)\over\ k^2}$$