restart;IntroductionThese points represent UN estimates of world population in billions, measured in years since 1900.popdata:= [ [0,1.65], [10,1.75], [20,1.86], [30,2.07], [40,2.3], [50,2.52] ];To plot individual data points, we have to load in a maple package called plots.with(plots):p1:=pointplot( popdata ): display(p1);Just about the simplest realistic model for population growth is the exponential function. (Later in the course we'll see why.)P:= t -> a*exp(b*t);Through a little trial and error, we can find values of LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEiYUYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJw== and LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEiYkYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJw== that appear to make a pretty good fit to the data.fit1:= {a=1.6,b=0.009}:p2:=plot( eval(P(t),fit1), t=0..50 ): display([p1,p2]);The trouble with exponential population models, however, is that they only work well over fairly short time spans. In 1798, Thomas Malthus predicted the world would run out of food in the 19th century due to exponential population growth. How did that work out?Let's see what happens to our fit when we include the 2nd half of the twentieth century.popdata:= [ op(popdata), [60,3.02], [70,3.70], [80,4.44], [90,5.27], [100,6.06] ];p1:=pointplot( popdata ): p2:=plot( eval(P(t),fit1), t=0..100 ):
display([p1,p2]);This shows the pitfalls of making predictions based on fitting a function to data, rather than operating from some fundamental principles. (In the financial biz they say, "Past performance is no guarantee of future returns.") There is an easy graphical method for determining how well an exponential might fit given data. Notice that if we take a logarithm,ln(P(t)); simplify(%) assuming a>0 and b>0 and t>0;With LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEidEYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJw== remaining the independent variable, this is the expression for a straight line with slope equal to LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEiYkYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJw==. Hence, if we plot the ln of the data on the vertical axis with time on the horizontal, the points need to be near a straight line to get a good fit. It wouldn't be too bad to manually take the ln of each value, but here is a snazzy automatic way to do it.logpopdata:= map( pt->[pt[1],ln(pt[2])], popdata );lp1:= pointplot(logpopdata): lp2:= plot( eval(ln(P(t)),fit1), t=0..100 ):
display([lp1,lp2]);From the plot it seems clear that while we might be able to fit the data from 1900-1950, and separately fit the data 1950-2000, no exponential is a good fit to the whole century.Laboratory exercises1.Find an exponential fit fit2 to the world population data above, using 1950-2000 only. (It's easiest to obtain your subset of the data by copying and pasting from above. Note that you can copy output as well as input.) Make a plot showing the data superimposed with both fit1 from above and your own fit. 2.Malthus based his predictions in part on estimates of the European-derived population of the American colonies, given here asusdata:= [[0,5],[20,11.2],[40,21.0],[50,25.1],[70,46.6],[90,90.6],[100,117],[120,215],[130,278],[140,393]]:Here time is in years since 1650, and the population figures are in tens of thousands. The last entry is from the first official US census. Make a plot using logarithms to show that Malthus was rather justified in using an exponential fit with this data.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn