Method of Differences - Brilliant Math & Science Wiki
Method of Differences - Brilliant Math & Science Wiki
Method of Differences
The method of finite differences gives us a way to calculate a polynomial using its values at several consecutive points. T
often a good approach to finding the general term in a pattern, if we suspect that it follows a polynomial form.
Contents
Difference Table
Proof of Theorem
Applications
Additional Problems
Difference Table
Suppose we are given several consecutive integer points at which a polynomial is evaluated. What information does this
about the polynomial? To answer this question, we create the following table, known as the difference table:
3
⋮
In the first column, we fill out the points at which the polynomial is evaluated (which I will assume is 1, 2, 3 …).
In the second column, we fill out the corresponding values of the polynomial at those points.
In the third column, we calculate the difference between two entries in the previous column. This is known as the first
difference and is given by D1 (n) = f (n + 1) − f (n).
In the fourth column, we calculate the difference between two entries in the previous column. This is known as the sec
difference and is given by D2 (n) = D1 (n + 1) − D1 (n).
We continue building out subsequent columns of the table in this way, with Dk+1 (n) = Dk (n + 1) − Dk (n).
n f (n) D1 (n)
D2 (n)
D3 (n) …
1 4 −1 2 0
2 3 1 2 0
3
4
3
2
4 7 5
5 12
⋮
Note that since we are not given f (6), we are unable to calculate D1 (5), D2 (4), D3 (3) or D4 (2). Now, there isn't (yet)
reason why this table would ever end; if we are given infinitely many values, we can always calculate the differences of te
However, here is an interesting fact.
THEOREM
In the above example, we see that D2 (1) = D2 (2) = D2 (3) = 2. Since f (x) is a quadratic polynomial, the above fact
that D2 (n) = 2 for all n, and this allows us to fill in other entries in the table. We get that D2 (4) = 2 so D1 (5) = 7 and
f (6) = 19. These values are previously unknown to us, but the difference table allows us to calculate them without know
polynomial f (x)!
n f (n) D1 (n)
D2 (n)
D3 (n) …
1 4 −1 2 0
2 3 1 2 0
3 4 3 2 0
4
7
5
2
0
5 12 7 2 0
6 19 9 2 0
⋮
EXAMPLE
If f (x) is a quadratic polynomial that satisfies f (1) = 3, f (2) = 9, f (3) = 19, what is f (4)?
We construct the difference table using the initial data, and obtain
n f (n) D1 (n)
D2 (n)
1 3 6 4
2 9 10
3 19
4
From the above theorem, we know that D2 (n) is a constant, and thus is equal to 4. This allows us to complete the table
follows:
n f (n) D1 (n)
D2 (n)
1 3 6 4
2 9 10 4
3 19 14 4
4 33 18 4
EXAMPLE
what is g(5)?
We construct the difference table, using the initial data. Note that it doesn't matter what number we start with, as long
the difference is 1.
n g(n) D1 (n)
D2 (n)
D3 (n)
0 0 3 −4 4
1
3
−1 0
2 2 −1
3 1
From the above, we know that D3 (n) is a constant, and thus it is equal to 4. This allows us to complete the table as foll
Note that we want to calculate g(5) and thus need to extend the table by more rows.
n g(n) D1 (n)
D2 (n)
D3 (n)
0 0 3 −4 4
1 3 −1 0 4
2
2
−1 4
4
3 1 3 8 4
4 4 11 12 4
5 15 23 16 4
EXAMPLE
Construct the difference table for the function fk (n) = (n − 1) × (n − 2) × ⋯ × (n − k) for n = 1 to k + 1. Note that fk (n) is a polynomial of degree k
f (i) = {
0 i = 1 to k
i = k + 1.
k!
D1 (i) = {
0 i = 1 to k − 1
i = k.
k!
Dj (i) = {
0 i = 1 to k − j
i = k − j + 1.
k!
n fk (n)
D1 (n)
D2 (n)
… Dk−1 (n)
Dk (n)
1 0 0 0 … 0 k!
2 0 0 0 … k!
3
0
0
0
…
⋮
k 0 k!
k+1 k! □
Proof of Theorem
THEOREM
PROOF
k
D1 (n) = f (n + 1) − f (n) = ∑ ai [(n + 1)i − ni ] .
i=1
implying that there are no terms of degree nk in D1 (n). Furthermore, the coefficient of nk−1 comes solely from the te
We may likewise continue by induction to consider the second difference, third difference, etc. Each time, we see that t
degree of the polynomial decreases by 1. Hence, by the time we get to the k th difference, it is a polynomial of degree 0
Since the only polynomials of degree 0 are the constants, this implies Dk (n) is a constant polynomial.
What happens to the leading coefficient at each step? We see that it gets multiplied by the degree of the (current)
polynomial. Since the degree decreases by 1 at each step, we see that it gets multiplied by k × (k − 1) × ⋯ × 2 × 1
Dk
. Hence, we have Dk = ak × k! or ak =
k! . □
If we have an entire row of the difference table, we can reconstruct the polynomial using the following theorem:
THEOREM
i=1
i!
In particular, the quadratic polynomial f in the first example satisfying f (1) = 3, f (2) = 9, f (3) = 19 is given by
f (n) = 3 + 1!6 (n − 1) +
4
2! (n
− 1)(n − 2)
= 2n2 + 1.
The cubic polynomial g in the second example satisfying g(0) = 0, g(1) = 3, g(2) = 2, g(3) = 1 is given by
g(n) = 3 + −1
0
1! (n − 1) + 2! (n − 1)(n − 2) +
4
3! (n − 1)(n − 2)(n − 3)
= 13 (2n3 − 12n2 + 19n).
PROOF
As worked out in the above example, this theorem is true for the special case of the polynomial fk (n). Observe that fo
2 polynomials g(n) and h(n), we clearly have Di (g + h)(n) = Di g (n) + Di h(n), and Di (αg)(n) = αDi g (n). He
the theorem is true for any polynomial that can be written as a linear combination of fk (n).
Now, given any polynomial f (n) of degree k , we will show that there are unique coefficients {αi }ki=1 such that
k
f (n) = f (1) + ∑ αi fi (n).
i=1
These coefficients can be obtained by setting n= 2 to find α1 , and then setting n = 3 to find α2 , so on and so forth.
get an identity, because both sides are polynomials of degree at most k , which agree on k + 1 values.
Applications
EXAMPLE
Notice that we are given the values at 1, 3, 5, and hence cannot apply the method of finite differences directly. Instead,
will define a new polynomial given by f (2x − 1) = g(x). With this, we get that g(1) = f (1) = 3, g(2) = f (3) =
6, g(3) = f (5) = 10.
n g(n) D1 (n)
D2 (n) D3 (n)
1 3 3 1
2 6 4
3 10
3 1 (x+1)(x+2)
Hence, we obtain g(x) =3+ 1!
(x − 1) + 2!
(x
− 1)(x − 2) = 2
. Finally, since f (2x − 1) = g(x), with th
y+1
substitution x = 2
, we get
2 2 8
EXAMPLE
Prove that there is no polynomial (of finite degree) which satisfies f (n) = 2n for all positive integers.
Construct the difference table for f (n) = 2n . Since D1 (n) = f (n + 1) − f (n) = 2n+1 − 2n = 2n = f (n), we see
D1 is exactly equal to f . This remains true for each k th difference column, which means that the k th difference column
EXAMPLE
Prove that there is no polynomial (of finite degree) which satisfies f (n) = Fn for all positive integers, where Fn is the nth Fibonacci Number.
Construct the difference table for f (n) = Fn . Since D1 (n) = f (n + 1) − f (n) = Fn+1 − Fn = Fn−1 , we see that
In particular, this shows that the k th difference column is never a constant. Hence there is no polynomial of degree k t
satisfies f (n) = Fn . □
Additional Problems
TRY IT YOURSELF
A polynomial f (x) has degree 8 and f (i) = 2i for i = Submit your answer
0, 1, 2, 3, 4, 5, 6, 7, 8.
Find f (9).
TRY IT YOURSELF
f (1) =1 12
f (2) =1
f (3) =2 8
f (4) =3
13
f (5) =5
f (6) = 8.
Determine f (7).
Note: Many people are answering this incorrectly because they think it is the Fibonacci
sequence, but this problem is asking about a quintic polynomial that passes through those
points. That does not necessarily mean the next term behaves as the Fibonacci sequence
would.
TRY IT YOURSELF
1
P (x) is a cubic polynomial, and for x = 1, 2, 3, 4, P (x) = 1+x+x2 . Submit your answer
TRY IT YOURSELF
f (6) − f (4) = 3
Given that f (x) is a quadratic polynomial satisfying the three equations above, what is the
value of f (8)?
1) Use the method of finite difference to find the general term of the following sequence:
Cite as:
Method of Differences.
Brilliant.org.
Retrieved
18:33, February 5, 2022,
from
https://brilliant.org/wiki/method-of-differences/