UDC 518.5
MATHEMATICS
Submitted 1970-01-01 | RussiaRxiv: ru-197001.70790 | Translated from Russian

Abstract

Full Text

UDC 518.5

MATHEMATICS

A. S. KRONROD, V. A. KRONROD, I. A. FARADZHEV

ON THE CHOICE OF STEP IN COMPUTING DERIVATIVES

(Presented by Academician I. G. Petrovskii on 24 III 1970)

1°. Let (f(x)) be a function differentiable up to order (k+2) inclusive. Let (x_0, x_1, \ldots, x_k) be points forming a grid with equal step (\Delta): (x_{p+1}=x_p+\Delta). Suppose, further, that the operator (L_{\Delta,x_0}^k[f]) is defined by the equality

[
L_{\Delta,x_0}^k[f]=\frac{(-1)^k}{\Delta^k}\sum_{s=0}^k(-1)^s C_k^s f(x_k).
\tag{1}
]

Finally, let (x=\frac12(x_0+x_k)). Then the following holds.

Theorem.

[
L_{\Delta,x_0}^k[f]=f^{(k)}(x)+\frac{k\Delta^2}{24}f^{(k+2)}(x)+o(\Delta^2).
\tag{2}
]

Proof. It is verified directly that

[
L_{\Delta,x_0}^k[f]=\frac1\Delta{L_{\Delta,x_1}^{k-1}[f]-L_{\Delta,x_0}^{k-1}[f]}.
\tag{3}
]

Observe that the operator (L_{\Delta,x_0}^k) is linear and invariant with respect to the change of variable (z=x-\frac12(x_0+x_k)). Therefore in what follows we shall denote the operator (L_{\Delta,x_0}^k), applied to (f(x)) on the grid (x_0,x_1,\ldots,x_k), where (x_0=-x_k), by (L_\Delta^k[f(x)]).

In this notation (3) is written as follows:

[
L_\Delta^k[f(x)]=\frac1\Delta\left{L_\Delta^{k-1}\left[f\left(x+\frac\Delta2\right)\right]-L_\Delta^{k-1}\left[f\left(x-\frac\Delta2\right)\right]\right}.
\tag{4}
]

We shall prove by induction that:

A. (L_\Delta^s(x^m)=0) for (m<s).

B. (L_\Delta^s(x^s)=s!) and (L_\Delta^s(x^{s+1})=0).

C. (L_\Delta^s(x^{s+2})=\dfrac{s\Delta^2}{24}(s+2)!)

For (k=1) we have:

A(^0). (L_\Delta^1(x^0)=0).

B(^0). (L_\Delta^1(x)=\dfrac1\Delta\left(\dfrac\Delta2+\dfrac\Delta2\right)=1!) and (L_\Delta^1(x^2)=\left[\dfrac1\Delta\left(\dfrac{\Delta^2}{2^2}-\dfrac{\Delta^2}{2^2}\right)\right]=0).

C(^0). (L_\Delta^1(x^3)=\dfrac1\Delta\left(\dfrac{\Delta^3}{2^3}+\dfrac{\Delta^3}{2^3}\right)=\dfrac{\Delta^2}{4}=\dfrac{1\cdot\Delta^2}{24}\cdot3!)

Let (A), (B), and (C) be true for all (s\le k). Then

[
L_\Delta^{k+1}(x^m)=\frac1\Delta\left{L_\Delta^k\left[\left(x+\frac\Delta2\right)^m\right]-L_\Delta^k\left[\left(x-\frac\Delta2\right)^m\right]\right}=
]

