# S072 - CAS708/CES700 07 1 Assignment 2 Due In class Oct 5(Friday 1 The following figures from the Census Bureau give the population of the United

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CAS708/CES700 07. 1 Assignment 2 Due . In class Oct. 5 (Friday) 1. The following figures from the Census Bureau give the population of the United States: Year Population 1900 75,994,575 1910 91,972,266 1920 105,710,620 1930 122,775,046 1940 131,669,275 1950 150,697,361 1960 179,323,175 1970 203,235,298 • Since there are eight points, there is a unique polynomial of degree 7 which interpolates the data. However, some of the ways of representing this polynomial are computationally more satisfactory than others. Here are four possibilities, each with t ranging over the interval 1900 ≤ t ≤ 1970: 7 summationdisplay j =0 a j t j , 7 summationdisplay j =0 b j ( t- 1900) j , 7 summationdisplay j =0 c j ( t- 1935) j , 7 summationdisplay j =0 d j parenleftbigg t- 1935 35 parenrightbigg j . In each case, the coefficients are found by solving an 8-by-8 Vandermond system, but the matrices of various systems are quite different. Set up each of the four matrices, and find the estimate of its condition using Matlab function cond() . Then use Matlab operator “ \ ” to find the coefficients. Check each of the representations to see how well it reproduces the original data. • Interpolate the data by a 7th-degree polynomial, using the best conditioned representa- tion found above, and by the natural cubic spline using ncspline.m . Graph the resulting functions at one-year intervals over the period from 1900 to 1980. Find the 1980 census data. Which approach gives more accurate prediction? Solution The condition numbers: model a model b model c model d cond 1.239e+32 1.785e+13 7.891e+10 5.354e+2 CAS708/CES700 07. 2 Relative errors of the reproduced data by evaluating the polynomials using the Horner’s rule: model a model b model c model d relative error 4.0- 3 4.7e- 14 2.3e- 16 3.3e- 16 Predictions for 1980: model d spline real prediction 402.33 million 227.15 million 226.44 million 2. In the natural spline, we set σ 1 = σ n = 0. The following is an alternative way of setting σ 1 and σ n . Let c 1 ( x ) and c n ( x ) be the unique cubics which pass through the first four and the last four data points, respectively. The two end conditions match the third derivatives of s ( x ) to the third derivatives of these cubics, namely s ′′′ ( x 1 ) = c ′′′ 1 and s ′′′ ( x n ) = c ′′′ n . The constants c ′′′ 1 and c ′′′ n can be determined directly from the data without actually finding c 1 ( x ) and c n ( x ). We have already introduced the quantities Δ i = y i +1- y i x i +1- x i , which are approximations to the first derivatives. Let Δ (2) i =...
View Full Document

## This note was uploaded on 11/03/2011 for the course ENGINEERIN 708 taught by Professor Qiao during the Spring '11 term at McMaster University.

### Page1 / 7

S072 - CAS708/CES700 07 1 Assignment 2 Due In class Oct 5(Friday 1 The following figures from the Census Bureau give the population of the United

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online