MathGroup Archive 2005

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

Search the Archive

Re: Replacement Rule


After your rule is applied ONCE, there is no "logo" head in the expression
so replcement cannot take place again

Replace it to
logo[a b c d] //. {logo[x_ y_] :> Log[x] + logo[y], logo[x_] :> Log[x]}
or
(logo[a b c d] //. logo[x_ y_] :> Log[x] + logo[y]) /. logo[x_] :> Log[x]
to get the result you need
yehuda
On 9/22/05, Amir <z64043 at netscape.net> wrote:
>
> 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: Replacement Rule
  • Next by Date: Re: Generate polynomial of specified degree
  • Previous by thread: Replacement Rule
  • Next by thread: Re: Replacement Rule