MathGroup Archive 2003

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

Search the Archive

Re: Modifying arguments of sub-parts of an expression

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38858] Re: Modifying arguments of sub-parts of an expression
  • From: Tom Burton <tburton at brahea.com>
  • Date: Thu, 16 Jan 2003 03:20:07 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello,

Let 

expr = 10*Gamma[a]*Gamma[3 + b]^2*(2*Gamma[1 + a]^2*Gamma[4 +
   b]*Gamma[3 + a + b]*Gamma[a]*Gamma[3 + b]*Gamma[4 + a + b])/(
        Beta[a, b]^3*Gamma[3 + a + b]^2*Gamma[4 + a + b]*Gamma[5 + a + b])

One way to replace b by 1+b inside arguments to Gamma is the following rule
within a rule:

gr = Gamma[args__] :> Gamma[args /. b -> 1+b]

Then

expr /. gr

seems to do what you want. By the way, if your examples included nested
Gamma functions, then you'll want instead

expr //. gr

Tom Burton



  • Prev by Date: Re: Asymptote strangeness...
  • Next by Date: Re: Asymptote mystery...
  • Previous by thread: Modifying arguments of sub-parts of an expression
  • Next by thread: Re: Modifying arguments of sub-parts of an expression