Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: Replacement Rule

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

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]}

log(a)+log(b)+log(c)+log(d)

It appears that you want

Log[a b c d]//PowerExpand

log(a)+log(b)+log(c)+log(d)


Bob Hanlon

> 
> From: "Amir" <z64043 at netscape.net>
To: mathgroup at smc.vnet.net
> 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