Re: Declaring real variables using Element
- To: mathgroup at smc.vnet.net
- Subject: [mg63456] Re: Declaring real variables using Element
- From: "Jean-Marc Gulliet" <jeanmarc.gulliet at gmail.com>
- Date: Sun, 1 Jan 2006 01:16:10 -0500 (EST)
- Organization: The Open University, Milton Keynes, U.K.
- References: <dp5r1g$rhg$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"GidiL" <gidienator at gmail.com> a écrit dans le message de news: dp5r1g$rhg$1 at smc.vnet.net... | Hello to all! | | I am trying to declare the variable S to be real, using the Element | command: | Element[S, Reals] | | Next I calculate the complex conjugate of IS (I is the imaginary unit) | Conjugate[\[ImaginaryI] S] | | The result I get is | -\[ImaginaryI] Conjugate[S] | | which should have been -IS. Why does it not recognise S as a real | variable? | | I would appreciate any help. | | Thanks, | Gideon | Hi Gideon, To achieve what you want, you must use the package *ReIm* (http://documents.wolfram.com/mathematica/Add-onsLinks/StandardPackages/Algebra/ReIm.html) and set the imaginary part of S to 0 as in the following lines: In[1]:= Needs["Algebra`ReIm`"] In[2]:= Im[S] ^= 0; In[3]:= Conjugate[I*S] Out[3]= (-I)*S Best regards, /J.M.