Take the 2-minute tour ×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

Hi,

How can I generate the equation of a curve that matches all arbitrarily given (x,y) pairs? I would like a polynomial of nth degree, where n does not matter, as long as the curve passes thru all the given points.

I guess this problem is NP-complete. If so, how do I find the closest matching curve in a feasible amount of time?

Furthermore; how do I generate a piecewise polynomial, in case the given (x,y) pairs are discontinuous, or they draw the shape of a, say, circle?

Thanks in advance.

share|improve this question

closed as too localized by Igor Rivin, Douglas Zare, Felipe Voloch, Qiaochu Yuan, Tom Leinster Feb 5 '11 at 23:03

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

4  
This question will surely get closed, since it's not at research level. Look up Lagrange interpolation. –  Andreas Blass Feb 5 '11 at 22:17

1 Answer 1

up vote 1 down vote accepted

Actually, there is an easy and standard procedure (Lagrange Interpolation) that does this. See:

http://en.wikipedia.org/wiki/Lagrange_polynomial

share|improve this answer
    
Thank you very much. –  Murat Feb 5 '11 at 22:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.