3

$\int_0^{0,2}\frac{1-e^{-x}}{x}dx$

I was trying to compute integral,cause it'll look like alternative series.

I'm stuck and have troubles to calculate this integral.

in first task,that looked like this $$\sum_{n=1}^{\infty}(-\frac{2}{9})^n$$ accurate to $$\alpha=0,0001$$

I used principle of alternative series that I noticed,because $$\ a1=-\frac{2}{9}$$ $$\ a2=\frac{4}{81}$$ $$\ a3=-\frac{8}{729}$$ till $$\ a8=\frac{256}{43046721}$$

and I summarize till $\ a8$ and I made it accurate to $\ 0,0001$

I need to somehow make it like this,but I'm so confused...

Thanks for helping in advance!

  • 2
    Could you edit your question to include precisely what you have done with alternating series and where you got stuck? – Henry Dec 01 '23 at 17:30
  • Wolfeam solves this https://www.wolframalpha.com/input?i=int+%5B%2F%2Fmath%3A%281-e%5E%28-x%29%29%2Fxdx%2F%2F%5D+from+%5B%2F%2Fmath%3Ax%2F%2F%5D%3D%5B%2F%2Fmath%3A0%2F%2F%5D+to+%5B%2F%2Fmath%3A0.2%2F%2F%5D – FriendlyNeighborhoodEngineer Dec 01 '23 at 17:38
  • @Henry I edit my question – Akane123 Dec 01 '23 at 20:46
  • I am not sure where your $\frac29$ geometric series comes from. You could start with $e^{-x} = 1-x+\frac{x^2}{2!}-\frac{x^3}{3!}+\frac{x^4}{4!}-\cdots$, then do the subtraction and division, and then the integration term by term, and then spot with an alternating series you are more than accurate enough – Henry Dec 01 '23 at 21:34
  • @Akane123 Would you please unaccept my answer which is not simple. Using the alternative series is simple enough. – River Li Jan 12 '24 at 01:27

4 Answers4

2

The other answer is better. So I delete my answer.

River Li
  • 37,323
1

For the integral, since the width is $0.2$, if you approximate the function with a polynomial (or any other function you can integrate) with an error less than $r$, then the error of the integral will be less than $0.2*r$.

For the summation, the error in approximating $\sum_{n=0}^{\infty} a^n$ by the first $m$ terms is $\sum_{n=m}^{\infty} a^n$. Compute this and bound it.

marty cohen
  • 107,799
1

Making the problem more general $$\int_0^{a}\frac{1-e^{-x}}{x}\,dx=\int_0^{a}\sum_{n=0}^\infty (-1)^n \frac{x^n}{(n+1)!}\,dx=\sum_{n=0}^\infty (-1)^n \frac{a^{n+1}}{(n+1)\,(n+1)!}$$

So, since it is alternating, you are looking for $p$, the number of terms to be added, such that $$R_p=\frac{a^{p+2}}{(p+2) (p+2)!} \leq 10^{-k}$$ that is to say $$(p+2) (p+2)! \sim (p+3)! \geq a^{p+2}\,10^k$$

If you look at this old post of mine, using @robjohn's approximation, we have, as a real,

$$p \sim a \,e^{1+W(t)}-\frac{7}{2} \quad \text{where} \quad t=\frac{2 k \log (10)-\log \left(2 \pi a^3\right)}{2 e a}$$

$W(.)$ being Lambert function.

Applied to your case where $a=\frac 15$ and $k=4$, this gives $p=1.37875$ that is to say $\lceil p\rceil=2$. You can check that $$R_2=\frac { \left(\frac{1}{5}\right)^4} {4 \times 4! } = \frac{1}{60000} < 10^{-4}$$

To give you an idea of the accuracy, the solution of $$(p+2)\,(p+2)! = \left(\frac{1}{5}\right)^{p+2}\, 10^4$$ is $p=1.46062$

Edit

Now, be more requiring using $a=1$ and $k=20$. The formula will give $p=18.2179$ that is to say $\lceil p\rceil=19$

1

I am not sure where your $\frac29$ geometric series comes from.

You could look at

  • $e^{-x} = 1-x+\frac{x^2}{2!}-\frac{x^3}{3!}+\frac{x^4}{4!}-\cdots$
  • $1-e^{-x} = x-\frac{x^2}{2!}+\frac{x^3}{3!}-\frac{x^4}{4!}+\cdots$
  • $\frac{1-e^{-x}}{x}= 1-\frac{x}{2!}+\frac{x^2}{3!}-\frac{x^3}{4!}+\cdots$
  • $\int \frac{1-e^{-x}}{x}\,dx = x-\frac{x^2}{2\times2!}+\frac{x^3}{3\times3!}-\frac{x^4}{4\times 4!}+\cdots + c$
  • $\int_0^{0.2} \frac{1-e^{-x}}{x}\,dx = \frac15-\frac{1}{100}+\frac{1}{2250}-\frac{1}{60000}+\cdots $

and the truncation error in this alternating series is smaller than the last term shown so smaller than $0.0001$, so the integral is about the sum of those term, about $0.190428$, and rounded is about $0.1904$.

Henry
  • 157,058