Computing $\int_{0}^{1\over 2}{\ln(1+x)\over x}dx$. Compute $\int_{0}^{1\over 2}{\ln(1+x)\over x}dx$ with a precision (Accuracy? Error? What is the formal expression?) of 0.01. 
Attempt: First of all: $\ln(x+1)=\sum_{k=1}^{\infty}{(-1)^{k-1}x^k\over k}$. Then: ${\ln(1+x)\over x}=\sum_{k=1}^{\infty}{(-1)^{k-1}x^{k-1}\over k}$ and therefore: $\int_{0}^{1\over 2}{\ln(1+x)\over x}dx=\sum_{m=0}^{\infty}\int_{0}^{1\over 2}{(-1)^{m}x^{m}\over m+1}dx=\sum_{m=0}^{\infty}{(-1)^{m}x^{m+1}\over (m+1)^2}|_{0}^{1\over 2}=\sum_{m=0}^{\infty}{(-1)^{m}\over 2^{m+1}(m+1)^2}$ by the uniqueness of the Taylor series, the last expression is the Taylor series of $\int_{0}^{1\over 2}{\ln(1+x)\over x}dx$. Now I have to find out the extent to which I need to sum up the series addends, so that I maintain the required accuracy. How can I do so? 
 A: We have 
$$\begin{align}
\int_0^{1/2}\frac{\log (1+x)}{x}dx&=\int_0^{-1/2}\frac{\log (1-x)}{x}dx\\\\
&=-\text{Li}_2(-1/2) \tag 1 \\\\
&=\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{2^k\,k^2} \tag 2
\end{align}$$
where $\text{Li}_2$ is the dilogarithm function in $(1)$.  
We note that $(2)$ is the sum of an alternating series of monotonically decreasing terms.  Therefore, the error of the partial sums through $k=K-1$ is given by 
$$\left|\sum_{k=1}^{K-1}\frac{(-1)^{k+1}}{2^k\,k^2}-\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{2^k\,k^2}\right|\le \frac{1}{2^K\,K^2}$$
Thus, if $\frac{1}{2^K\,K^2}<0.01$, then the sequence of partial sums from $k=1$ to $k=K-1$ will have the desired accuracy.  Taking $K=4$, we have $\frac{1}{2^4\,4^2}<0.004<0.01$ and the partial sum is 
$$\sum_{k=1}^{3}\frac{(-1)^{k+1}}{2^k\,k^2} \approx. -0.451388888888889
$$
The value of the integral is approximately 
$$\int_0^{1/2}\frac{\log (1+x)}{x}dx\approx. -0.448414206923646$$
and thus the first three terms have an absolute error of roughly $0.00297468196524253<0.01$.
A: After what you wrote and just as user84413 commented, for a given tolerance equal to $\epsilon$ you need to find the first $n$ such that $\frac{1}{2^{n}n^2}<\epsilon$ or $2^n n^2 >\frac{1}\epsilon$. In the case where $\epsilon$ is not too small, inspection could suffice to find the appropriate value of $n$ where to stop.
But, just for your curiosity, let us consider potentially very small values of the tolerance.
Consider the function $$f(n)=2^n n^2 -\frac{1}\epsilon$$ It is very stiff while its transform (using logarithms) $$g(n)=n\log(2)+2\log(n)+\log(\epsilon)$$ is "nicer". Moreover, this equation as an explicit solution $$n=\frac{2 }{\log (2)}W\left(\frac{1}{2} \sqrt{\frac{1}{\epsilon }} \log (2)\right)$$ where $W(a)$ is Lambert function.
For large values of argument $a$, Lambert function can be approximated using
$$W(a)=L_1-L_2+\frac {L_2}{L_1}+\frac {L_2(L_2-2)}{2L_1^2}+\cdots$$ where $L_1=\log(a)$ and $L_2=\log(L_1)$.
Using this approximation, we find $n=3.10$ for $\epsilon=0.01$, $n=5.19$ for $\epsilon=0.001$, $n=7.50$ for $\epsilon=0.0001$.
Going further, writing $ \epsilon=10^{-k}$, you could show that $n\approx -2+\frac 52 k$.
