MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Replace certain variable


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


  • Prev by Date: Re: Replace certain variable
  • Next by Date: Re: Replace certain variable
  • Previous by thread: Re: Replace certain variable
  • Next by thread: Re: Replace certain variable