Hello 


I want to approximate a function $f$ on $(a,b)$. The function is singular at the points $a$ and $b$, however I have asymptotic expansions at these points. I can also construct Taylor polynomials for any point of expansion $x\_i \in (a,b)$ of finite order $N\_i$,


$$
 \sum\_{n=0}^{N\_{i}}\frac{f^{(n)}(x\_{i})}{n!}(x-x\_{i})^{n}.
 $$


I'm not a 100% on how to bound the remainder, the taylor coefficients are given recursively and hard to examine. However I know for certain that $f$ is a strictly increasing function and I "think" its derivatives behave much like the derivatives of $tan(x)$. So for a closed subinterval of $(a,b)$, the nth order derivative $f^{(n)}(x)$ attains its maximum at the endpoints. Based on this conjecture one could put a bound on Lagrange's remainder. 


So with what I have I am interested in building an approximation algorithm, and was hoping to collect other peoples thoughts ... what would be a reasonable or rather a good way to go about this? 


As a first step I was thinking maybe, for a given tolerance $\epsilon$, find the intervals $(a,a\_0]$ and $[b\_0,b)$ on which the asymptotic expansions are valid. 


Then on the interval $[a\_0,b\_0]$ perhaps use one or more Taylor series expansions for the approximation. I say more than one because its expensive to compute the coefficients and speed is a concern for me. I'm happy enough with this basic algorithm but is there a better way. Perhaps choosing the points at which the Taylor polynomials are constructed and the degree of the polynomials in an optimal or efficient way. 


Then as an alternative or extension, I was thinking maybe to combine the information from the Taylor Polynomials at the points $a\_0=x\_0 < x\_1 < \cdots < x\_M=b\_0$ to construct a multipoint Pade approximation, but i'm not sure what the optimal way to do this is. How could the error be controlled? 


Then of course one could economize the approximations etc. There's a host of possibilities. And I'm hoping to get some feedback from an experienced numerical analyst to save my self some time and exploring dead ends. What type of algorithms would you devise given what I have?


If it matters, I can also compute $f(x)$ to within a desired tolerance using a slow numerical scheme. But I dont mind doing this if it helps me control the error.



Approximation:- Algorithmic considerations
First of all, if you need a polynomial approximation, I'd rather rescale $f$ to put it on $(-1,1)$ and interpolate it at the Chebyshev nodes <http://en.wikipedia.org/wiki/Chebyshev_nodes>. Furthermore, instead of using the monomial basis, as for Taylor polynomials, it is better to expand the function in a series of Chebyshev polynomials, and truncate it at a certain value. Next, multipoint Padé approximants (rational interpolants) work well at the Chebyshev nodes too. Finally, if you can allow for some algebraic functions as interpolants, you can try to approximate first a function of the form $h= f g$, where $g$ is a known function such that $h$ has no singularities at the end points.


Btw, you might want to check out the Chebfun project <http://www2.maths.ox.ac.uk/chebfun/> where several of the ideas mentioned here are nicely implemented.


