4
$\begingroup$

I have a smooth enough injective function $f:[a, b]\to \mathbb{R}$ which I want to approximate by something that can be computed quickly, e.g., a Padé approximant of low degree, $$ \frac{\sum_{j=0}^m a_j x^j}{1 + \sum_{k=0}^n b_k x^k}. $$ At the same time, though, I also need the inverse of the approximating function to be computed quickly, so Padé will give me a hard time even with low degrees.

Any ideas?

$\endgroup$
  • 2
    $\begingroup$ Why not approximate the inverse function itself ? You can also use this to get a good initial guess to find the true inverse of the forward function by some root finding technique. $\endgroup$ – cpraveen Sep 2 at 13:53
  • $\begingroup$ @cpraveen I need both $F_{approx}$ and $F_{approx}^{-1}$. $\endgroup$ – Nico Schlömer Sep 2 at 16:39
  • $\begingroup$ Is there a reason for computing $(F_{\mathrm{approx}})^{-1}$ instead of $(F^{-1})_{\mathrm{approx}}$? If the approximation is sufficiently good, the difference would be negligible anyway, no? $\endgroup$ – Kirill Sep 2 at 17:08
  • $\begingroup$ @Kirill I'll have to evaluate the approximant and its inverse many times, and the inversion will have to be exact. I'd have to go into much detail to explain why, but I think this condition by itself is not too wild. $\endgroup$ – Nico Schlömer Sep 2 at 17:50
  • 2
    $\begingroup$ @NicoSchlömer Would $(F^{-1})_{\mathrm{approx}}$ be accurate enough that it can be used as an initial guess for just one Newton iteration to get $(F_{\mathrm{approx}})^{-1}$? That seems like it would be cheap and produce an exact inversion, but also avoid inverting hard functions. $\endgroup$ – Kirill Sep 2 at 21:25
5
$\begingroup$

I think this is a really cool question, which might have a really cool answer, if someone was willing to think about it hard enough to publish on.

But when we're talking smooth functions which need to be evaluated quickly, I reach for B-splines. Create the pairs $\{x_j, f(x_j)\}_{j=1}^{n}$, and use (say) a cubic B-spline (here's an implementation for the equispaced case-many other implementations exist, say, in scipy), and then for the inverse function, just pass in $\{f(x_j), x_j\}_{j=1}^n$.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.