ReplaceAll

• To: mathgroup at smc.vnet.net
• Subject: [mg90372] ReplaceAll
• From: Bruce Colletti <bwcolletti at verizon.net>
• Date: Tue, 8 Jul 2008 02:22:27 -0400 (EDT)

```Re Mathematica 6.0.2 under WinXP.

Why doesn't the following substitute x for b'**b (appears in the third, fourth, sixth and seventh summands)?  (a**b')**b/.b'**b->x does.

Thankx.

Bruce

In[1]:= M=b**a'-a**b';
Distribute[M**M**M,Plus]/.b'**b->x

Out[2]= (-a**b^\[Prime])**(-a**b^\[Prime])**(-a**b^\[Prime])+b**a^\[Prime]**(-a**b^\[Prime])**(-a**b^\[Prime])+(-a**b^\[Prime])**b**a^\[Prime]**(-a**b^\[Prime])+(-a**b^\[Prime])**(-a**b^\[Prime])**b**a^\[Prime]+b**a^\[Prime]**b**a^\[Prime]**(-a**b^\[Prime])+b**a^\[Prime]**(-a**b^\[Prime])**b**a^\[Prime]+(-a**b^\[Prime])**b**a^\[Prime]**b**a^\[Prime]+b**a^\[Prime]**b**a^\[Prime]**b**a^\[Prime]

```

• Follow-Ups:
• Prev by Date: Extracting points from a contour plot
• Next by Date: Minimum input for GroebnerBasis
• Previous by thread: Fwd: Extracting points from a contour plot
• Next by thread: Re: ReplaceAll