Awesome concise vid about Lagrange polynomials. I love relearning numerical methods. What are the differences between piecewise lagrange polynomials vs spline interpolating polynomials? Which is more accurate? I feel that conceptually, piecewise lagrange polynomials are the same or almost the same as spline polynomials since splines also approximate the function piecewise using lower order polynomials.
Good video. One thing you should note is that the denominator can never have 0 as a factor (Because each factor in the denominator polynomial does not have the jth node as a root), and the denominator doesn't have a free variable x so it can be treated as a constant that is never 0. Otherwise the Lagrange basis polynomials would not be holomorphic, and also wouldn't be polynomials! When the jth node for the jth polynomial is inserted, it equals 1 because the denominator polynomial (the constant term) will equal the numerator since the free variable is the jth node, but it is 0 for the free variable for all other nodes, which has similar behavior to the Kronecker delta, and has the sifting property useful in approximating the interpolating polynomial. That "sifting" property is the key here. We know that need to calculate this only at the k+1 nodes because the Fundamental Theorem of Algebra tells us that each polynomial of degree k is represented uniquely by k+1 roots, which can be worked further off of to prove uniqueness for k+1 non-zero solutions. So k+1 Lagrange basis polynomials in Lagrange are enough to interpolate a degree k polynomial. Error happens when the original polynomial is greater than degree k, or is not a polynomial. If the original polynomial is at most degree k, and all node/value pairs (or points) are distinct, then there is no error. Understanding things this way is the gateway to understanding convolution and other interpolating basis functions, such as the basis trig polynomials and the Fourier transform. I guess I'm also posting this comment to also help myself understand that I am learning this correctly too.
That looks like a mistake on my part. I used f''' becuase of n+1 and then kept the n+1 for the factorial on the bottom instead of n. Thank you for finding this.
The .4^5 was a crazy large upper bound. Consider your 5 points to be 1.0, 1.1, 1.2, 1.3, and 1.4. Then you have (x - 1.0)(x-1.1)(x-1.2)(x-1.3)(x-1.4). Now I didn't specify a value for x but I know it is somewhere in my interval between 1.0 and 1.4. I could try and figure out at exactly what point will make this product largest or just say that my error is the maximum distance of my interval each time (kind of a moving x target). And since I have 5 terms with a max distance of .4 then I know an upper bound. There are ways to find a better upper bound but this is a quick and painless way that gets a good enough estimate.
I finally figured out what I was doing wrong after I found this video. Thank you!!
Excellent, concise explanation. Thanks very much!
you could not have uploaded this at a better time!
Great video! Helped me study for my exam.
Excelent source. Best work i have ever seen. Keep up the good work!
Thanks, and it's so easy & simple!
Thanks for the video, it'll help me with my maths paper for school.
Awesome concise vid about Lagrange polynomials. I love relearning numerical methods. What are the differences between piecewise lagrange polynomials vs spline interpolating polynomials? Which is more accurate? I feel that conceptually, piecewise lagrange polynomials are the same or almost the same as spline polynomials since splines also approximate the function piecewise using lower order polynomials.
It depends. The splines will be smoother. Piecewise Lagrange can sometimes change directions at the boundaries but are easier to compute.
Great work my friend, tyvm!
Good video.
One thing you should note is that the denominator can never have 0 as a factor (Because each factor in the denominator polynomial does not have the jth node as a root), and the denominator doesn't have a free variable x so it can be treated as a constant that is never 0. Otherwise the Lagrange basis polynomials would not be holomorphic, and also wouldn't be polynomials!
When the jth node for the jth polynomial is inserted, it equals 1 because the denominator polynomial (the constant term) will equal the numerator since the free variable is the jth node, but it is 0 for the free variable for all other nodes, which has similar behavior to the Kronecker delta, and has the sifting property useful in approximating the interpolating polynomial. That "sifting" property is the key here.
We know that need to calculate this only at the k+1 nodes because the Fundamental Theorem of Algebra tells us that each polynomial of degree k is represented uniquely by k+1 roots, which can be worked further off of to prove uniqueness for k+1 non-zero solutions. So k+1 Lagrange basis polynomials in Lagrange are enough to interpolate a degree k polynomial.
Error happens when the original polynomial is greater than degree k, or is not a polynomial. If the original polynomial is at most degree k, and all node/value pairs (or points) are distinct, then there is no error.
Understanding things this way is the gateway to understanding convolution and other interpolating basis functions, such as the basis trig polynomials and the Fourier transform.
I guess I'm also posting this comment to also help myself understand that I am learning this correctly too.
Very good video, thanks!
It's very useful, thanks a lot!
In the error evaluation (at 2:55) why do we divide by 3! not 2! ?
That looks like a mistake on my part. I used f''' becuase of n+1 and then kept the n+1 for the factorial on the bottom instead of n. Thank you for finding this.
yeah, really nice explanation. Thanks!
GOAT thank you
life saver!
why is it 0.4 apart, im still confusedm there are 5 points, so shouldnt it be (0.1)^(5)
The .4^5 was a crazy large upper bound. Consider your 5 points to be 1.0, 1.1, 1.2, 1.3, and 1.4. Then you have (x - 1.0)(x-1.1)(x-1.2)(x-1.3)(x-1.4). Now I didn't specify a value for x but I know it is somewhere in my interval between 1.0 and 1.4. I could try and figure out at exactly what point will make this product largest or just say that my error is the maximum distance of my interval each time (kind of a moving x target). And since I have 5 terms with a max distance of .4 then I know an upper bound. There are ways to find a better upper bound but this is a quick and painless way that gets a good enough estimate.
2:23 "if we do some fancy math"
thats not a very good explanation of what is shown there
dislike that term very much
ya retreated