I need to evaluate the inverse of this function in the domain [0,1):
There is an analytic inverse (which I won't bother putting here as it's quite big), but it only works for a limited range of the constant A, i.e. if A>0.385f(x). Then, I thought of two possible solutions:
- Use Newton-Raphson method (or any other root-finding method) to evaluate the x for each f(x);
- Approximate the inverse with a sigmoid function and determine the parameters through least-squares.
I am tending towards (2), since it seems simple enough and doesn't slow down my code, as (1) might, but I'm insecure about the validity of the approximation. I'd also appreciate other suggestions.
My code is in C++, if there is some built-in way of solving my problem.