a finicky rule
- To: mathgroup at smc.vnet.net
- Subject: [mg41714] a finicky rule
- From: Selwyn Hollis <selwynh at earthlink.net>
- Date: Mon, 2 Jun 2003 04:35:21 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Group, I'm having a difficult time understanding the following behavior. I define this rule: pullx := c_. + (a_.) x_^(p_.) + (b_.)x_^(q_.) -> c + x (a x^(p-1) + b x^(q-1)) and it works here: x^3 + x^2 - 1 /. pullx -1 + x*(x + x^2) but not here: x^3 - x^2 - 1 /. pullx -1 - x^2 + x^3 even though the pattern matches: MatchQ[x^3 - x^2 - 1, pullx[[1]]] True I thought perhaps some simplification was being done on the result, but: (x^2 - x)*x - 1 -1 + x (-x + x^2) Any ideas? (This is 4.1, Mac OS X.) Thanks. ----- Selwyn Hollis http://www.math.armstrong.edu/faculty/hollis