Solving for a General Formula in Two Series of Numbers

  • Thread starter bobie
  • Start date
  • Tags
    Series
In summary, Ray found a general formula for the second row of data in terms of the first row, after trials and errors. His formula is y = \frac{x+1}{x} . Alpha can easily plot this data in a Cartesian coordinate system and ask for the y-values at each point.
  • #1
bobie
Gold Member
720
2

Homework Statement


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:
Physics news on Phys.org
  • #2
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)?
 
  • #3
bobie said:

Homework Statement


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

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:
  • Like
Likes 1 person
  • #4
Ray Vickson said:
In this case it looks like a formula of the form
[tex] y = a + \frac{b}{x^c} [/tex]

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

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?
 
  • #5
bobie said:
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]
It does if you plug in the right values for Ray's a, b and c.
 
  • Like
Likes 1 person
  • #6
bobie said:
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?

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.
 
  • Like
Likes 1 person
  • #7
bobie said:
Can you suggest how to ask for a graph at Wolfram?

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:
  • Like
Likes 1 person
  • #8
mafagafo said:
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.

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.
 
  • Like
Likes 1 person
  • #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.
 
  • Like
Likes 1 person
  • #10
Last edited:
  • #11
bobie said:
Thanks, Ray
I tried at w.alpha, this me dots that look like a/x^2,is that right?
http://www.wolframalpha.com/input/?...,6.0625)(.6,6.583)(.4,7.825)(.2,10.95)(.1,17)

this is more difficult
2.0 5.125
1.8 5.1944444...
1.6 5.28125
1.5 5.3333333
1. 5.75
.8 6.0625
.6 6.583
.5 7
.4 7.825
.2 10.75
.1 17
I suppose the key lies in the 2 integers :17 and 7 ?
can you help me with this?

Thanks

Show your work first, as required by PF rules.
 
  • #12
The nearest I found is 5 + .75/x^2 but works only for 1 and 1.5 and then makes a curve
 
  • #13
bobie said:
The nearest I found is 5 + .75/x^2 but works only for 1 and 1.5 and then makes a curve

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
bobie said:
I thought it was a quadratic, but I added 5 and 8 and now it looks like a hyperbole
http://www.wolframalpha.com/input/?...,6.0625)(.6,6.583)(.4,7.825)(.2,10.95)(.1,17)
but I cannot find any a= xy
I just proceed by trials and error, I am a beginner , if you cannot help, it's ok.

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.
 
  • #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).
 

1. What is a general formula for two series of numbers?

A general formula for two series of numbers is an equation that can be used to find any term in either series, based on its position or index. It is represented as f(n) = an + b, where n is the term's position and a and b are constants.

2. How do you solve for a general formula in two series of numbers?

To solve for a general formula in two series of numbers, you need to first find the common difference or ratio between consecutive terms in each series. Then, use the values to form equations and solve for the constants a and b. Finally, plug in the values of a and b into the general formula f(n) = an + b.

3. What is the use of finding a general formula in two series of numbers?

Finding a general formula in two series of numbers allows you to easily find any term in either series without having to list out all the terms. It also helps in identifying patterns and making predictions about future terms in the series.

4. Can a general formula be used for any type of series of numbers?

Yes, a general formula can be used for any type of series of numbers as long as there is a consistent pattern and the terms can be expressed mathematically.

5. Is there a specific method to solving for a general formula in two series of numbers?

Yes, there are different methods that can be used to solve for a general formula in two series of numbers, such as the method of common differences for arithmetic series and the method of common ratios for geometric series. However, the approach may vary depending on the complexity of the series.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
6
Views
2K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
11
Views
1K
  • Precalculus Mathematics Homework Help
Replies
10
Views
3K
  • Precalculus Mathematics Homework Help
Replies
4
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
1
Views
766
  • Precalculus Mathematics Homework Help
Replies
2
Views
2K
  • General Math
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
12
Views
1K
Back
Top