# Lagrange Interpolation question

This topic is 3162 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, In this: http://www.cut-the-knot.org/Curriculum/Calculus/LagrangeInterpolation.shtml When I drag one dot to the same place as another, the line disappears, it seems Lagrange doesn't like to have two same point (x,y) values as control points. Is there an alternative to Lagrange interpolation that does accept two (or more) same point (x,y) control points without having the "line disappear" (so to speak). Thanks.

##### Share on other sites
Maybe I'm missing something, but can't you just skip that control point and reduce the polynomial degree by one?

##### Share on other sites
sorry, but assuming you can't skip a control point, such that a sample is:

(8, 5) (8, 5) (2, 3) (6, 4)

the first two control points are the same, Lagrange would fail with this control point. is there an alternative interpolation method that would say that it's ok for some points to have the same value?

thanks!

##### Share on other sites
Just thin out repeated points and then proceed as normal.

The sentence above is a method that satisfies your needs.

##### Share on other sites
Quote:
 Original post by helloworld123is there an alternative interpolation method that would say that it's ok for some points to have the same value?
Think about what you are asking for a moment: you want a curve that smoothly passes through each point, but you want two adjacent points to be in the same location.

Take a piece of paper, and try to draw such a curve - you will see that either you have to ignore the duplicate (alvaro's solution), or you have to draw a loop where the duplicate vertices lie. Unfortunately, there are infinitely many such loops that can be drawn while maintaining a smooth curve, and there isn't a clear criteria to pick just one.

##### Share on other sites

hi,

yes sorry, it seems removing similar control points would be better.

here's a different question:

given these set of unique control points:

(8, 5) (2, 3) (6, 4) (9, 10) (12, 5)

-> if i use it in lagrange, and plug 8, i'll get 5, and so on right.

-> now assuming i have _only_ these X values of control points (8, 2, 6, 9, 12), would i still get the corresponding Y using lagrange?

i mean, what do i have to have, aside from only these X values to get the Y values (assuming you don't want to keep the Y values)? it'll be like i only have:

- X values from control points
- something else that can be used in lagrange to get those Y values w/the X values from control points

i am sorry if question is not too clear, my english is not the native language. thanks!

1. 1
Rutin
32
2. 2
3. 3
4. 4
5. 5
• ### Forum Statistics

• Total Topics
632972
• Total Posts
3009611
• ### Who's Online (See full list)

There are no registered users currently online

×