# Finite Differences

1. Jul 25, 2017

### Shakattack12

1. The problem statement, all variables and given/known data
The problem involves a population in a country:
year 1930 1940 1950 1960 1970
Pop 1.0 1.2 1.6 2.8 5.4
(millions)

Part A involved finding the population in 1920 using Newton Divided Differences Interpolation (SOLVED)
Part B requires finding the year when the population is 60.4 million. I went through the method below but apparently there is any easier more accurate way (not using a calculator). Please help.

2. Relevant equations
The equation for the population is:
y = 0.0001x^3 - 0.581x^2 + 1125.22x - 726412.4

3. The attempt at a solution
For part B I used Newtons formula and a divided differences table

Substitute in values using interpolation formula

x = g(y0) + (y-y0)g(y0y1) + (y-y0)(y-y1)g(y0y1y2)

Let y = 60.4
x = g(y0) + (60.4-y0)g(y0y1) + (60.4-y0)(60.4-y1)g(y0y1y2)

let y0 = 50.5125, g(y0) = 2015 …

x = 2015 + (60.4-50.5125)x0.447928331 + (60.4-50.5125)(60.4-84)x-0.001538931

x = 2019.787993
This is an approximation. The actual year is 2020.

2. Jul 25, 2017

### Staff: Mentor

Why not just write out the difference table, and extend the table to longer times?

3. Jul 25, 2017

### Ray Vickson

No, the actual year is unknown and un-knowable, although 2020 might be a useful approximation. You are extrapolating data way outside its range, so cannot be 100% sure about anything! In regression theory, there are formulas for getting "confidence intervals" for extrapolation outside the input range, but they are dependent on some statistical assumptions about the nature of the data and the model errors.

In this case an exponential formula of the form $P = a + b e^{c t}$ fits much better than any polynomial of the form $y = a + bt + ct^2$ or $y = a + bt + ct^2 + dt^3$, and also makes more sense theoretically. However, finding the optimal parameters $a,b,c$ of the exponential fit requires solving a nonlinear "least-squares" problem, so needs modern software tools. (Also: I am not sure how to get confidence intervals, etc., for nonlinear fit models, because the usual regression equations do not apply.)

4. Jul 25, 2017

### SammyS

Staff Emeritus
A difference table, as suggested by Chet, does show that the given data can be represented exactly by a cubic polynomial.

As Ray points out, as a practical matter it is dangerous to extrapolate.

5. Jul 25, 2017

### Ray Vickson

OK: maybe I should not have said "fits much better than the cubic", since one can find a cubic going exactly through all the points. However, when you extend the cubic to values below 1930 the plot starts to look ridiculous and goes negative below about 1917.

6. Jul 25, 2017

### haruspex

Quite so.
The first requirement of a mathematical model for a physical process is that it makes at least vague theoretical sense. Fitting to the data is secondary.

7. Jul 26, 2017

### Staff: Mentor

Here are the lines of the simple difference table I was referring to in post #2.

$1.0\ \ \ 1.2\ \ \ 1.6\ \ \ 2.8\ \ \ 5.4\ \ \ 10.0\ \ \ 17.2\ \ \ 27.6\ \ \ 41.8\ \ \ 60.4$
$\ \ \ \ 0.2\ \ \ 0.4\ \ \ 1.2\ \ \ 2.6\ \ \ 4.6\ \ \ \ 7.2\ \ \ \ 10.4\ \ \ 14.2\ \ \ 18.6$
$\ \ \ \ \ \ \ \ 0.2\ \ \ 0.8\ \ \ 1.4\ \ \ 2.0\ \ \ 2.6\ \ \ \ 3.2\ \ \ \ \ 3.8\ \ \ \ \ 4.4$
$\ \ \ \ \ \ \ \ \ \ \ 0.6\ \ \ \ 0.6\ \ \ 0.6\ \ \ 0.6\ \ \ \ 0.6\ \ \ \ 0.6\ \ \ \ \ 0.6$

It took me less than 5 min to do this table.