diff --git a/hw4/hw4.pdf b/hw4/hw4.pdf index 4bc5941..6c6585c 100644 Binary files a/hw4/hw4.pdf and b/hw4/hw4.pdf differ diff --git a/hw4/hw4.tex b/hw4/hw4.tex index fdca43e..48eb38f 100644 --- a/hw4/hw4.tex +++ b/hw4/hw4.tex @@ -51,4 +51,28 @@ $$\max_{x \in [-1,1]} |f(x) - p(x)| \leq \frac{\max_{x \in [-1,1]} |f^{(n+1)}|}{ The statement above is true so p satisfies the error estimate: $$\max_{x \in [-1,1]} |f(x) - p(x)| \leq 8$$ + +\section*{Question 2} + +We first use the Lagrange method: + +$$L_1(x) = \prod_{j = 0, j \neq 1}^2 \frac{x - x_j}{x_i - x_j} = +\frac{x-0}{1-0} \frac{x-3}{1-3} = -\frac{1}{2}x^2 + \frac{3}{2}x$$ + +$$L_2(x) = \prod_{j = 0, j \neq 2}^2 \frac{x - x_j}{x_i - x_j} = +\frac{x-0}{3-0} \frac{x-1}{3-1} = \frac{1}{6}x^2 - \frac{1}{6}x $$ + +$$p(x) = (-3) \cdot \left(-\frac{1}{2}x^2 + \frac{3}{2}x\right) + +1 \cdot \left(\frac{1}{6}x^2 - \frac{1}{6}x\right) = +\frac{5}{3}x^2 - \frac{14}{3}x$$ + +Then we use the Newtonian method: + +$$a_0 = f[0] = 0, \hspace{2cm} f[1] = -3 \hspace{2cm} f[3] = 1$$ +$$a_1 = f[0,1] = \frac{-3-0}{1-0} = -3, \hspace{2cm} f[1,3] = \frac{1-(-3)}{3-1} = 2 $$ +$$a_2 = f[0,1,3] = \frac{2-(-3)}{3-0} = \frac{5}{3}$$ + +$$p(x) = \left(\frac{5}{3}(x-1)-3\right) x + 0 = \frac{5}{3}x^2 - \frac{14}{3}x$$ + +The interpolating polynomials are indeed equal. \end{document}