1. Not finding help here? Sign up for a free 30min 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!

Matching two series

  1. Jan 6, 2014 #1

    bobie

    User Avatar
    Gold Member

    1. The problem statement, all variables and given/known data
    This is not homework, just an exploration
    we have two rows of numbers
    2 1.5
    1.8 1.5555..
    1.6 1.625
    1.5 1.6666..
    1 2
    .8 2.25
    .6 2.6666..
    .5 3
    .4 3.5
    .2 6
    .1 11
    we want to find a general formula /operation that gets the second row
    how do we proceed? only by trials and errors?is it better to multiply first row by 10?or the second so to get integers?

    Is there anyone that can solve this problem?
    Thanks
     
    Last edited: Jan 6, 2014
  2. jcsd
  3. Jan 6, 2014 #2

    CompuChip

    User Avatar
    Science Advisor
    Homework Helper

    Although you can always find a function through any finite number of data points that will "predict" the next number, I fail to see a sensible pattern in these ones. Maybe you can plot them and advise what kind of relationship you are looking for... is it supposed to be a straight line, or an exponential, or a polynomial? Do you want an exact fit or a "close" fit? Depending on where you got the number from, is there any a priori expectation (of, for example, linearity)?
     
  4. Jan 6, 2014 #3

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    The standard way to deal with such questions is to plot y (the second number) in terms of x (the first number), or to plot x in terms of y. The form of the graph should suggest a type of formula y = f(x) or x = f(y) that will give you what you want.

    In this case it looks like a formula of the form
    [tex] y = a + \frac{b}{x^c} [/tex]
    should work. Here, a, b and c are some unknown constants that need to be estimated from the data. There are a number of standard methods that can be used to find "good" values of a, b and c. In this case the use of a nonlinear least-squares package yields a good answer. I just used the Maple 'NonlinearFit" package, but I would bet that Wolfram Alpha also has a similar package available for free on-line use. Alternatively, you could use the EXCEL Solver to solve the nonlinear optimization problem that you get from the least-squares formulation.

    I won't spoil your fun by giving you the answer; I think you will learn more by playing around with this problem yourself.

    Added note: in this problem it is very useful to use exact rationals instead of decimals; for example, write 1.5555... as 1 + 5/9 = 14/9, etc. Do this for both x and y.
     
    Last edited: Jan 6, 2014
  5. Jan 7, 2014 #4

    bobie

    User Avatar
    Gold Member

    Thanks, Ray, I found the solution, it was rather easy but doesn't match your formula
    mine is :[tex] y = \frac{x+1}{x} [/tex] , what is yours?
    Can you suggest how to ask for a graph at Wolfram?
     
  6. Jan 7, 2014 #5

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    It does if you plug in the right values for Ray's a, b and c.
     
  7. Jan 7, 2014 #6

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    I get y = 1 + (1/x), exactly the same as you. It is obvious once you convert the x,y data to rational numbers. As for graphing via Wolfram: I am the wrong person to ask.
     
  8. Jan 7, 2014 #7
    Wolfram... what?

    Alpha can just get "(x+1)/x" and it will do some graphics.

    Mathematica Code:
    Plot[(x+1)/x, {x, .01, 3}]
    DiscretePlot[(x + 1)/x, {x, 0.1, 10., 0.1}]

    Simple Mathematica code, some lines run on alpha.
    I am not good at asking Alpha things.
     
    Last edited: Jan 7, 2014
  9. Jan 7, 2014 #8

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    I think he probably wanted a way to do a plot of some given points (x1,y1), (x2,y2), ..., (xn,yn), rather than a plot of a specific formula. He could do it easily in EXCEL, for example, and of course, also in full-power Mathematica (or Maple or .... ), and he could also go out and buy some graph paper and do the whole thing by hand.
     
  10. Jan 7, 2014 #9
    Ray may be right.

    In Alpha:
    (2, 1.5) (1.8, 1.5555) (1.6, 1.625) (1.5, 1.6666) (1, 2) (.8, 2.25) ... (you can go a long way, I think)
    Will give you a Cartesian coordinate system with the points on it.
     
  11. Jan 8, 2014 #10

    bobie

    User Avatar
    Gold Member

    Last edited: Jan 8, 2014
  12. Jan 8, 2014 #11

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Show your work first, as required by PF rules.
     
  13. Jan 8, 2014 #12

    bobie

    User Avatar
    Gold Member

    The nearest I found is 5 + .75/x^2 but works only for 1 and 1.5 and then makes a curve
     
  14. Jan 8, 2014 #13

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    You need to show what you did; that is, not just the answer, but how you got it. That is important, because we need to know your thinking in order to be able to help.
     
  15. Jan 8, 2014 #14

    bobie

    User Avatar
    Gold Member

  16. Jan 8, 2014 #15

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Always start by plotting the points. You can do it easily in EXCEL or any other, comparable spreadsheet. A very good alternative is to go to a stationary store and buy some graph paper; then you can plot points manually, using nothing fancier than a pencil. I am 100% serious---that's my advice.
     
  17. Jan 8, 2014 #16
    I agree with Ray to some degree. Using Alpha for point plotting (if more than 3 or 4) is not wise. Use any spreadsheet graphing if you don't use Mathematica, Matlab or any other mathematical software.
    If you don't have Microsoft Excel download LibreOffice (or buy Excel, whatever).
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted