I'm looking for a positive function $F(x)$, defined for positive real numbers, with the following properties.

  1. $F(x)$ is expressible with the standard computer math library routines;
  2. $F(x)$ is invertible and its inversion expressible with the standard computer math library routines;
  3. $F'(x)>0$ and $F''\le0$.
  4. at $x\to\infty$: $F'\propto x^{-\gamma}$ with $1<\gamma<2$ a parameter;
  5. at $x\to0$: $F'\to\mathrm{const}$ and $F''\to0$ (ideally $F''\propto x$ in this limit).

I couldn't find anything (despite some extensive search). The first condition really makes it hard. Of course, I could use numerical inversion, but this will be the second choice.

Why do I need this? I want to sample $N$ points at positive $x$ with number density $n\propto x^{-\gamma}$ at large $x$ and continuously differentiable $n(r)=F'(|r|)$ (in particular at $r=0$). I don't want to sample these positions randomly, but equidistantly in the cumulated number $\propto F(x)$, hence the requirement to invert $F(x)$. Also, I don't want to suffer from round-off error more than absolutely necessary (hence preferentially no numerical inversion).

edit So what did I try? $F(x)=x(1+x^{\gamma-1})^{1/(1-\gamma)}$ meets criteria 1-4, but $F''(x)\to\infty$ at $x\to0$

  • $\begingroup$ I assume you also wnat $F$ itself to be "expressible with the standard computer math library routines"? $\endgroup$ Feb 3 '14 at 18:34
  • $\begingroup$ Try $F(x) = 1-(1+x)^{1-\gamma}$. $\endgroup$
    – copper.hat
    Feb 3 '14 at 18:58
  • $\begingroup$ @copper.hat Sorry, that fails: $F''(0)\neq0$. $\endgroup$
    – Walter
    Feb 4 '14 at 8:27
  • $\begingroup$ @Walter: Oops, misread the question. $\endgroup$
    – copper.hat
    Feb 4 '14 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.