MathGroup Archive 1992

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

Search the Archive

Plotting x^(1/3), etc.

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Plotting x^(1/3), etc.
  • From: jkc at keller.mines.colorado.edu (Jack K. Cohen)
  • Date: Thu, 16 Apr 92 08:52:11 MDT

A fix for making (-1)^(1/3) evaluate as -1 instead
of as the root on the first sheet is:

protected = Unprotect[Power]
x_^r_Rational := (-(-x)^(1/Denominator[r]))^Numerator[r] /;
			Negative[x] && OddQ[Denominator[r]]
Protect[Evaluate[protected]]


Be aware that the complex evaluation is NOT a bug--as
previously noted in this news group, it makes Power
consistent with the other complex valued functions.

However, in Calculus classes we do NOT want the
complex values.  Hence I suggest putting the above
in some suitable package rather than making it
global to your environment by putting it in init.m.

I have written a Calculus.m package containing various
utilities useful for my classes and that's where I have it.
I am willing to share Calculus.m with you, as long as you
understand it isn't intended to be robust, professional
level code.  Send me e-mail, if you want it.





  • Prev by Date: Re: mma animation
  • Next by Date: Re: Determinant function in Mathematica
  • Previous by thread: Multivariate ANOVA in Mathematica
  • Next by thread: Re: Plotting x^(1/3), etc.