# Numerical Analysis HW2 (Due 10/29)
###### tags: `Numerical Analysis`
### Q1
Let
| |$x_0$|$x_1$|$x_2$|$x_3$|
|--|---|---|---|---|
|$x$| -0.75 | -0.5 |-0.25| 0 |
|$f(x)$| -0.07181250| -0.02475000| 0.33493750|1.0101|
1. Construct the Lagrange interpolating polynimials of degree 2 with the given data
$P_{0,1,2}, P_{1,2,3}, P_{2,3,0}$
2. Construct the Lagrange interplating polynomials of degree 3 with $P_{0,1,2}$ and $P_{1,2,3}$
Neville's Method (Sec 3.2)
---
### Q2
Let
|$x$| -1.2| -0.9 |-0.6| -0.3|0|
|---|---|---|---|---|---|
|$f(x)$| 0.1823| -0.1051| -0.5103 |-1.204|-3.121|
Using Newton backward difference formula to approximate $f(-0.2)$
#### Sol
Let $h = 0.3$, $\displaystyle-0.2 = 0-\frac{2h}{3}$
$P_4(-0.2) = P_4(0-2h/3)\approx -1.6389$
---
### Q3
Let
|$x$| -2| -1 |0| 1 |2|3|
|---|---|---|---|---|--|--|
|$f(x)$| 1| 4| 11 |16|13|-4|
Show that the polynimial interpolating the following data has degree 3.
Method 1:
supposed $f(x) = ax^4+bx^3+cx^2+d$
Method 2:
Since Lagrange interpolating polynomial is a unique interpolating polynomial with given degree.
Consider the lagrange polynomial that interpolates all the given nodes.
Method 3:
Vis the table of finite difference
---
### Q4
Show that $f[x_0,x_1,x_2\cdots, x_n ,x] = \displaystyle \frac{f^{(n+1)}(\xi(x))}{(n+1)!}$ for some $\xi(x)$.
Generalized version of Thm 3.6 (P.125)
---
### Q5
Derive the error term in Theorem 3.9.
Please refer to p.110
---
### Q6
1. Write a **function** that implement the Neville's Iterated Interpolation algorithm, and verify with the following data.
|$x$| 1.0 | 1.3 |1.6| 1.9 |2.2|
|--|---|---|---|---|---|
|$f(x)$| 0.7651977| 0.6200860| 0.4554022|0.2818186|0.1103623|
[hint] You may refer to table 3.6
2. **Graph** and **construct** the cubic bazier polynomials given the following points and guide points.
(You also need to show your function code which implement the algorithm)
|points| (1,1) | (6,2) |
|--|---|---|
|guide points| (1.5,1.25)|(7,3)|