CS322 Homework #1 Due Friday, July 11, 2003

In the Beginning...

Answer all questions. Submit any pertinent hand calculations and/or Matlab code in a neat manner in order to help us give you partial credit. Readings: Van Loan 2.0-2.3, 3.0-3.3.

1) Describe briefly an example of each of the following:

a) A numerical method that is inefficient.

b) A numerical method that is inaccurate.

2) Describe briefly (a sentence or two for each) three topics that will be covered in this class. The text will be helpful here.

3) A numerical analyst’s answer to “hello world”. Let f(x) = π sin 3x + e^{−3} cos 2x on the interval [0, 3π] and n = 3. Let V_{n} and N_{n} denote the Vandermonde and Newton representations of polynomial interpolants of f, respectively.

(a) Should V_{n} be equal to N_{n} for all x ∈ [0, 3π]? (b) Why or why not? Let g be some function defined on the interval I and let p be some interpolant

of g. Denote by ae the absolute error and define ae by

ae(x) = |g(x) − p(x)| ,

where x is any point in I.

(c) Let \underline{x} = (x_{1}, x_{2}, x_{3}) = (0, \frac{3π}{2} , 3π) and y_{i} = f(x_{i}), for i = 1, 2, 3. Find ae(2π) for our f using both V_{n} and N_{n}. I worked out the following crude upper bound for f’s third derivative,

|f^{(3)}(η)| ≤ 85.168,

for some η ∈ [0, 3π], (d) are your observed ae’s smaller than our theoretical bound?

4) It’s All About Who Represents You. Recall the cubic representation given in the text:

if

q(z) = a + b(z − x_{L}) + c(z − x_{L})^{2} + d(z − x_{L})^{2}(z − x_{R}),

then

\begin{matrix}q(x_{L}) = y_{L}, & q(x_{R}) = y_{R}, \\ q′(x_{L}) = s_{L}, & q′(x_{R}) = s_{R}. \end{matrix}

Consider the following, alternative representation, that has the same conclusion:

if

q_{c}(z) = A + Bz + Cz^{2} + Dz^{3},

then

\begin{matrix}q_{c}(x_{L}) = y_{L}, & q_{c}(x_{R}) = y_{R}, \\ q′_{c}(x_{L}) = s_{L}, & q′_{c}(x_{R}) = s_{R}. \end{matrix}

(a) Write down the matrix equations that result from this alternative. (b) Find D, thereby showing that

D = \frac{(x_{L} − x_{R})(s_{L} + s_{R}) − 2(y_{L} − y_{R})}{(x_{L} − x_{R})^{3}}.

Consider how much work it took you to find D, and in at most two sentences (c) comment on the virtues of the original cubic representation. (d) Where else have we seen this virtue (in the readings and/or lecture)?