0

For this infinite product, what is the error or remainder term? Thanks!

$$\prod_{k=0}^na_k=\left(1\pm\frac{x}{2^n}\right)^{\pm2^n}$$

If x >= 0 then,

$$a_0=1+x,\qquad a_{n+1}=\left(1+\frac{x^2}{2^{n+2}(x+2^n)}\right)^{2^n}$$

If x <= 0 then,

$$a_0=\frac1{1-x},\qquad a_{n+1}=\left(1-\frac{x^2}{(2^{n+1}-x)^2}\right)^{2^n}$$

Python code:

import mpmath

def exp_err(x, ipow2): n = mpmath.mpf(2)ipow2 return mpmath.fabs(mpmath.exp(x) - (1 + x/n)n)

for x in [3, 7, 15, 31, 63]: for iprec, ipow2 in [(64, 32), (128, 64), (256, 128)]: mpmath.mp.prec = iprec err = exp_err(mpmath.mpf(x), ipow2) flog2 = mpmath.log(err, 2) print(f"# For x={x:,} and n=2{ipow2}, the error term is 2{round(flog2, 8)}")

For x=3 and n=232, the error term is 2-25.50198988

For x=3 and n=264, the error term is 2-57.50198988

For x=3 and n=2128, the error term is 2-121.50198988

For x=7 and n=232, the error term is 2-17.28642488

For x=7 and n=264, the error term is 2-49.28642487

For x=7 and n=2128, the error term is 2-113.28642487

For x=15 and n=232, the error term is 2-3.54579322

For x=15 and n=264, the error term is 2-35.5457932

For x=15 and n=2128, the error term is 2-99.5457932

For x=31 and n=232, the error term is 221.6319388

For x=31 and n=264, the error term is 2-10.36806111

For x=31 and n=2128, the error term is 2-74.36806111

For x=63 and n=232, the error term is 269.84434708

For x=63 and n=264, the error term is 237.84434742

For x=63 and n=2128, the error term is 2-26.15565258

See also Exponential Function as an Infinite Product

Axl
  • 109
  • Check the referenced question, my guess is that this equation is derived from $$e^x = \lim_{n\to\infty} (1 + x/n)^n$$ – Axl Sep 09 '24 at 21:32
  • 1
    Post has been edited to include definitions for a_k. X can be any number although the terms will depend on if x is positive or negative. – Axl Sep 09 '24 at 21:40

1 Answers1

2

Taking the logarithm, the RHS yields

$$\pm 2^n\log\left(1\pm\frac x{2^n}\right)=\pm2^n\left(\pm\frac x{2^n}-\frac12\frac{x^2}{2^{2n}}\pm\frac13\frac{x^3}{2^{3n}}+\cdots\right)\\ =x\mp\frac12\frac{x^2}{2^{n}}+\frac13\frac{x^3}{2^{2n}}\mp\cdots$$

For $n$ large enough, we can limit the development to the first two terms, and the product is about

$$e^xe^{\mp x^2/2^{n+1}}\approx e^x\left(1\mp\frac{x^2}{2^{n+1}}\right).$$

Next approximation, to the fourth order,

$$e^x\left(1\mp\frac{x^2}{2^{n+1}}+\frac{x^4}{2^{2n+3}}\right)\left(1+\frac{x^3}{3\cdot 2^{2n}}\right)\left(1\mp\frac{x^4}{2^{3n+2}}\right)$$