[
=\frac1\Delta\left{L_\Delta^k(x^m)+C_m^1\frac\Delta2L_\Delta^k(x^{m-1})+C_m^2\left(\frac\Delta2\right)^2L_\Delta^k(x^{m-2})+C_m^3\left(\frac\Delta2\right)^3L_\Delta^k(x^{m-3})+\right.
]

[
\begin{gathered}
+\,L_\Delta^k[P_{m-4}(x)]-L_\Delta^k(x^m)+C_m^1\frac{\Delta}{2}L_\Delta^k(x^{m-1})
-C_m^2\left(\frac{\Delta}{2}\right)^2L_\Delta^k(x^{m-2})+\
+\,C_m^3\left(\frac{\Delta}{2}\right)^3L_\Delta^k(x^{m-3})-L_\Delta^k[Q_{m-4}(x)]
=\frac{2}{\Delta}\left{C_m^1\frac{\Delta}{2}L_\Delta^k(x^{m-1})
+C_m^3\left(\frac{\Delta}{2}\right)^3L_\Delta^k(x^{m-3})+\right.\
\left.
+\frac{1}{2}L_\Delta^k[P_{m-4}(x)]-\frac{1}{2}L_\Delta^k[Q_{m-4}(x)]\right}.
\end{gathered}
\tag{5}
]

Here (P_{m-4}(x)) and (Q_{m-4}(x)) are polynomials of degree (m-4).

From (5) we obtain:

[
\mathrm{A}^1.\quad \text{For } m<k+1\quad L_\Delta^{k+1}(x^m)=0.
]

[
\mathrm{B}^1.\quad \text{For } m=k+1\quad
L_\Delta^{k+1}(x^{k+1})=\frac{2}{\Delta}C_{k+1}^1\frac{\Delta}{2}L_\Delta^k(x^k)=
]

[
=(k+1)k!=(k+1)!\quad \text{and for } m=k+2\quad
L_\Delta^{k+1}(x^{k+2})=\frac{2}{\Delta}C_{k+2}^1\frac{\Delta}{2}L_\Delta^k(x^{k+1})=0.
]

[
\mathrm{C}^1.\quad \text{For } m=k+3\quad
L_\Delta^{k+1}(x^{k+3})=
C_{k+3}^1L_\Delta^k(x^{k+2})+
C_{k+3}^3\left(\frac{\Delta}{2}\right)^2L_\Delta^k(x^k)=
]

[
=(k+3)\frac{k\Delta^2}{24}(k+2)!
+\frac{(k+3)(k+2)(k+1)}{6}\frac{\Delta^2}{4}k!
=\frac{k\Delta^2}{24}(k+3)!+
]

[
+\frac{\Delta^2}{24}(k+3)!
=\frac{(k+1)\Delta^2}{24}(k+3)!
]

From (\mathrm{A}^0,\mathrm{B}^0,\mathrm{C}^0) and (\mathrm{A}^1,\mathrm{B}^1,\mathrm{C}^1) there follow A, B, and C.

Since the function (f(x)) is assumed differentiable up to order ((k+2)), the assertion of the theorem is easily obtained from A, B, and C.

(2^\circ). Let the computations be performed on a machine with an (n)-digit binary mantissa. Suppose that we compute the (k)-th derivative of (f) at the point (x) by the formula

[
f^{(k)}(x)=L_{\Delta,x_0}^k[f],
\tag{6}
]

using the scheme of successive differences, i.e., applying formula (3) (k(k+1)/2) times. Then the absolute error in the right-hand side of (6) as a result of the inaccuracy of machine computation is, on average,

[
\operatorname{err}_M \simeq
\frac{k\cdot 2^{-n}|f(x)|}{\sqrt{2}\,\Delta^k}.
\tag{7}
]

On the other hand, it follows from (2) that, when computing by formula (6), we incur an absolute error

[
\operatorname{err}_B \simeq
\frac{k\Delta^2}{24}\,|f^{(k+2)}(x)|.
\tag{8}
]

Minimizing with respect to (\Delta) the sum of (7) and (8), we obtain an expression for the optimal step (\Delta_k) in the machine computation of (f^{(k)}(x)):

[
\Delta_k=
\sqrt[k+2]{\frac{2^{-n}\cdot 12\,k\,|f(x)|}{\sqrt{2}\,|f^{(k+2)}(x)|}}.
\tag{9}
]

(3^\circ). When computing a one-sided derivative (at the points (x_0,x_1,\ldots,\ldots,x_k)), we obtain an absolute error in (f^{(k)}(x_0)) of order

[
f^{(k)}\left(\frac{x_0+x_k}{2}\right)-f^{(k)}(x_0)
\simeq \frac{k\Delta}{2}f^{(k+1)}(x).
\tag{8′}
]

Hence the expression for the optimal step in computing a one-sided derivative is

[
\Delta_k^{\mathrm{one\text{-}sided}}=
\sqrt[k+1]{\frac{2^{-n}\cdot 2k\,|f(x)|}{\sqrt{2}\,|f^{(k+1)}(x)|}}.
\tag{9′}
]

4°. Numerical example. For (n=40), for (f(x)=\exp(x)) at (x=1), the quantities obtained for (\Delta_k) are

[
\Delta_1 = 0.000198,\qquad
\Delta_2 = 0.00198,\qquad
\Delta_3 = 0.00746.
]

Under the same assumptions, for the step in the case of one-sided derivatives the quantities (\Delta_k^{\mathrm{one}}) are substantially smaller, namely:

[
\Delta_1^{\mathrm{one}} = 0.00000113,\qquad
\Delta_2^{\mathrm{one}} = 0.000137,\qquad
\Delta_3^{\mathrm{one}} = 0.00140.
]

To compute the ((k+2))-nd derivative one may use, for example, the same (L_{\Delta,x_0}^{k+2}[f]). It is only necessary to ensure that, for the given step, not all correct digits disappear. If this nevertheless happens, one should increase (\Delta) when computing (L_{\Delta,x_0}^{k+2}[f]).

Central Research Institute
of Patent Information and Techno-Economic
Studies

Received
4 III 1970

Submission history

UDC 518.5