Re: Replace certain variable
- To: mathgroup at smc.vnet.net
- Subject: [mg74843] Re: Replace certain variable
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Sat, 7 Apr 2007 04:08:53 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <ev51a7$a63$1@smc.vnet.net>
KFUPM 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. [snip] A transformation rule appears to be well suited for such a task. For instance, F[w]*Exp[I*w*t] + G[w]*Exp[w*omega^2] + 2*H[w]*Exp[I*w*t] /. Exp[(p___)*w*(q___)] -> Exp[p*(x + s*a)*q] E^(I*t*(a*s + x))*F[w] + E^(omega^2*(a*s + x))*G[w] + 2*E^(I*t*(a*s + x))*H[w] HTH, Jean-Marc