Approximate $\int_0^\pi e^{e^x} dx$

495 Views Asked by At

On the MIT $2021$ Integration Bee Qualifying Exam, it asked to approximate $$ \int_{0}^{\pi}{\rm e}^{{\rm e}^{x}}\,{\rm d}x $$ I got $\displaystyle{\rm e} + {\rm e}^{\rm e} + {\rm e}^{{\rm e}^{2}} + {\rm e}^{{\rm e}^{3}}$, which is about $4\ \%$ off the exact answer. How do I make a better approximation ( given the fact that you have graphing paper and no calculators allowed ) $?$.

3

There are 3 best solutions below

3
On BEST ANSWER

Performing the change of variables $t=\mathrm{e}^x$, using the fact that the exponential integral grows exponentially, and using the first two terms of its asymptotic expansion, $$ \int_{1}^{{\rm e}^\pi } {\frac{{{\rm e}^t }}{t}{\rm d}t} = {\mathop{\rm Ei}\nolimits} ({\rm e}^\pi ) - {\mathop{\rm Ei}\nolimits} (1) \approx {\mathop{\rm Ei}\nolimits} ({\rm e}^\pi ) \approx {\rm e}^{{\rm e}^\pi - \pi } + {\rm e}^{{\rm e}^\pi - 2\pi } \approx 5.056757609 \cdot 10^8 . $$ The relative error is about $0.415\%$. Adding one more term ($+2{\rm e}^{{\rm e}^\pi - 3\pi }$) would reduce the relative error to about $0.0566\%$. (Note that ${\mathop{\rm Ei}\nolimits} (1) \approx 1.895$ is indeed negligible.)

3
On

I am not sure if the answer supposed to be this, but:

$$ \int_0^\pi e^{e^x} dx = \int_0^\pi \sum_{k \ge 0} \dfrac{e^{kx}}{k!} dx = \sum_{k \ge 1} \dfrac{e^{k\pi} - 1}{k \cdot k!} = S_1 - S_2 $$

For $S_1$ and $S_2$ you can approximate it with exponential integral.

1
On

The substitution $$t = \exp \exp x, \qquad dt = \exp (x + \exp x) \,dx ,$$ gives $$\int_0^\pi \exp \exp x \,dx = \int_e^{\exp\exp\pi} \frac{dt}{\log t} ,$$ and then applying integration by parts yields $$\int_e^{\exp\exp\pi} \frac{dt}{\log t} = \left.\frac{t}{\log t}\right\vert_e^{\exp\exp \pi} + \int_e^{\exp\exp \pi} \frac{dt}{\log^2 t} = \frac{\exp \exp \pi}{\exp \pi} - e + \int_e^{\exp\exp \pi} \frac{dt}{\log^2 t}.$$ The integrand of this latter integral decays much more rapidly than the integrand of the original integral in $t$, so we expect that $\int_e^{\exp\exp \pi} \frac{dt}{\log^2 t} \ll \int_e^{\exp\exp\pi} \frac{dt}{\log t}$ and hence that the original integral has value $$\int_0^\pi \exp \exp x \,dx \approx \frac{\exp \exp \pi}{\exp \pi} .$$ This approximation turns out to have value $\approx 4.84729 \cdot 10^8$, whereas the original integral has value $\approx 5.07774 \cdot 10^8$, a relative error of $\approx -4.5\%$.

For a better approximation, we can apply integration by parts again to give $$\int_e^{\exp\exp \pi} \frac{dt}{\log^2 t} = \frac{\exp \exp \pi}{\exp 2 \pi} - e+ 2 \int_e^{\exp\exp \pi} \frac{dt}{\log^3 t}$$ and hence the first approximation, $$\int_0^\pi \exp \exp x \,dx \approx \frac{\exp \exp \pi}{\exp \pi} + \frac{\exp \exp \pi}{\exp 2 \pi} = \frac{\exp \exp \pi}{\exp \pi}\left(1 + \frac{1}{\exp \pi}\right) \approx 5.05676 \cdot 10^8,$$ from Gary's good answer, which again has relative error $\approx -0.41\%$. In fact, continuing to apply integration by parts yields the asymptotic expansion of the exponential integral, $\operatorname{Ei}(x)$, whose truncation was used in that answer.

The original question from the bee, by the way, asks you to report your estimate in scientific notation. Since you don't have a calculator available, here's a quick way to do so by hand using the first approximation above: Using the well-known and surprisingly good approximation $\exp \pi \approx 20 + \pi$ (relative error $\approx 0.0039\%$), we get $$\int_0^\pi \exp \exp x \,dx \approx \frac{\exp\exp\pi}{\exp \pi} \approx \frac{\exp(20 + \pi)}{\exp \pi} = \exp 20 .$$ Now using the well-known approximations $\log 10 \approx 2.3$ (relative error $\approx -0.11\%$), equivalently $\log (10^{10}) \approx 23$, and $e^3 \approx 20$ (relative error $\approx -0.42\%$) thus gives $$\int_0^\pi \exp \exp x \,dx \approx \exp 20 = \frac{\exp 23}{\exp 3} \approx \frac{10^{10}}{20} = 5 \cdot 10^8,$$ which turns out to have a relative error of $\approx -1.5\%$.