
But why? Well we can certainly check the following directly:
Linear Model If f (n) = an + b, then the sequence of first-differences is constant
f ( n + 1) − f (n) = a
Quadratic Model If f (n) = an
2
+ bn + c, then the sequence of first-differences is linear and the
second-differences are constant:
g(n) := f (n + 1) − f (n) = 2an + a + b, g(n + 1) − g(n) = 2a
The relationship between these results and the derivative(s) of the original function f (x) should feel
intuitive: what happens if you differentiate a quadratic twice?
Example 4.1. You are given the following data set
x 0 2 4 6 8 10
y 2 16 22 20 10 −8
The x-values have constant first-differences while the y-values
have constant second-differences
First-differences: 14, 6, −2, −10, −18
Second-differences: −8, −8, −8, −8
We therefore suspect a quadratic model y = f (n) = an
2
+ bn + c. Rather than using the above
formulae, particularly since the x-differences are not 1, it is easier just to substitute:
2 = y(0) = c,
(
16 = f (2) = 4a + 2b + 2
22 = f (4) = 16a + 4b + 2
=⇒
(
2a + b = 7
8a + 2b = 10
=⇒ 4a = −4
whence a = −1, b = 9 and c = 2. A quadratic model is therefore
y = f (n) = −n
2
+ 9n + c = −n
2
+ 9n + 2
It is easily verified that the remaining data values satisfy this relationship.
There are at least two issues with our method:
1. The question we’re answering is, “Find a quadratic model satisfying given data.” Constant
second-differences don’t guarantee that only a quadratic model is suitable. For example,
y = −n
2
+ 9n + 2 + 297n(n −2)(n − 4)(n − 6)(n − 8)(n −10)
is a very complicated model satisfying the same data set!
2. It is very unlikely that experimental data will fit such precise patterns (why not?). However,
if the differences are close to satisfying such patterns, then you should feel confident that a
linear/quadratic model is a good choice.
45