1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Plotting a graph to find unknowns

  1. Jul 20, 2017 #1
    1. The problem statement, all variables and given/known data
    Plot a suitable graph, using your x and y data, to find the variables a and b.

    2. Relevant equations
    y = ax + bx^2

    3. The attempt at a solution
    This is clearly a quadratic, the best I can do is to play about with lns and I came out with
    lny = lnax + lnbx^2
    lny = ln(ab.x^3)
    lny = 3ln(ab) + 3lnx

    so plotting lny against lnx should give gradient 3 and from the intercept can get the product ab but not the individual values of a and b.
    Other than taking two point from the graph and using simulataneous equations is there something I'm missing? Is there another graphical way to get at a and b?
    Last edited by a moderator: Jul 20, 2017
  2. jcsd
  3. Jul 20, 2017 #2
    1. y = ax + bx2
    2. lny = ln(ax) + ln(bx2)
    3. ln y = ln(abx3)
    4. ln y = 3ln(ab) + 3 lnx

    Of these steps, that between 2 and 3 is the ONLY one you got right. You correctly saw that lnA + lnB = ln(AB). But do you see why that makes the step from 1 to 2 wrong? ln(A+B) is not equal to lnA + lnB. (From 3 to 4, the cube only affects x, not ab.)

    Can you think of a simple transformation of the initial equation that makes the RHS linear in x?
  4. Jul 20, 2017 #3


    Staff: Mentor

    What data do you have? Your equation above is that of a parabola, so if your data points are on the parabola you can use two of the data points to form two equations in a and b, and then solve for these parameters.

    Maybe it's because I just woke up, but I can't think of such a transformation.
  5. Jul 20, 2017 #4
    Wow, I made a dreadful mistake with the lbs!

    So I think then that if you had numerical data for x and y (from a practical) and then it was suggested the relationship was:
    Y = ax + bx^2
    Then there is nothing you could do to actually find out what the a and b was?
  6. Jul 20, 2017 #5
    Lns not lbs. predictive text!
  7. Jul 20, 2017 #6


    Staff: Mentor

    Did you read what I wrote earlier? Here it is again:
  8. Jul 20, 2017 #7
    Thanks Mark, missed that on my phone.
  9. Jul 20, 2017 #8


    User Avatar
    Homework Helper
    Gold Member

    If you are certain that it will fall into the format of y = ax + bx2, then take some of your (x,y) data points, then you will have 2 or more linear equations:
    constant1 = a{constant2} + b{constant3},
    constant4 = a{constant5} + b{constant6} etc.
  10. Jul 20, 2017 #9


    Staff: Mentor

    This is essentially what I said in posts 3 and 6.
    I would write the above two equations as
    ##y_1 = ax_1 + bx_1^2##
    ##y_2 = ax_2 + bx_2^2##
    Assuming that ##(x_1, y_1)## and ##(x_2, y_2)## are actually points on the parabola, my two equations can be used to solve for a and b.
  11. Jul 20, 2017 #10


    User Avatar
    Homework Helper
    Gold Member

    Using log on the vertical axis versus log on the horizontal axis is helpful when you have some data, which you believe fits the form:

    y = Axn

    It is especially helpful when you don't know the value of n. It is not necessary to be an integer, you could have y = (2.1)x1.5 for example.

    then taking logs of both sides, you get log(y) = log(Axn) and then: log(y) = log(A) + log(xn) and finally:

    log(y) = log(A) + n*log(x), so n is the slope of the graph, and log(A) is the intercept.

    Often this would be done by getting some graph paper which already had log scales on both axes, and plotting the data directly.
  12. Jul 21, 2017 #11
    What about y/x = a + bx ?
  13. Jul 21, 2017 #12

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    People have asked you about the nature of your data, and you have refused to answer. That question is very important. If you have just two data points ##(x_1,y_1)## and ##(x_2,y_2)## you can set up and solve two equations to find ##a## and ##b##; the equations you need to use have been written already by others.

    However, if you have more than two data points, and if there are possibly some experimental errors in the data, that "solving" approach is in trouble. Suppose, for example, you had 10 data points ##(x_1,y_1), (x_2,y_2), \ldots, (x_{10},y_{10})##. There may be no possible parabola that fits all of them; there are 45 different ways to choose two point from ten points, so there may be as many as 45 different "fits" to your data. Obviously, that makes no sense, so in such cases we seek a "compromise" fit, which may not go through any of the points exactly, but (hopefully) passes close to all of them. When you have data with experimental errors, that is the best you can hope for.

    Anyway, in such cases we normally find the so-called "least-squares fit"; see, eg.,
    http://mathworld.wolfram.com/LeastSquaresFitting.html .
    You can find many other links by doing a Google search for "least squares fit", for example. Many of the links use at least a bit of Calculus, so I have not cited them herein. Of course, I could spend quite a lot of time writing it all out, but numerous people have done that already, and it is as easy for you to read material on other web sites as on this one.

    So, I ask again: what is the nature of your data?
    Last edited: Jul 21, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted