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: [mg38845] Re: Modifying arguments of sub-parts of an expression
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 16 Jan 2003 03:18:38 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <b0335u$n0a$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

GammaReplace[expr_,b_]:=expr /. Gamma[q_] /; ! FreeQ[q, b] :> Gamma[q /.
b -> b + 1]


would do this.

Regards
  Jens


"Gareth J. Russell" wrote:
> 
> Hi,
> 
> I have an expression such as
> 
> Gamma[a]*Gamma[b]/Beta[a, b]*Gamma[a + b]
> 
> I want to make a new expression where for every subexpression with head Gamma, if the arguments include b, each b is replaced by 1 + b. So, the output from the above expression should be
> 
> Gamma[a]*Gamma[1 + b]/Beta[a, b]*Gamma[1 + a + b]
> 
> I would like to make a named function that performs this operation on an input expression of arbitrary complexity. An example of a more complicated input expression is given below:
> 
> 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])
> 
> I've tried, but I just can't seem to get the hang of functions that operate on other functions...
> 
> Thanks
> 
> Gareth
> Columbia University


  • Prev by Date: Re: Modifying arguments of sub-parts of an expression
  • Next by Date: Re: Integrating Abs[Sin[]^2]
  • Previous by thread: Re: Modifying arguments of sub-parts of an expression
  • Next by thread: RE: Modifying arguments of sub-parts of an expression