Help me figure out a mathematical formula I need.
I need a formula. I'm going to input the numbers 1, 2, and 3. I need the formula to return 998, 2002, and 3012 respectively. What is the formula?
To get you going at what I'm shooting for, here are two examples.
Let's say instead, that the numbers I needed returned were 2, 4, and 6
So the formula would be 2*x. (2 times x)
Like this:
2 * x = y
When we put in 1, 2, and 3, for x, we get 2, 4, and 6 for y.
if x = 1, y = 2
if x = 2, y = 4
if x = 3, y = 6
Second example.
I need 4, 9, and 14
So the formula (or 'a' formula that works) is (5*x)-1 = y
x=1, y=4
x=2, y=9
x=3, y=14
Get it?
So, the numbers I need are 998, 2002, and 3012.
What's the formula?
I've come to a solution, probably one of many possible solutions. But I had to do it in a roundabout, manual, hit and miss kind of way. What would be the 'correct' way to solve something like this? Some sort of systemic way. How are these types of things solved by people with extensive math skill?
998 = m*1 + b
2002 = m*2 + b. Solve for m and b algebraically. Then, check if 3012 = m*3 + b. (In this case, it will be if m = 1007 and b = -10.
If it doesn't work, the three points aren't linear and you'd need to fit a different type of formula. (quadratic, for example).
posted by JMOZ at 4:42 PM on July 12, 2006