# Creating equation out of 5 point or more from graph plot.

1. Sep 23, 2011

### David Roger

Hi,

I need to find the 6th point of a graph line. The line is not totally straight.

Is there step I can take to find the equation from the 5 point alone?

2. Sep 23, 2011

### CompuChip

Depends on what exactly you want.
You can always draw a fourth degree polynomial through the five points (i.e. determine a, b, c, d, e in y = ax4 + bx3 + cx2 + dx + e).
Or you can draw a straight line that doesn't go through all the points but comes as close to them as possible (e.g. do a least square fit).
Or you can just write down some ugly (non-differentiable) function going through the five points.

3. Sep 26, 2011

### David Roger

I have Point 1 (1103, 7093.16702) and Point 2 (1104, 20553.56911).

How do I ever determine the equation correctly?

4. Sep 26, 2011

### CompuChip

Again, which equation do you want?
You can draw straight lines between each pair of points but that will give you a very "edgy" graph. You can find a smooth polynomial through the points, but that will not be of much use if you want to, say, extrapolate the data.
Or you can do a fit of a straight line (or other function) which will be of use for extrapolating, but then the given points will not necessarily be on the line.

5. Sep 26, 2011

### thegreenlaser

Well, you can determine a straight line that passes through these two points pretty easily, but unfortunately, the techniques involved in that won't really help you here, where you're trying to find a non-linear curve from 5 points. You can find a 4th order polynomial that will exactly touch all five of your points, but a lot of times (like CompuChip said) this will be useless for extrapolating, because it will tend to oscillate between the points and then shoot off into space on both ends. Unfortunately, curve fitting is not as easy as it seems like it should be.

-what's the project that this is for? (how important is accuracy?)
-what exactly is the problem you're solving? (is there some known formula that you would expect to describe your results?)

6. Sep 26, 2011

### genericusrnme

Could try using least squares to give you an nth order polynomial but if that 6th point isn't between your first and last ones then it won't really help (not that it'd help much if it wasn't)
Also, to get the line between point 1 and 2 it's just the basic
y = m x + c
y = (delta x/delta y)x + c

don't see how much use that would be to you though