Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1992
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1992

[Date Index] [Thread Index] [Author Index]

Search the Archive

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.





  • Prev by Date: Eigenvalue problems in diff equations.
  • Next by Date: text in graphics
  • Previous by thread: Expand[] on the RHS of a rule
  • Next by thread: Re: Expand[] on the RHS of a rule