3
$\begingroup$

The problem I have is really with solving an inequality, but starts as a question referring to alternating series. The question asks: "Express the integral $\displaystyle\int_{0}^\frac{1}{2}\frac{1}{(1+x^6)}dx$ as a series. How many terms are needed to ensure the error is less than 10^-5?"

I understand how to find the series through the following steps: $$\sum_{n=0}^\infty x^n = \frac{1}{1-x}$$ $$\sum_{n=0}^\infty (-x^6)^n = \frac{1}{1+x^6}$$ $$\sum_{n=0}^\infty (-1)^n x^{6n} = \frac{1}{1+x^6}$$ $$\displaystyle\int_{0}^\frac{1}{2}\sum_{n=0}^\infty (-1)^n x^{6n}dx = \sum_{n=0}^\infty \frac{(-1)^n}{(6n+1)2^{6n+1}}$$

Now I am using the error bound for an alternating series to ensure the error is less than 10^-5: $$|s-s_n| < a_{n+1}$$ so in this case: $$a_{n+1} < 10^{-5}$$ $$\frac{1}{(6n+7)2^{6n+7}} < 10^{-5}$$

Now is where I reach my issue with solving the problem. I don't know how to solve for n while it is in the exponent and in the parentheses. I am unsure how to proceed. I tried making the following substitution just to simplify things a bit, but it gets me no where: $$k= 6n+7$$ $$\frac{1}{k2^k} < 10^{-5}$$ $$k2^k > 10^5$$ If it were an equation, I could take the derrivative of both sides and find k, but I can't do that with an inequality. Any insight on how to solve this inequality, or another method to solve this problem would be much appreciated. Any insight will help! Thanks

$\endgroup$
1
$\begingroup$

I would suggest some intelligent trial and improvement.

You know that $k>1$, so $2^k > 10^5 \Rightarrow k2^k > 10^5$

It's much easier to solve $2^k = 10^5$ by taking logarithms:

$k \log_{10}2 = 5 \Rightarrow k = \frac 5{\log_{10}2} \approx 17$.

We have an upper bound $2^{17} > 10^5 \Rightarrow 17 \times2^{17} > 10^5$

Now start trying smaller values:

$16 \times2^{16} = 1048576 > 10^5$

$15 \times2^{15} = 491520 > 10^5$

$14 \times2^{14} = 229376 > 10^5$

$13 \times2^{13} = 106496 > 10^5$

$12 \times2^{12} = 49152 < 10^5$

So you need $k \ge 13$. Using that with $k=6n+7$ will give you $n$.

$\endgroup$
1
$\begingroup$

Let us change the problem from $$\frac{1}{(6n+7)2^{6n+7}} < 10^{-5}$$ to something more general $$\frac{1}{m \,a^{m}} <\epsilon$$ which wil cover all situations of this kind.

So, you need to solve for $m$ equation $$m\, a^m=\frac 1 \epsilon$$ the only explicit solution of which being given in terms of Lambert function

$$m=\frac{W\left(\frac{\log (a)}{\epsilon }\right)}{\log (a)}$$ The Wikipedia page shows many examples of the required manipulations of expressions required to arrive to it.

This function is available in many environments but can be easily approximated when the argument is large (as in this case). You will find in the Wikipedia page approximations $$W(z)=L_1-L_2+\frac{L_2}{L_1}+\frac{L_2(L_2-2)}{2L_1^2}+\cdots \qquad (L_1=\log(z) \qquad L_2=\log(L_1))$$ Considering your case $a=2$, $\epsilon=10^{-5}$, $z=10^5 \log(2)$ and then the above expansion will give $$W(10^5 \log(2))\approx 8.9556$$ from which $m\approx 12.9202$.

If you do not want to use Lambert function, the only way is to solve the equation using a numerical method such as Newton. The most convenient way (at least to me) is to write the equation as $$f(m)=m\log(a)+\log(m)+\log(\epsilon)$$ $$f'(m)=\log(a)+\frac 1m$$ which will give as iterates $$m_{n+1}=-\frac{m_n (\log (m_n)+\log (\epsilon )-1)}{m_n \log (a)+1}$$ Using with your data and being lazy (starting using $m_0=1$), the iterates will be $$\left( \begin{array}{cc} n & m_n \\ 0 & 1 \\ 1 & 7.39034 \\ 2 & 12.6895 \\ 3 & 12.9181 \\ 4 & 12.9183 \end{array} \right)$$

Starting with $m_0=L_1$ would be much faster as shown below $$\left( \begin{array}{cc} n & m_n \\ 0 & 11.1464 \\ 1 & 12.9037 \\ 2 & 12.9183 \end{array} \right)$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.