Re: Expand on the RHS of a rule
- To: mathgroup at yoda.physics.unc.edu
- Subject: Re: Expand on the RHS of a rule
- From: a_rubin at dsg4.dse.beckman.com (arthur rubin)
- Date: Thu, 28 May 92 07:26:15 PDT
athos at warp.stanford.edu (Athos Kasapi) writes: >Has anybody found a way to work around the problem that Expand does not >work when it is on the right hand side of a rule? For example, if I >define >p := Sqrt[ (a + b) (c + d) ] >and then apply the rule >p /. Sqrt[ x_ y_ ] -> Sqrt[ Expand[ x y ] ] You need : p /. Sqrt[ x_ y_ ] :> Sqrt[ Expand[ x y ] ] With "->", Expand is evulated before x and y are substituted.