build function passing for specific points

97 Views Asked by At

I have to solve a problem very similar to this

how-to-create-a-function-passing-through-given-points

I need a function that draw a curve like the blue one in the picture here

thus passing as close as possible to the following points:

(100, 6)
(200, 5,2)
(300, 4,67)
(400, 4,27)
(500, 3,95)
(600, 3,68)
(700, 3,45)
(800, 3,25)
(900, 3,07)
(1000, 2,91)
(2000, 2,77)
(3000, 2,63)
(4000, 2,51)
(5000, 2,4)
(6000, 2,29)
(7000, 2,19)
(8000, 2,1)
(9000, 2,01)
(10000, 1,92)
(20000, 1,84)
(30000, 1,77)
(40000, 1,69)
(50000, 1,63)
(60000, 1,56)
(70000, 1,49)
(80000, 1,43)
(90000, 1,37)
(100000, 1,32)
(110000, 1,26)
(120000, 1,21)
(130000, 1,16)
(140000, 1,11)
(150000, 1,06)
(160000, 1,02)

Basically has to have Y=6 when X=100, Y around 3 when X=1000 and Y=1 when X=>160000
specifically, I need to avoid the curve to be too sharp with low X values, like the brown one does.

I understood from the linked question that easiest way is to feed all data to Mathematica and let it calculate the most adequate solution. But I saw also that software calculates the values of coefficient, but requires the function shape: How you decide which function to feed it ? why

(a x^2 + b x + c)/(x + d)

like in the answer of Antonio Vargas and not with

(a x^5 - b x^4 + c x^3 - d x^2 + e x + f)/(g x^3 - h x^2 + i x + j)

or any other function?

Finally since I need such function quite often but with different starting point, end point and sharpness, can use same function changing 3 parameters (if yes which and how) or it is required to recalculate the formula?

Thanks a lot for your time.
Joe

1

There are 1 best solutions below

2
On

Hint:

It seams that you want a rational function that has limit $1$ for $x\to \infty$ and fit the given points.

If this is the case you can use a function of the form $$ y=\frac{x^n-\sum_{i=1}^{n}a_ix^{n-i}}{x^n-\sum_{i=1}^{n}b_ix^{n-i}} $$

And, depending of what points you know, you can chose $n$ such that the function passes thorough the given points ( in principle...in practice the calculus can be tedious).