# Is it possible to form an equation, given any points

Announcements
#1
This isn't part of any specific exam question, lets say there are two or more points given, I was just wondering if it is possible to form an equation that goes thought the all given points?

Does anyone know if this has been done before? Or how I would go about making an algorithm that does this?
0
4 weeks ago
#2
(Original post by Bigflakes)
This isn't part of any specific exam question, lets say there are two or more points given, I was just wondering if it is possible to form an equation that goes thought the all given points?

Does anyone know if this has been done before? Or how I would go about making an algorithm that does this?
If you have 3 points (x1,y1), (x2,y2), (x3,y3), then the quadratic
y(x) = y1(x-x2)(x-x3)/((x1-x2)(x1-x3)) + y2(x-x1)(x-x3)/((x2-x1)(x2-x3)) + y3(x-x1)(x-x2)/((x3-x1)(x3-x2))
will interpolate the data. The extension to 4 or more points should be obvious? However, its not necessarily a good interpolant, though that depends on why youre using it.
Last edited by mqb2766; 4 weeks ago
0
4 weeks ago
#3
You say "two or more points". With two points, one can always find the equation of the straight line between them.

It's the "or more" where things get tricky. Imagine one million points at random locations. There might, by complete chance, be an equation which connects them. But it's much, much more likely that there is not.

1
4 weeks ago
#4
(Original post by DataVenia)
You say "two or more points". With two points, one can always find the equation of the straight line between them.

It's the "or more" where things get tricky. Imagine one million points at random locations. There might, by complete chance, be an equation which connects them. But it's much, much more likely that there is not.

Is there a proof that there isn’t an equation for most sets of points on the plane?
0
4 weeks ago
#5
(Original post by superharrydude09)
Is there a proof that there isn’t an equation for most sets of points on the plane?
What do you mean by points on the plane? There are a reasonable number of multivariable algorithms which interpolate arbitrary (unique) data points in any dimension.
0
4 weeks ago
#6
How many dimensions are we in?

If it's two, then...
for two points, there's always an equation which is a straight line
for three points, there's always an equation which is a quadratic
for four points, there's always an equation which is a cubic
for five points, there's always an equation which is a quartic

So no, there's no proof that there isn't an equation for most sets of points on the plane, because the opposite is true: there is a polynomial which goes through any number of points on the plane.

(Not sure how it works in more than two dimensions.)
0
4 weeks ago
#7
(Original post by mqb2766)
What do you mean by points on the plane? There are a reasonable number of multivariable algorithms which interpolate arbitrary (unique) data points in any dimension.
I was just responding to the other guy who said there isn’t an equation for any set of points, although I see how your formula would suggest there is. Just one question though, would what you suggest hold for a set of points which includes (x1,y1) and (x2,y2), where x1=x2 and y1 doesn’t equal y2?
0
4 weeks ago
#8
(Original post by superharrydude09)
I was just responding to the other guy who said there isn’t an equation for any set of points, although I see how your formula would suggest there is. Just one question though, would what you suggest hold for a set of points which includes (x1,y1) and (x2,y2), where x1=x2 and y1 doesn’t equal y2?
Its impossible for any function to interpolate the data in that case and really calling it an interpolation problem is wrong. If the points (input values) are distinct, then there is a wide range of interpolation algorithms based on reproducing kernel hilbert spaces which will interpolate (or approximate) an arbitrary data set with 1, 2, ...n input variablels. These cover polynomials, gaussian, .... and the example I gave in #2 is motivating rather than being useful.
Last edited by mqb2766; 4 weeks ago
0
4 weeks ago
#9
(Original post by superharrydude09)
Is there a proof that there isn’t an equation for most sets of points on the plane?
I have no such proof. My answer was based purely on instinct.
0
#10
(Original post by mqb2766)
If you have 3 points (x1,y1), (x2,y2), (x3,y3), then the quadratic
y(x) = y1(x-x2)(x-x3)/((x1-x2)(x1-x3)) + y2(x-x1)(x-x3)/((x2-x1)(x2-x3)) + y3(x-x1)(x-x2)/((x3-x1)(x3-x2))
will interpolate the data. The extension to 4 or more points should be obvious? However, its not necessarily a good interpolant, though that depends on why youre using it.
Thanks
0
#11
(Original post by mqb2766)
If you have 3 points (x1,y1), (x2,y2), (x3,y3), then the quadratic
y(x) = y1(x-x2)(x-x3)/((x1-x2)(x1-x3)) + y2(x-x1)(x-x3)/((x2-x1)(x2-x3)) + y3(x-x1)(x-x2)/((x3-x1)(x3-x2))
will interpolate the data. The extension to 4 or more points should be obvious? However, its not necessarily a good interpolant, though that depends on why youre using it.
Are there ones that use e/logs or trig functions, or even combine these to make more complex curves? I’ve had a look and I think that curve-fitting and interpolation is what I’m looking for?
0
4 weeks ago
#12
(Original post by Bigflakes)
Are there ones that use e/logs or trig functions, or even combine these to make more complex curves? I’ve had a look and I think that curve-fitting and interpolation is what I’m looking for?
Yes. Arguably the simplest one would be to place Gaussian bell curves centered on each data point (so use e^...) and calculate the corresponding weights which combine them by solving the resulting linear equations. There are a wide class of similar nonlinear transformations that could be used instead of a Gaussian bell.

