Donate

# Polynomial?

Rev. Green | 15:18 Sun 31st Oct 2021 | Science
I need a formula that monotonically decreases from f(0)=infinity to f(infinity)=0 and passes through the points f(a)=2 and f(b)=1, where a

1 to 12 of 12

Actually, I tell a lie. A cubic would do. I'd realised this earlier but hadn't followed through properly. So, define f(x) = 1/g(x), g(x) = α x^3 + β x^2 + γ x, and impose f(a) = 2, f(b) = 1, with 0 < a < b. Then β = (b - 2a)/(2ab(a-b)) - (a+b)α ; γ = (2a^2-b^2)/(2ab(a-b))+ abα ; And α is chosen such that β^2 - 4 αγ < 0, which gives firstly (2a + b - 2 sqrt(2ab))/(2ab(a-b)^2) < α <...
12:22 Wed 03rd Nov 2021
Question Author
... is less than b. I'm using a formula involving logarithms. Is there a quotient of polynomials?
f(0) can't "equal" infinity, and f("infinity") can't "equal" zero, so I assume you mean "tends to" in both cases.

In that case, any variation of f(x) = 1/x^n does the job. Then, e.g for n=1, f(1/2) = 2, f(1) = 1 satisfies your condition.

Is there another constraint you need? eg, specific values for a and b?
Question Author
A, B, and X are given. F(A) = 2, F(B) = 1. I'd like to know F(X). The formula I have is something like (B/X) to the power of ((log2)/log(A/B)). You are correct, if A happens to be half B the answer is trivial.
The function f(x) = 1/g(x) for g(x) = x[(b-2a)x + (2a^2 - b^2)] does the job as long as sqrt(2)a < b < 2a. That's the best I can come up with for now.

The "monotonically decreases" part makes finding a polynomial only solution at least trickier, because you have to avoid zeroes in the denominator, or at least push them over to the negative x axis. And with a, b, free then there's not a lot you can do, I don't think, to avoid at least *some* parameter space that has a real, positive solution to g(x) = 0.
Actually, I tell a lie. A cubic would do. I'd realised this earlier but hadn't followed through properly.

So, define f(x) = 1/g(x), g(x) = α x^3 + β x^2 + γ x, and impose f(a) = 2, f(b) = 1, with 0 < a < b. Then

β = (b - 2a)/(2ab(a-b)) - (a+b)α ;
γ = (2a^2-b^2)/(2ab(a-b))+ abα ;

And α is chosen such that β^2 - 4 αγ < 0, which gives firstly

(2a + b - 2 sqrt(2ab))/(2ab(a-b)^2) < α < (2a + b + 2 sqrt(2ab))/(2ab(a-b)^2)

Not every choice of α in this region satisfies the "monotonic increasing" definition, but I think that there will usually exist at least one choice of α that works.

Still, we have a problem with *extremely* nontrivial constraints, and three free parameters, so I would have to study further and I've already spent more time than I should have when I have work to do. But hope this helps!

If you wanted to study it from here yourself, I'd recommend setting b = 1, say, so that 0 < a < 1, and α is still free, but the problem will be easier to study in this case as it's now a two-parameter problem.
Question Author
Thanks for all your work Jim. Sixty years ago I'd have been able to find a good approximation before you could say "Pafnuty Chebyshev", but not now. But you are correct, it is easier to work on the inverse: f(0)=0; f(A)=0.5; f(B)=1 and all can be scaled to let B=1. At present, all of the values of X will be close to B, so a straight line fit through (A/B, 0.5) and (1,1) will be good enough.
If you're going to use a linear fit after all that I'm going to get peeved :P

What's this even for, anyway?
Question Author
Sorry Jim. I hoped someone with a more nimble brain than mine would give a simple formula or say that one was impossible. However, you'll be happy to know how important it is: each day a sudoku is published and two target times for solving it are given, one (A) for two points and one (B) for one point. The times vary greatly from day to day, as does their ratio. X is then a measure of (inverse) senility. I'm down to about 0.9 now.
Ah, that's a relief, I thought for a second it was going to be something so unimportant it would make me question my decision to spend an hour or more on it :/
How is Croatia?
Fine, but I'll address it in its separate post at some point. Until then, stay tuned...

1 to 12 of 12

naimo

AG Fanclub

loz58

nigidivitch