Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Rule replacement doesn't work after NDSolve?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124032] Re: Rule replacement doesn't work after NDSolve?
  • From: gac <g.crlsn at gmail.com>
  • Date: Fri, 6 Jan 2012 04:18:05 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Thank you.  Great example.

I see that the FullForm[-2*I] is also not Times[Complex[-2,0],Complex[0,1]].  

So this won't work either:

-2*I/.Complex[0,1]->Complex[0,-1]

to replace only I with -I, we need to use parentheses:

-2*(I/.I->-I)

Not very pretty, and it seems to get worse very quickly:

1-2*(I/.I->-I)

or

2*(I/.I->-I)*Exp[2*(I/.I->-I)]

It seems that every replacement of I with -I must be specified separately.  Uuugly!



  • Prev by Date: Re: NDSolve and "periodic" boundary conditions
  • Next by Date: Re: How to plot divergence of gradient as contour plot
  • Previous by thread: Re: Rule replacement doesn't work after NDSolve?
  • Next by thread: Re: Rule replacement doesn't work after NDSolve?