This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Differences

Differences[list]
gives the successive differences of elements in list.
Differences
gives the n^(th) differences of list.
Differences
gives the successive ^(th) differences at level k in a nested list.
First differences:
Second differences:
First differences:
In[1]:=
Click for copyable input
Out[1]=
 
Second differences:
In[1]:=
Click for copyable input
Out[1]=
Differences of rows, within each column:
Differences of columns, within each row:
Deduce the degree of a sequence by seeing when successive differences become constant:
Finite difference approximation to the Laplacian of a Gaussian:
First differences are constant for a linear function:
Second differences are constant for a quadratic function:
Successive differences are progressively shorter:
FoldList acts as an inverse of Differences:
Successive differences mod 2 of a sequence based on the primes:
Pascal-triangle-like pattern:
New in 6