MathGroup Archive 2006

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

Search the Archive

Re: Pattern Matching for Exponentials

  • To: mathgroup at
  • Subject: [mg67516] Re: Pattern Matching for Exponentials
  • From: Bill Rowe <readnewsciv at>
  • Date: Thu, 29 Jun 2006 00:09:37 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

On 6/28/06 at 3:52 AM, reller at (Rick Eller) wrote:

>I am looking for a pattern-matching replacement rule which will
>transform exponential functions of the form exp(n i t) into
>(1/(n^2-1))exp(n i t) where i = sqrt[-1]. For example, exp(2 i t)
>should convert to (1/3)exp(2 i t). I've tried the following code
>without success :

>In:     Exp[2 i t]   /.  Exp[n_ i t] -> Exp[n i t]/(n^2-1)

>Out:  e^2 i t

>I would appreciate any suggestions as to how this code should be

The problem is that

MatchQ[2 I t, a_ I t]


MatchQ[2 I t, a_ t]


So, you need

Exp[2 I t]/.Exp[a_ t]->Exp[a t]/(Im[a]^2-1)


but note if instead of Exp[2 I t] you had Exp[b I t] then

Exp[b I t]/.Exp[a_ I t]->Exp[a I t]/(a^2-1)

E^(I*b*t)/(b^2 - 1)

works fine
To reply via email subtract one hundred and four

  • Prev by Date: Re: Pattern Matching for Exponentials
  • Next by Date: Change Symbol in ListPlot
  • Previous by thread: Re: Pattern Matching for Exponentials
  • Next by thread: RE: Pattern Matching for Exponentials