Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Pattern Matching for Exponentials

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67506] Re: [mg67502] Pattern Matching for Exponentials
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 29 Jun 2006 00:09:04 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

If a pattern does not work on an expression, look at the FullForm for the expression to see if the form is what you think it is.

Exp[2*I*t]//FullForm

Power[E,Times[Complex[0,2],t]]

Exp[2*I*t] /. 
  E^((Complex[0,n_Integer])*t_Symbol):>
    Exp[n*I*t]/(n^2-1)

(1/3)*E^(2*I*t)


Bob Hanlon

---- Rick Eller <reller at bigpond.com> 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 
> modified.
> 
> Thanks,
> 
> Rick Eller
> 


  • Prev by Date: RE:creating packages of my own.
  • Next by Date: repeated usage of packages
  • Previous by thread: Re: Pattern Matching for Exponentials
  • Next by thread: Re: Pattern Matching for Exponentials