function: bending the y=x line

78 Views Asked by At

My question has many relative questions but I didn't find anything exact to my needs.

Let's take the function $f(x)=x$ with $x\in[0,100] $.

I need to bend this and make it a curve. f will be a cumulative function. I surely need the following:

  • $f(0)=0$
  • $f(100)=100$
  • $f'(x)>0$
  • $f''(x)<0$
  • $f(20)=\Omega$
    • obviously $\Omega\ge20$
    • if $\Omega=20$ then the function's equation should take the form of $f(x)=x$

1) My first thought was a logarithmic function: $f(x)=a \cdot ln(b\cdot x)+c$ but it was a little difficult to determine the a,b,c algebraically

2) My second thought was a the $f(x)=\frac{a\cdot e^x}{a\cdot e^x+1}-0.5$

After finding the a for which $f(20)=\Omega$ (it's not difficult) I would use the function $g(x)=\frac{f(x)-f(0)}{f(100)-f(0)}\cdot 100$, so that $g(0)=0$ and $g(100)=100$. This function seems nice to the eye for different values of $\Omega$ but it does not "become" $f(x)=x$ when $\Omega=20$

3) My last try was the CMF (Cumulative Distribution Function) with $\mu=0$. Again I use the $g(x)$ as before so that $g(100)=100$. I can find $\sigma$ so that $g(20)=\Omega$.

For $\sigma>>$ the function takes the form of $f(x)=x$, but my problem with this approach is that I cannot determine the $\sigma$ algebraically, so that $f(20)=\Omega$.

What are your thoughts on my problem?

2

There are 2 best solutions below

1
On

The function $g(x) = \sin x$ has almost the property you want but over the interval $[0,\pi/2]$; so defining $f(x) = a\sin bx$ for suitable $a,b>0$ will do.

4
On

Function I would suggest is $f(x) =-\frac{\Omega - 20}{1600}x^2+(1+\frac{\Omega - 20}{16})x$ with $20 \leq \Omega < 36$ and $0 \leq x\leq 100$. When $\Omega = 20$ you get $ f(x) = x$. Function also satisfies desired conditions: $$\begin{aligned}f(0) &= 0 \\ \\ f(100) &= -\frac{\Omega - 20}{1600}\cdot 100^2+(1+\frac{\Omega - 20}{16})\cdot 100 \\ &= 100 \\ \\ f(20) &= -\frac{\Omega - 20}{1600}\cdot 20^2+(1+\frac{\Omega - 20}{16})\cdot 20 \\&= -\frac{\Omega - 20}{4}+\frac{5\Omega - 100}{4}+ 20 \\ &= \frac{4\Omega - 80}{4}+ 20 = \Omega \\ \\ f'(x) &= -\frac{\Omega - 20}{800}x+(1+\frac{\Omega - 20}{16}) \\&\geq -\frac{\Omega - 20}{800}\cdot 100+(1+\frac{\Omega - 20}{16})\\&=1-\frac{\Omega - 20}{16}\\&=\frac{36 - \Omega}{16} > 0 \\ \\ f''(x)&= -\frac{\Omega - 20}{800}\leq 0 \end{aligned}$$

Edit: Another function which would work for $20 \leq \Omega < 100$ is $$f(x) = 100 \cdot \left( \frac{x}{100} \right) ^ {-\log_{5}(\frac{\Omega}{100})}$$

It's easy to see that $f(0) = 0$ and $f(100) = 100$ Also

$$f(20) = 100 \cdot \left( \frac{1}{5} \right) ^ {-\log_{5}(\frac{\Omega}{100})} = 100 \cdot \frac{\Omega}{100} = \Omega$$

Proving that $f'(x) > 0$ and $f''(x) \leq 0$ is left as an exercise. ($f''(x) < 0$ when $\Omega \not = 20$)