Simple function with a couple of properties

205 Views Asked by At

Please supply any simple function $f(x | p)$ which the following properties:

  1. $f(0 | p) = 0$ and $f(1 | p)=0$
  2. $f'(0 | p) = 0$ and $f'(1 | p)=0$
  3. $f(x | p)>0$ for $0<x<1$
  4. For $0<x<1$ there is one maxima at $p$: $f'(p | p)=0$ (for $0<p<1$)
  5. $f(x | p)$ is continuous and differentiable for the interval $[0,1]$

It would look like a skewed bell shape within the interval $[0,1]$, for which the place of the peak is given by $p$.

Edit: A simple function such as $f(x) = x^2 (1-x)^2$ satisfies all requirements but 4. How would I modify it such that it's maxima is at $p$ instead of $0.5$?

If you could help me, then that would be great!

2

There are 2 best solutions below

7
On

Read about bump functions at http://en.wikipedia.org/wiki/Bump_function. The function $\Psi$ in the section "Examples" is a classic one, and you can find its graph there as well. It should be easy enough to modify this function by shifting and scaling to meet your requirements.

Bear in mind that there are infinitely many examples of the sort of function you describe. But I think most mathematicians would probably come up some variant of this one.

0
On

For a function $f(x)=x^2 (1-x)^2$ we can introduce skewness by mapping the input via a non-linear function $x = g(y)$ for which $g(0)=0$ and $g(1)=1$. For example, let's take the function $g(y) = y^a$. For $a>1$ we'll see that $f(g(y))$ will be skewed to the left, and it will be skewed to the right for $0<a<1$.

Note that $f'(y) = 0 $ for $ a = - \frac{\log 2}{\log x} $ and so the function $h(x) = (x^{- \ln 2/\ln p})^2*(1-x^{- \ln 2/\ln p})^2 $ meets all the requirements.