MathGroup Archive 2010

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

Search the Archive

Re: Re: Replace and ReplaceAll -- simple application

  • To: mathgroup at
  • Subject: [mg106491] Re: [mg106457] Re: Replace and ReplaceAll -- simple application
  • From: Murray Eisenberg <murray at>
  • Date: Thu, 14 Jan 2010 05:49:49 -0500 (EST)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <> <hh72dp$kud$> <hh9vfo$1rk$> <> <hhf5kg$go6$> <> <hhkj1a$4tl$> <>
  • Reply-to: murray at

An interesting pair of examples.

But users of any CAS system just have to learn the basic rules -- the 
relevant one here being that replacements are made on the FullForm, so 
that I, that is, Complex[0,1] does NOT appear in the FullForm of the 
original expression (before the replacement is attempted) in the second 
of the two examples!

The only "cure" for this I can see is for Mathematica's fundamental 
evaluation sequence to be radically changed, so that 2 I, meaning 2*I, 
does NOT first get replaced automatically by Complex[0,2].

The consequences of such a radical change could cascade throughout the 
entire system, with most unwanted effect.

So one simply has to learn how things work here, and teach them to 
others. I don't think any number of new "inconvenient" examples or 
fulminations against the state of things here is going to change that state.

On 1/13/2010 5:58 AM, AES wrote:
> In article<hhkj1a$4tl$1 at>,

> What you say is certainly correct -- but I believe it bypasses the core
> point.  An individual with a physics background may manipulate the
> impedance for an RL circuit by writing
>        R  + I w L /. I ->  -I
> while one with an EE background may very naturally write this as
>        R  + I 2 Pi f L /. I ->  -I
> (or, in many textbooks,  R  + 2Pi I L /. I ->  -I)
> And, **one of these will get a wrong answer**.

Murray Eisenberg                     murray at
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

  • Prev by Date: Re: syntax extension, precedence, Notation`
  • Next by Date: Re: disable canceling
  • Previous by thread: Re: Replace and ReplaceAll -- simple application
  • Next by thread: Re: algebraic numbers