Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Replacement Rule

  • To: mathgroup at
  • Subject: [mg60642] Re: [mg60605] Replacement Rule
  • From: Bob Hanlon <hanlonr at>
  • Date: Fri, 23 Sep 2005 04:19:46 -0400 (EDT)
  • Reply-to: hanlonr at
  • Sender: owner-wri-mathgroup at

No. After your first iteration the output contains only Log (i.e., no instances of 
logo) so the second iteration makes no changes and stops.

logo[a b c d]//.{logo[x_ y_]:>Log[x]+logo[y],logo[x_]:>Log[x]}


It appears that you want

Log[a b c d]//PowerExpand


Bob Hanlon

> From: "Amir" <z64043 at>
To: mathgroup at
> Date: 2005/09/22 Thu AM 02:08:02 EDT
> Subject: [mg60642] [mg60605] Replacement Rule
> In:    logo[a b c d] //. logo[x_ y_] :> Log[x]+Log[y]
> Out:  Log[a]+Log[b c d]
> Shouldn't the correct answer be( Log[a]+Log[b]+Log[c]+Log[d]) ????
> Amir 

  • Prev by Date: Re: Bugs in Mathematica 5+
  • Next by Date: Re: Bug in MiniMaxApproximation
  • Previous by thread: Re: Replacement Rule
  • Next by thread: Bug in MiniMaxApproximation