Re: Replace certain variable

*To*: mathgroup at smc.vnet.net*Subject*: [mg74835] Re: Replace certain variable*From*: "januswesenberg at gmail.com" <januswesenberg at gmail.com>*Date*: Sat, 7 Apr 2007 04:04:47 -0400 (EDT)*References*: <ev51a7$a63$1@smc.vnet.net>

On Apr 6, 2:44 am, "KFUPM" <hussain.alqaht... at gmail.com> wrote: > Dear Group > > If i have a term like : F[w]*Exp[I*w*t] where F[w] is an arbitrary > function, and i want to replace w by x+ s*a only in the exponent not > in F[w], i wonder what is the quickest and easiest way to do it > provided that i have so many similar terms. > > Your help and prompt reply is highly appreciated. > > HMQ There are many ways. The simplest is probably a delayed rule: expr = F[w] Exp[I w t]; expr /. Exp[arg_] :> Exp[arg /. w -> x s + a] Gives E^(I*t*(a + s*x))*F[w] /Janus