2

What is the best way to estimate the truncated exponential ?

$$f(x,k) = \sum_{n = 0}^{k} \frac{x^n}{n!} $$

By estimate I mean some kind of asymptotic and/or faster and simpler way to compute its value at least approximately. Something that requires less computation.

Im considering real $x$ here, in particular $x>0$ and large positive $x$.

I am aware of some ideas and of course they can be combined.

A few examples :

  1. There is "closed form " in terms of a ratio of (incomplete) gamma functions.

$$f(x,k) = \frac{\exp(x) \Gamma(k + 1,x)}{\Gamma(k + 1)}$$

However I rarely see a good estime for the incomplete gamma function with it.

It feels like turning the truncated exp problem into the truncated gamma problem.

  1. The highest term. And/or the term being closest to 1 gives some ideas. And similar ideas.

for instance we consider

$$y^m/m!$$ close to 1. so we know that terms beyond this $m$ th term contribute little value.

Similarly

$$y^l/l!$$ being the largest term for a given $x$. so we know that this $l$ th term contributes the most.

Related are theories like Wiman-Valiron.

https://en.wikipedia.org/wiki/Wiman-Valiron_theory

and the idea from " fake function theory " that approximately

$a_n < min[f(x)/x^n]$.

where $a_n$ is the n'th taylor coefficient.

See : https://sites.google.com/site/tommy1729/fake-function-theory

  1. For all x (in particular the small x) the taylor polynomial error terms ofcourse.

There are quite a few.

Lagrange remainder, Cauchy remainder, Schlömilch remainder (Cauchy and Lagrange belong to it), integral remainders , special case conditional remainders etc

  1. Tommy, my mentor, suggested this

$$f'(x,k) = f(x,k) - \frac{x^k}{n!}$$

So

the ratio $f'(x)/f(x)$ is not 1 and you get some kind of "local exponent" v ;

$$v = \frac{f(x,k)- \frac{x^k}{n!}}{f(x,k)}$$

giving some insight.

  1. truncating the limit , for large n : $(1+ x/n)^n$ and the alike.

My mentor often uses this when $x << n$ :

$$ \exp(x) = (\frac{n^2 + x/2 n + x^2/9}{n^2 - x/2 n + x^2/9})^n $$

(Notice $n^2 + x/2 n + x^2/9$ has no zero's on the real line)

what relates to padé approximation, least squares curve fitting and the simple facts $\exp(-x) = 1/\exp(x)$ and $\exp(x/n)^n = \exp(x) = = (1 + x/n + ...)^n$.

  1. Another idea might be to use Borel transforms.

Afterall we know

$$1 + x + x^2 + x^3 + ... x^u = \frac{x^{u+1}-1}{x-1}$$

Or say something like

$$e^{-y}\sum_{k=0}^{x-1}\frac{y^k}{k!}=\int_y^{\infty}e^{-t}\frac{t^{x-1}}{(x-1)!}dt$$

might help ?

  1. Maybe integrating some integrand that approximates $x^n/n!dn $ but has a closed form ?? Not sure what that would be.

etc etc

There are probably millions of ideas.

What is the best one ?


edit :

As talked about in the comment by HackR and myself , often the quality of approximation is dependant on the ratio $x/k$.

For instance

$$(1+x/n)^n$$

is equal to $2^n$ or equivalently $2^x$ when $x=n$.

When $n > 1 + x + x^2$ however it is pretty close to $\exp(x)$.

I think all methods above are better than this, but this example works very well as a good and clear example.

This is a limit example but sums and products and integrals can suffer the same situation.

How sensitive the connection $x$ to $k$ is in general is a difficult question.

It might suggest that an optimal method is a function of $x,k$ and $x/k$ or so.



I found this one

Maclauren series of $ (1+x)^{1/x} $

What naturally relates to

$$\lim_{x \to \infty} (1 + y/x)^x = \exp(y)$$

In particular for $y$ close to $1$ and $x$ growing.



Also related are these :

Partial sums of exponential series

And even more so

Evaluating $\lim\limits_{n\to\infty} e^{-n} \sum\limits_{k=0}^{n} \frac{n^k}{k!}$


mick
  • 17,886
  • Have a look: https://math.stackexchange.com/questions/4984199/is-it-possible-to-calculate-sum-i-1x-fracaix-i/4984331#4984331 – van der Wolf Oct 15 '24 at 14:12
  • 2
    It's already a finite sum of basic arithmetic terms, so why estimate it instead of using its exact value? Can you describe what requirements you have for "estimating"? – 2'5 9'2 Oct 15 '24 at 14:49
  • @2'59'2 see the huge edit – mick Oct 15 '24 at 16:42
  • 1
    Are you allowed to use exponentials to approximate this? – HackR Oct 15 '24 at 17:00
  • @HackR yeah. Im curious what you got – mick Oct 15 '24 at 17:00
  • 1
    The approximation I am trying seems to require you to choose $k$ depending on $x$ for a good match. Like, if you want to approximate for $x=13$, you need to choose $k$ to be around 48. I will see if I can separate the dependency. – HackR Oct 15 '24 at 17:07
  • @HackR such behaviour is typical. Like $(1+x/n)^n$ is close to $2^x$ if if $x$ is about equal to $n$ - obviously since 1+1 = 2 - and close to exp if $n = 1 + x + x^2$ Good luck with your attempt. I appreciate it. – mick Oct 15 '24 at 18:11

0 Answers0