If you desribe your problem a bit more it would help in being able to offer advice.
Last edited by mqb2766; 4 weeks ago
0
#13
(Original post by mqb2766)
Yes. Arguably the simplest one would be to place Gaussian bell curves centered on each data point (so use e^...) and calculate the corresponding weights which combine them by solving the resulting linear equations. There are a wide class of similar nonlinear transformations that could be used instead of a Gaussian bell.

If you desribe your problem a bit more it would help in being able to offer advice.
Well I’m planning on making a program where the user has to enter a start and end coordinate and then is able to enter as many points between those two coordinates as they want to, and my program would form an equation that is as close/accurate as possible at modelling a curve to fit those points. I just didn’t know where to start in creating an algorithm like this?
Last edited by Bigflakes; 4 weeks ago
0
4 weeks ago
#14
(Original post by Bigflakes)
Well I’m planning on making a program where the user has to enter a start and end coordinate and then is able to enter as many points between those two coordinates, and my program would form an equation that is as close/accurate as possible at modelling a curve to fit those points. I just didn’t know where to start in creating an algorithm like this?
If its some form of "route" fitting, Id probably look at cubic splines. Ill dig out a couple of refs and edit the post.

These look reasonably introductory/descriptive
https://www.physicsforums.com/attach...lv2-pdf.12898/
but there are quite a few descriptions/videos, just google something like
parametric cubic splines
Last edited by mqb2766; 4 weeks ago
0
#15
(Original post by mqb2766)
If its some form of "route" fitting, Id probably look at cubic splines. Ill dig out a couple of refs and edit the post.

These look reasonably introductory/descriptive
https://www.physicsforums.com/attach...lv2-pdf.12898/
but there are quite a few descriptions/videos, just google something like
parametric cubic splines
Thank you
0
X

new posts Back
to top
Latest
My Feed

### Oops, nobody has postedin the last few hours.

Why not re-start the conversation?

see more

### See more of what you like onThe Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

### Poll

Join the discussion

#### Year 12s - where are you at with making decisions about university?

I’ve chosen my course and my university (13)
28.26%
I’ve chosen my course and shortlisted some universities (18)
39.13%
I’ve chosen my course, but not any universities (2)
4.35%
I’ve chosen my university, but not my course (2)
4.35%
I’ve shortlisted some universities, but not my course (4)
8.7%
I’m starting to consider my university options (6)
13.04%
I haven’t started thinking about university yet (0)
0%
I’m not planning on going to university (1)
2.17%