Reminder|apology: Math-fun doesn't do attachments, so this is Macsyma's 40+ year old way of displaying Sums and Products on a teletype. You'll need to switch your mail reader to a fixed pitch font, e.g., Courier. Actually, this is a way to evaluate any finite or infinite sum of a rational function a(n), provided you can express the poles and roots of 1-x*a(n) (as a fn(n)), and therefore the product(1-x*a(n)) in terms of Gammas|factorials. For any f, this is a telescoping identity: sum(f(n)*prod(1-f(k)*z,k,0,n-1),n,0,m) = (1-prod(1-f(k)*z,k,0,m))/z m /===\ | | m n - 1 1 - | | (1 - f(k) z) ==== /===\ | | \ | | k = 0 (d154) > f(n) | | (1 - f(k) z) = ---------------------- / | | z ==== k = 0 n = 0 It's 0=0 for m=-1, and differencing both sides wrt m finishes the induction. So now let m=oo and f(x) = (-)^x/(2x+1): (c155) subst([m = inf,f = lambda([x],(-1)^x/(2*x+1))],%) n - 1 inf /===\ k /===\ k n | | (- 1) z | | (- 1) z inf (- 1) | | (1 - --------) 1 - | | (1 - --------) ==== | | 2 k + 1 | | 2 k + 1 \ k = 0 k = 0 (d155) > --------------------------- = ------------------------ / 2 n + 1 z ==== n = 0 Bisect the rhs product to ditch the (-)^k, because the CLOSEDFORM command is stupid: (c156) resimplify(substpart(linchange(piece,2*k),%,2)) n - 1 /===\ k n | | (- 1) z inf (- 1) | | (1 - --------) ==== | | 2 k + 1 \ k = 0 (d156) > --------------------------- = / 2 n + 1 ==== n = 0 inf /===\ | | z z 1 - | | (1 - -------) (------- + 1) | | 4 k + 1 4 k + 3 k = 0 ------------------------------------- z CLOSEDFORM the rhs (it's actually smart enough to do both): (c157) substpart(closedform(piece),%,2) n - 1 /===\ k n | | (- 1) z inf (- 1) | | (1 - --------) ==== | | 2 k + 1 \ k = 0 (d157) > --------------------------- = / 2 n + 1 ==== n = 0 %pi z %pi 1 - sqrt(2) cos(----- + ---) 4 4 ---------------------------- z Now let z -> 0, again sidestepping cleverness on the left: (c158) subst(0,z,lhs(%)) = limit(rhs(%),z,0) inf ==== n \ (- 1) %pi (d158) > ------- = --- / 2 n + 1 4 ==== n = 0 --rwg Another use for (d154): f(k) := q^k gets a sum for q-Pochhammer which is easy to accelerate.