MathGroup Archive 2008

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

Search the Archive

Re: Symbolic complex conjugation?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89967] Re: Symbolic complex conjugation?
  • From: dh <dh at metrohm.ch>
  • Date: Wed, 25 Jun 2008 06:28:41 -0400 (EDT)
  • References: <g3q7vb$aus$1@smc.vnet.net>


Hi,

pattern matching can sometimes be a bit tricky. But it jusually helps to 

look at the expression using FullForm. You will see that in the first 

expression we have Complex[0,1] what is eqaul to I, but in the second 

expression we have Complex[0,-1] what equals -I. Therefore, you should 

replace -I->I.

hope this helps, Daniel



AES wrote:

> I'm sorry, but I just don't understand why the following test case works 

> just fine:  

> 

> [In copying it, I've substituted "Isymbol" for the \[ImaginaryI] that 

> actually appears in the Out[] cells.]

> 

>    In[202]:= eqna={a+I b==0};

>    solna=Solve[eqna,b];

>    b=b/.solna[[1]];

>    bStar=b/.{I->-I};

>    {b, Star}

> 

>    Out[205]={ -Isymbol a, Isymbol a }

> 

> but the actual calculation that prompted the test case doesn't:

> 

>    In[206]:= eqnp={((dwa/2)+I(w-wa))p-I (kappa/(2 w))dN e==0};

>    solnp=Solve[eqnp,p];

>    p=p/.solnp[[1]];

>    pStar=p/.{I->-I}

> 

>    Out[208]= { (dN e kappa)/(w (-Isymbol dwa+2 w-2 wa)),

>                         (dN e kappa)/(w (-Isymbol dwa+2 w-2 wa)) }

> 

> And actually, I guess my real concern is not understanding "how it 

> happens" -- but more "how it can happen" that Mathematica can do 

> something this potentially damaging to some innocent user.

> 





-- 



Daniel Huber

Metrohm Ltd.

Oberdorfstr. 68

CH-9100 Herisau

Tel. +41 71 353 8585, Fax +41 71 353 8907

E-Mail:<mailto:dh at metrohm.com>

Internet:<http://www.metrohm.com>




  • Prev by Date: Re: FullSimplify fails for very large numbers and powers
  • Next by Date: Re: Re: simple iteration question
  • Previous by thread: Re: Symbolic complex conjugation?
  • Next by thread: Re: Symbolic complex conjugation?