6

I am looking for a function that fits well to be used as a weight with exponential behavior. My x values are between 0 and 1, and i would like this function to behave exponentially, so that only x values close to 1 have y values close to 1 (and vice versa x values close to 0 have y values close to 0).

The function should behave asymptotically, so that:

$\lim_{x \rightarrow 1} f(x) = 1$ and $\lim_{x \rightarrow 0} f(x) = 0$

4 Answers4

11

$$y=\frac{a^x-1}{a-1}, a>1$$

Will satisfy the conditions you've mentioned.

Milind Hegde
  • 3,914
6

$$f(x)=e^{1-\frac{1}{x^2}}$$should be ok.

i.a.m
  • 2,376
3

You can start with the form $f(x) = c_1a^x + c_2$ for $a>1$ and $c_1, c_2 \in \mathbb{R}$.

By definition, $f(0) = c_1 + c_2 = 0 $ and $f(1) = c_1a+c_2 = 1$. Putting these together you get:

$c_1 = \frac{1}{a-1}$ and $c_2 = -\frac{1}{a-1}$, implying

$f(x) = \frac{a^x-1}{a-1}$.

Same answer as Milind. Just shows you how to derive it. You can try to fit other exponential forms using the same approach, as long as they have only 2 parameters.

Godfather
  • 2,355
0

I dunno if you guys are still alive, but this function fits pretty well :

For $0 \le x \le 1$ and $1 \le k \le 4$, $f(x) = (x–2)^{-2k} – 2^{-2k}(1–x)$

(in my opinion with $k>4$ the function gets too 'perpendicular' if you see what I mean)

Alnx
  • 1