Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The sum is $\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{k^2+k}$

Question: Determine this sum with 6 correct decimals. And Estimate the truncation error.

Firstly we know the MATLAB uses double precision, from binary number, we could find the smallest possible number that Matlab could use.

$x_s=m\beta^{e}$, let $e=-1022$, m has at most $52$ digits, then, $x_s=2^{-1074}$

And then, $k^2+k=2^{1074}$, this $k$ is the largest number of terms that Matlab could handle.

But I don't know how to continue.

share|cite|improve this question
Consider the first term that's less than $10^{-6}$ or so... – J. M. Nov 14 '11 at 15:08
@J.M. but I think the truncation is operated after summing up all the possible terms. If we cancel all terms which are less than $10^{-6}$, then the lost precision would be very large. – Xingdong Nov 14 '11 at 15:12
Then, why not just write the appropriate loop and make a conjecture (which you can subsequently prove)? – J. M. Nov 14 '11 at 15:14
up vote 2 down vote accepted

This is an Alternating series. The error in approximating the infinite sum with the sum of the first $m$-terms is at most the absolute value of the $m+1$st term. Here $|a_{m+1}|={1\over (k+1)^2+k+1}$; so you just need to figure out when this is less than $0.000001$.

share|cite|improve this answer
you mean we do the truncation before summing up all the terms ? Because if we do that after summing up, there's also the +\- sign for odd\even number of terms – Xingdong Nov 14 '11 at 15:20
I'm saying $|{\rm error}|=|\sum_{k=m+1}^{\infty} {(-1)^{k+1}\over k^2+k} |\le {1\over (k+1)^2+k+1}$. (Also, the error will have the same sign as the $(m+1)st$-term.) – David Mitra Nov 14 '11 at 15:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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