1
$\begingroup$

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.

  • 0
    Consider the first term that's less than $10^{-6}$ or so...2011-11-14
  • 0
    @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.2011-11-14
  • 0
    Then, why not just write the appropriate loop and make a conjecture (which you can subsequently prove)?2011-11-14

1 Answers 1

2

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$.

  • 0
    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 terms2011-11-14
  • 0
    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.)2011-11-14