(Fair warning: I'm a computer engineer)
I was looking for a function $f$ that maps a value from $[0, 1]$ to $[\frac{1}{n}, n]$. So, $f(0) = \frac{1}{n}$, $f(1) = n$, $f(0.5) = 1$, $f(0.75) = \frac{n}{2}$ and so on...
I fired up Excell and it gives me this simple graph (for $n = 4$ here)
Since it looks like a simple exponential curve, I theorize that I was looking for a function in the form $f(n) = (ax + b)^c$.
With a bit of trial and error, I found out that $$b = (\frac{1}{n})^{\frac{1}{c} }$$ to have that little shift up. Knowing that $n = (a + b)^c$, I know that $$a = n^{\frac{1}{c}} - b.$$
Plotting that with $c = 2$, gives me a new graph with this estimation.
Which looks good, but not curved enough. By increasing $c$, it gets closer and closer to the target curve. Remember that for now, I'm only comparing with the curves for $n = 4$. Well, of course, when I tried with $n = 10$, it diverges quite a bit.
In the end, I kind of find the solution to my problem (only for $n = 4$ which is my need), but I have to tend the power $c$ to infinity (which is less than convenient) and it feels pretty complicated for this simple curve.
What do I do wrong here? Thanks.
$$f(x) = \left(16-\frac{8}{3n}-\frac{8n}{3}\right)x^3+\left(6+\frac{6}{n}-28\right)x^2 + \left(12-\frac{7n}{3}\right)x+ \frac{1}{n}$$
– Sewer Keeper Nov 25 '20 at 14:58$$ f(x) =-2.66667 n x^3 - (2.66667 x^3)/n + 6. n x^2 + (6. x^2)/n - 2.33333 n x - (4.33333 x)/n + 1/n + 16 x^3 - 28 x^2 + 12 x $$ work better?
– Sewer Keeper Nov 25 '20 at 15:23