Computes forward differences of all orders up to n, based
on n+1 tabulated points on a regular grid.
Usage
forwdif(f)
Value
An upper triangular matrix with \(n+1\) rows and
\(n+1\) columns. The first column includes the tabulated
values of the function. The second column includes the \(n\)
forward differences of first order and a zero. The third
column includes the \(n-1\) forward differences of second
order and two zeros. And so on.
Arguments
f
A vector of real numbers. Tabulated (known) values
of the function, corresponding to a regular grid.
Details
The forward difference of first order is
$$
f(x_i+h)-f(x_i)
$$
Forward differences of higher orders follow from this one,
where the function \(f\) is replaced by the forward
difference of previous order. All values are contained in a
\((n+1)\times(n+1)\) upper triangular matrix.