1
$\begingroup$

I have a function of the form

$ f(k)=\frac{1}{a_1-a_{2}k^2e^{-(a_{3}-a_{4}k^2)}};\quad k=0...n$

I approximated it with Taylor series expansion around $k=\frac{n}{2}$, but the results is not very precise (transformation of the function in order to obtain different intervals on the argument, e.g. $[0,1]$ did not work well either).

Are there other general-purpose polynomial expansions in place that yield sharper bounds?

  • 0
    What is the purpose of the expansion? This formula is not expensive to calculate, so why not use it? As Robert Israel said, the Chebyshev polynomials are based over the whole interval, so should give a better fit. As the $(k-n/2)$ multiplier in the Taylor series goes up to $n/2$, if your coefficients aren't decreasing by this much per order, you haven't even started to converge.2011-08-03

2 Answers 2

3

Your problem is probably caused by the fact that the denominator can go to zero and polynomials do not fit poles well. Even if your $a$'s are such that the denominator cannot go to zero, nearby poles in the complex plane can ruin your day. You might be interested in a rational function (a ratio of polynomials) instead. There should be any information in any numerical analysis book. Section 3.2 of Numerical Recipes discusses this and the obsolete versions are free.

  • 1
    @sigma.z.1980: reciprcocating another function refers to the fact that you are dividing by $a_1-a_{2}k^2e^{-(a_{3}-a_{4}k^2)}$ I think we can guarantee this has zeros, which means your function has poles. It matters$a$lot whether they are close or far away, and without the $a$'s we can't tell. If they are within the circle centered on n/2 with radius n/2 the Taylor series won't converge at all. If they are close it will converge slowly. Robert Israel gives an example where the rational approximation is much better. I would expect that to be normal.2011-08-05
2

Taylor series provide a very good approximation for a function near a particular point, but are often poor approximations farther away. If you want to approximate a continuous function on an interval, you might try Chebyshev series. If you want the best possible approximation (in infinity norm) by polynomials of a given degree, you can try the Remez algorithm.

  • 0
    On the other hand, asking for a rational approximation with numerator and denominator of degree 4 I get ${\frac { 1.836509916- 0.9917795120\,x+ 1.471185234\,{x}^{2}- 0.5637244264\,{x}^{3}+ 0.3097614226\,{x}^{4}}{ 1.836507496- 0.9914826398\,x- 2.207962497\,{x}^{2}+ 1.469524317\,{x}^{3}+ 0.1023759036\,{x}^{4}}}$ with maximum error of about 0.00000132.2011-08-03