Approximate $ \ \large \int_{0}^{1} \frac{e^x-1}{x} dx $

106 Views Asked by At

Approximate $ \ \large \int_{0}^{1} \frac{e^x-1}{x} dx =\int_0^1 (1+\frac{x}{2!}+\frac{x^2}{3!}+\cdots+\frac{x^{n-1}}{n!}+\cdots) dx \ $

for an Error $ \leq 10^{-6} \ $

Answer:

$ \ \large \int_{0}^{1} \frac{e^x-1}{x} dx \\ =\int_0^1 (1+\frac{x}{2!}+\frac{x^2}{3!}+\cdots+\frac{x^{n-1}}{n!}+\cdots) dx \\ =[x+\frac{x^2}{2 (2!)}+\frac{x^3}{3(3!)}+\cdots]_{0}^{1} , \ (Integrating) \\ = 1+\frac{1}{2(2!)}+\frac{1}{3(3!)}+\frac{1}{4(4!)} +\cdots+\frac{1}{n(n!)}+\cdots$

This is a series.

How to approximate for an $ \ Error \leq 10^{-6} \ $ ?

How many term should be included ?

Help me out

2

There are 2 best solutions below

0
On BEST ANSWER

$$\sum_{n\geq N}\frac{1}{n\cdot n!}\leq\frac{N+2}{N}\sum_{n\geq N}\frac{1}{(n+2)n!}=\frac{N+2}{N} \sum_{n\geq N}\left[\frac{1}{(n+1)!}-\frac{1}{(n+2)!}\right]=\frac{N+2}{N(N+1)!} $$ and the RHS is smaller than $2\cdot 10^{-7}$ as soon as $N\geq 10$, hence $$ \sum_{n=1}^{9}\frac{1}{n\cdot n!} = \frac{1205165611}{914457600}=\color{green}{1.3179021}\color{red}{214324}\ldots$$ is an approximation of $I=\int_{0}^{1}\frac{e^x-1}{x}\,dx$ within the given accuracy.


Alternative (Beuker-style) approach. The integral $$ J=\int_{0}^{1}\frac{e^x-1}{x}P_5(2x-1)\,dx $$ is extremely close to zero since $\frac{e^x-1}{x}$ is an entire function. It is related to $I$ via $$ J=4118e-\frac{335777}{30}-I $$ hence $$I\approx 4118e-\frac{335777}{30}=\color{green}{1.317902}\color{red}{927681}\ldots$$

0
On

just a hint

UseTaylor-Lagrange formula

$$e^x-1=\sum_{k=1}^n\frac {x^k}{k!}+\frac {x^{n+1}}{(n+1)!}e^c $$

with $0 <c <x\le 1.$