Re: Complex numbers in Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg61699] Re: [mg61647] Complex numbers in Mathematica
- From: "Jose Luis Gomez" <jose.luis.gomez at itesm.mx>
- Date: Wed, 26 Oct 2005 01:01:58 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hello! I do get the correct complex number answer in my Mathematica 5.2 My guess is that somehow you loaded the RealOnly package in your Mathematica session (Or maybe your Teacher's edition automatically loads this package? I do Not know). Here is the help about RealOnly: http://documents.wolfram.com/mathematica/Add-onsLinks/StandardPackages/Misce llaneous/RealOnly.html The package RealOnly was created in order to adapt Mathematica to students that do not know about complex numbers. For example, students "know" that the cubic root of -8 is -2. This is Not correct, the *main* cubic root of -8 is a complex number. Mathematica will give you the correct complex answer, however if you load the package RealOnly, then Mathematica will change its behavior and it will answer that the cubic root of -8 is -2. I hope that helps Jose Luis http://homepage.cem.itesm.mx/lgomez/ -----Mensaje original----- De: "Per Rønne" [mailto:per at RQNNE.invalid] Enviado el: Lunes, 24 de Octubre de 2005 08:07 p.m. Para: mathgroup at smc.vnet.net Asunto: [mg61647] Complex numbers in Mathematica If I write: In[8]=Factor[(5 - 3I) + (-4 + I)x + (1 - I)x^2] I get Nonreal::"warning": "Nonreal number encountered." Out[8]= Nonreal The same with Sqrt[-1]. Why doesn't it show the complex numbers? According to the books it should - is it a matter of preferences set? I'm using Mathematica Teacher's Edition 1.1 on MacOS X. -- Per Erik Rønne