Re: ReplaceAll and ReplaceRepeated Strange Behavior
- To: mathgroup at smc.vnet.net
- Subject: [mg111483] Re: ReplaceAll and ReplaceRepeated Strange Behavior
- From: Mark Adler <madler at alumni.caltech.edu>
- Date: Tue, 3 Aug 2010 06:35:37 -0400 (EDT)
- References: <i368o4$r81$1@smc.vnet.net>
On 2010-08-02 04:04:36 -0700, blamm64 said:
> eff = (L*(-L*mu+dm*Pi*Cos[b]))/(dm*Pi*(dm*Pi*mu+L*Cos[b]))
> eff /. {dm*Pi -> L/Tan[a]}
> L*(-L*mu+L*Cos[b]*Cot[a])/(dm*Pi*(L*Cos[b]+L*mu*Cot[a]))
I find that FullForm usually illuminates what's going on. In this case
that particular dm*Pi doesn't show up as Times[dm,Pi,...], but rather
this:
Times[Power[dm, -1], L, Power[Pi, -1], ...]
That is why the rule is not finding Times[dm, Pi, ...].
Mark