Modifying arguments of sub-parts of an expression
- To: mathgroup at smc.vnet.net
- Subject: [mg38838] Modifying arguments of sub-parts of an expression
- From: "Gareth J. Russell" <gjr2008 at columbia.edu>
- Date: Wed, 15 Jan 2003 02:21:03 -0500 (EST)
- Organization: Columbia University
- Sender: owner-wri-mathgroup at wolfram.com
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