2
$\begingroup$

Firstly, I have to say that I don't understand Padé approximation well.
But I discovered that, it is more precise than Taylor series.
I have to create approximation for these functions: Log(x) and Tanh. And I have to create iterative algorithms (I must compute result with variable precision).

So my questions are:
Is Padé approximation usable (and more efficient than simple Taylor series) for this task?
If yes, is there any paper or something about this?
If no, is there any better way to approximate these functions?

$\endgroup$

1 Answer 1

4
$\begingroup$

A qualitative reason for using rational approximations (e.g. Padé) instead of polynomial ones (e.g. Taylor) is that rational approximations can exhibit behavior (e.g. poles and asymptotes) that polynomials are hard-pressed to emulate; they thus tend to be slightly more accurate (there are always exceptions, though).

What you can do that is equivalent to using a Padé approximant (SFAICT, there's no simple method for generating the coefficients of the numerator and denominator polynomials for the two functions you have, except by solving the appropriate Toeplitz system) is to use continued fraction expansions, which $\ln(1+x)$ and $\tanh(x)$ have by their virtue of being expressible as hypergeometric functions.

Of course, for proper use, you have to perform appropriate argument reductions (e.g. for $\tanh$, compute $x^{\star}=\frac{x}{2^n}$ where $n$ is an appropriate integer such that $x^{\star}$ is "small" enough, evaluate the continued fraction at $x^{\star}$, and use the double-argument formula for $\tanh$ to undo your previous transformation).

For evaluating continued fractions, a (reasonably) robust way of going about it is to use the "modified Lentz method" due to Lentz, Thompson, and Barnett; the algorithm's details are in Numerical Recipes or Gil/Segura/Temme's Numerical Evaluation of Special Functions.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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