How to find an approximation of power series to correct to within $10^{-7}$ as faster?

363 Views Asked by At

If I approximate a $\displaystyle\int_{0}^{0.5} \frac{1}{1+x^7} dx$ correct to within $10^{-7}$.

How to find it without using a calculator? Now I can't.

I usually calculate every single term, and it takes too much of time.

$$\int_{0}^{0.5} \frac{1}{1+x^7} dx = \frac{1}{2} - \frac{1}{8*2^8} + \frac{1}{15*2^{15}} - \frac{1}{22*2^{22}} + \cdots + \frac{(-1)^n}{(7n+1)2^{7n+1}}$$

$$\int_{0}^{0.5} \frac{1}{1+x^7} dx = \frac{1}{2} - \frac{1}{8*2^8} + \frac{1}{15*2^{15}} - \frac{1}{22*2^{22}} \approx 0.49951374$$

1

There are 1 best solutions below

0
On BEST ANSWER

Just as you did $$\frac 1{1+x^7}=\sum_{i=0}^\infty (-1)^i x^{7i}$$ $$\int_{0}^{a} \frac 1{1+x^7}=\sum_{i=0}^\infty (-1)^i\frac {a^{7i+1}}{7i+1}$$ SInce it is alternating, for a given accuracy $\epsilon$, you need to find $n$ such that $$\frac {a^{7n+1}}{7n+1} <\epsilon$$ Treating $n$ as a continuous variable $7n+1=t$, the solution of $a^t=\epsilon t$ is given in terms of Lambert function $$t=-\frac{W\left(-\frac{\log (a)}{\epsilon }\right)}{\log (a)}$$ For large values of $z$, as here, the Wikipedia page gives the approximation $$W(z)=L_1-L_2+\frac{L_2}{L_1}+\cdots$$ where $L_1=\log(z)$ and $L_2=\log(L_1)$. In the case we are looking at $z=10^7 \log(2)$ which makes $L_1\approx15.7516$ and $L_2=2.75694$ so $t=7n+1=18.9998$ so $n=3$ should be more than sufficient. Checking the value of $t_i=\frac{a^{7i+1}}{7i+1}$ with $a=\frac 12$, we find $$t_2=\frac{1}{491520}\approx 2.03451\times 10^{-6}$$ $$t_3=\frac{1}{92274688}\approx1.08372\times 10^{-8}$$