What is the Lagrangian Interpolation Formula for Approximating Functions?

stvoffutt
Messages
15
Reaction score
0

Homework Statement


Consider the Lagrange Polynomial approximation p(x) =\sum_{k=0}^n f(x_k)L_k(x) where L_k(x)=\prod_{i=0,i\neq k}^n \frac{x-x_i}{x_k-x_i}
Let \psi(x)=\prod_{i=0}^n x-x_i. Show that p(x)=\psi(x) \sum_{k=0}^n\frac{f(x_k)}{(x-x_k)\psi^\prime(x)}


Homework Equations


None. Just plug in and see if it pops out.


The Attempt at a Solution


I just evaluated what p(x) = \sum_{k=0}^n f(x_k)L_k(x) and \psi^\prime(x). Writing out some terms of p(x):p(x)=f(x_0)L_0(x_0)+f(x_1)L_1(x_1)+\cdots+f(x_n)L_n(x_n)
=f(x_0)\frac{\prod_{i=0,i\neq k}^n x-x_i}{\prod_{i=0,i\neq k}^n x_o-x_i}+\cdots+f(x_n)\frac{\prod_{i=0,i\neq k}^n x-x_i}{\prod_{i=0,i\neq k}^n x_n-x_i}
I find that this is just
p(x)=\prod_{i=0,i\neq k}^nx-x_i \sum_{k=0}^n \frac{f(x_k)}{\prod_{i=0,i\neq k}^n x_k-x_i}
The product outside of the sum is just \psi(x). I then evaluate \psi^\prime(x):
\psi^\prime(x)=\prod_{i=0,i\neq k=0}^nx-x_i +\prod_{i=0,i\neq k=1}^nx-x_i +\cdots +\prod_{i=0,i\neq k=n}^nx-x_i
Evaluating this at x_k we get exactly the denominator from above. I cannot figure out where the extra x-x_k term comes from. I suspect my error is in taking the derivative but I have looked this over for many hours and cannot find my mistake.
 
Physics news on Phys.org
Wow, never mind. I feel dumb. What I pulled out of the sum is not \psi(x). You need to multiply that product by (x-x_k) for it to be \psi(x). Fun with definite products - not my strong suit.
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top