For a long time now I have been trying to figure out how to get your (rgw's) formulas to display correctly on my screen. So far I have failed. I use gmail, in text mode, under windows XP. My browser is the latest firefox. If I cut and paste messages to a text window set to courier font they display perfectly. Is there an easier way, under my setup, which must be a common one?. --JB The problem seems to be in how the mailer handles blanks and maybe tabs. becaise On Wed, Jul 22, 2009 at 6:11 AM, <rwg@sdf.lonestar.org> wrote:
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.
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun