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: [mg38868] Re: Modifying arguments of sub-parts of an expression
  • From: Erich Mueller <emueller at mps.ohio-state.edu>
  • Date: Thu, 16 Jan 2003 03:21:23 -0500 (EST)
  • Organization: Ohio State University
  • References: <b0335u$n0a$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

The simplest way to do this is pattern matching

replaceBinGamma[expr_] := expr /. Gamma[a_] :> Gamma[a /. b -> (1 + b)]

Erich



On Wed, 15 Jan 2003, 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: Modifying arguments of sub-parts of an expression
  • Previous by thread: Re: Modifying arguments of sub-parts of an expression
  • Next by thread: Re: Modifying arguments of sub-parts of an expression