Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Sep 23, 2011 #1

    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. jcsd
  3. Sep 23, 2011 #2


    User Avatar
    Science Advisor
    Homework Helper

    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.
  4. Sep 26, 2011 #3
    I have Point 1 (1103, 7093.16702) and Point 2 (1104, 20553.56911).

    How do I ever determine the equation correctly?
  5. Sep 26, 2011 #4


    User Avatar
    Science Advisor
    Homework Helper

    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.
  6. Sep 26, 2011 #5
    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.

    To help you answer this, more information is needed:
    -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?)
  7. Sep 26, 2011 #6
    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
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook