An archived instance of discourse for discussion in undergraduate Real and Numerical Analysis.

Some problems from chapter 5

mark

Problems 1-5 from chapter 5 (page 68, in fact) might make reasonable exam type problems. They all concern the computation of interpolating polynomials of related data sets and the Lagrange form versus the Newton form. They look something like so:

  1. Find the Lagrange Polynomials for the nodes $\{-1,1\}$.

  2. Find the Lagrange Polynomials for the nodes $\{-1,1,5\}$.

  3. Find the Lagrange form of the polynomial of degree no greater than 2 that interpolates
    \[
    \begin{array}{c||c|c|c}
    x & -1 & 1 & 5\\
    \hline
    y & 3 & 3 & -2\\
    \end{array}
    \]






  4. Find the Newton form of the same polynomial interpolant.

  5. Find the polynomial of degree no greater than 3 that interpolates
    \[
    \begin{array}{c||c|c|c|c}
    x & -1 & 1 & 5 & -3\\
    \hline
    y & 3 & 3 & -2 & 4\\
    \end{array}
    \]
    Hint: Reuse the Newton form of the polynomial from the previous question.







  6. Put the previous polynomial in nested form.

Note: The text suggested that you use divided differences to compute the Newton forms. That's fine by me but I'm not sure it's necessary. I'm not sure how much of a pain problem 5 will be without it.

Cheryl

So here is my attempt at $#3$, $$l_i(x)=\bigg( \frac{x-x_0}{x_i-x_0}\bigg) \bigg( \frac{x-x_1}{x_i-x_1}\bigg)...\bigg(\frac{x-x_n}{x_i-x_n}\bigg)$$
$$l_0(x)=\bigg(\frac{(x-1)(x-5)}{(1-1)(-1-5)}\bigg)=\frac{1}{12}(x-1)(x-5)$$
$$l_1(x)=\bigg(\frac{(x+1)(x-5)}{(1+1)(1-5)}\bigg)=\frac{-1}{8}(x+1)(x-5)$$
$$l_2(x)=\bigg(\frac{(x+1)(x-1)}{(5+1)(5-1)}\bigg)=\frac{1}{24}(x+1)(x-1)$$
so the Lagrange form polynomial is $$p_n(x_j)=\sum_{i=0}^n l_i(x_j)f(x_i)$$
$$=3(\frac{1}{12})(x-1)(x-5)+3(\frac{-1}{8})(x+1)(x-5)+(-2)(\frac{1}{24})(x+1)(x-1)$$
$$=\frac{1}{4}(x-1)(x-5)-\frac{3}{8}(x+1)(x-5)-\frac{1}{12}(x+1)(x-1)$$





Cheryl

For $#4$ here is what I came up with:
$$p_0(x)=3$$
$$p_1(x)=3+c(x+1)$$
we want $$3=p_1(1)=3+c(2);\hspace{2cm} c=0$$
$$p_2(x)=3+0(x+1)+c(x+1)(x-1)$$
$$ -2=p_2(5)=3+c(6)(4);\hspace{2cm} c=\frac{-5}{24}$$
$$p_2(x)=3-\frac{5}{24}(x+1)(x-1)$$





mark

@Cheryl I haven't double checked but I think your ideas looks sound here. Of course, it's easy to check - just plug the $x$-values in and see if you get the correct $y$-values.

Cheryl

For $#5$ here's what I got,
$$p_0(x)=3$$
$$p_1(x)=3+c(x+1)$$
we want to get $3=p_1(1)=3+c(2); \hspace{2 mm} c=0$
$$p_2(x)=3+0(x+1)+c(x+1)(x-1)$$
$$-2=p_2(5)=3+c(6)(4); \hspace{2 mm} c=\frac{-5}{24}$$
$$p_3(x)=3-\frac{5}{24}(x+1)(x-1)+c(x+1)(x-1)(x-5)$$
$$4=p_3(-3)=3-\frac{5}{24}(-2)(-4)+c(-2)(-4)(-8); \hspace{2 mm} c=\frac{-1}{24}$$
$$p_3(x)=3-\frac{5}{24}(x+1)(x-1)-\frac{1}{24}(x+1)(x-1)(x-5)$$







Cheryl

...so would $#6$ be this:
$$p_3(x)=3-\frac{5}{24}(x+1)(x-1)-\frac{1}{24}(x+1)(x-1)(x-5)$$
$$=3+(x-1)(\frac{-5}{24}(x+1)-\frac{1}{24}(x+1)(x-5))$$
$$=3+(x-1)(x+1)(\frac{-5}{24}-\frac{1}{24}(x-5))$$


Shia

For $#1$ would our Lagrange polynomials just be:
$$l_0(x)=\frac{x-1}{-1-1}=\frac{1-x}{2}$$ and $$l_1(x)=\frac{x+1}{1+1}=\frac{x+1}{2}?$$