Lagrange and cubic spline interpolate

  • Thread starter Thread starter BearY
  • Start date Start date
  • Tags Tags
    Cubic Lagrange
Click For Summary

Homework Help Overview

The discussion revolves around the relationship between Lagrange interpolation and cubic spline interpolation, specifically when applied to a set of four data points. Participants are exploring why the results from these two methods appear to agree without a formal proof, prompting questions about the underlying principles that might explain this phenomenon.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • Participants discuss the nature of both interpolation methods, noting that the Lagrange polynomial is cubic due to the four data points. Questions arise about whether the agreement in results is due to the formulas themselves or if there is a deeper mathematical reason. Some suggest demonstrating that both methods yield the same equation for the dependent variable, either through direct calculation or by showing that the Lagrange polynomial meets the conditions of cubic splines.

Discussion Status

The conversation is ongoing, with participants actively engaging in reasoning about the conditions that cubic splines must satisfy and how these relate to the properties of Lagrange polynomials. There is recognition that if the Lagrange polynomial meets the conditions of the cubic spline, it could imply a unique solution, although no consensus has been reached yet.

Contextual Notes

Participants are working within the constraints of a homework assignment that requires them to explore these interpolation methods without providing complete solutions. There is an emphasis on understanding the conditions under which both methods operate and how they might be equivalent in this specific case.

BearY
Messages
53
Reaction score
8

Homework Statement


This is a bit unusual, I don't know whether I should post it here or math forum tbh.
When I was doing numerical method home work, I am required to do perform both of these interpolation on a set of 4 data points. It turns out that the result of these 2 methods always agrees with each other(not proven in any way, just by playing with data, that's why I am asking). We were asked to explain this. I have not a clue how this is happening.

Homework Equations

The Attempt at a Solution


Since there are 4 data points, the Lagrange polynomial is also a cubic function. I have that to start with.
I also have the formula of how the cubic splines are piece-wise calculated. But then I am stuck here.
Is it because of the formula or there is a deeper reason?
 
Last edited:
Physics news on Phys.org
BearY said:

Homework Statement


This is a bit unusual, I don't know whether I should post it here or math forum tbh.
When I was doing numerical method home work, I am required to do perform both of these interpolation on a set of 4 data points. It turns out that the result of these 2 methods always agrees with each other(not proven in any way, just by playing with data, that's why I am asking). We were asked to explain this. I have not a clue how this is happening.

Homework Equations

The Attempt at a Solution


Since there are 4 data points, the Lagrange polynomial is also a cubic function. I have that to start with.
I also have the formula of how the cubic splines are piece-wise calculated. But then I am stuck here.
Is it because of the formula or there is a deeper reason?
I think that is a good place to start. Show that both approaches produce the same equation for the dependent variable. You could do that by brute force, or you could show that the Lagrange polynomial solution satisfies all of the conditions of the cubic spline solution. (The second way is a lot easier.)
 
  • Like
Likes   Reactions: BearY
tnich said:
I think that is a good place to start. Show that both approaches produce the same equation for the dependent variable. You could do that by brute force, or you could show that the Lagrange polynomial solution satisfies all of the conditions of the cubic spline solution. (The second way is a lot easier.)
From what I know, the only (three if count separately) condition is neighbor splines have same value of ##f, f', f''## at the joint. The deriving of spline formula is also solely based on these conditions if I am not mistaken. Since the Lagrange polynomial is a polynomial, it naturally fits these criteria. But does fitting these criteria plus having 4 intersections making the cubic function equivalent?
edit: Since we are starting from those conditions, plus MATLAB uses not a knot method, and reached a unique solution to the 2nd derivatives of the four data points, does that mean any cubic function that fits these condition will be equivalent?
 
Last edited:
BearY said:
From what I know, the only (three if count separately) condition is neighbor splines have same value of ##f, f', f''## at the joint. The deriving of spline formula is also solely based on these conditions if I am not mistaken. Since the Lagrange polynomial is a polynomial, it naturally fits these criteria. But does fitting these criteria plus having 4 intersections making the cubic function equivalent?
I think you will need to show that the Lagrange polynomial solution fits the end conditions of the cubic spline, too. If the cubic spline solution is unique, and the (unique) Lagrange polynomial solution satisfies all of its conditions, then it must also be the unique cubic spline solution.
 
  • Like
Likes   Reactions: BearY
tnich said:
I think that is a good place to start. Show that both approaches produce the same equation for the dependent variable. You could do that by brute force, or you could show that the Lagrange polynomial solution satisfies all of the conditions of the cubic spline solution. (The second way is a lot easier.)
tnich said:
I think you will need to show that the Lagrange polynomial solution fits the end conditions of the cubic spline, too. If the cubic spline solution is unique, and the (unique) Lagrange polynomial solution satisfies all of its conditions, then it must also be the unique cubic spline solution.
Yes I see now Thank you.
 
Last edited:

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
1
Views
2K
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
1
Views
2K