MathGroup Archive 2004

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

Search the Archive

Re: Problem with eval. of neg. cube root of neg. #

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49919] Re: Problem with eval. of neg. cube root of neg. #
  • From: "David W. Cantrell" <DWCantrell at sigmaxi.org>
  • Date: Fri, 6 Aug 2004 03:09:36 -0400 (EDT)
  • References: <cete30$6ac$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

pootleguard-mathgroup at yahoo.com (Josh) wrote:
> I am having trouble plotting the following function:
>
> Plot[x^(1/3)*(x + 4), {x, -10, 10}]
>
> Mathematica won't plot this function for negative x, although it is
> obviously defined for negative x. It seems to be evaluating the
> negative part of this function to imaginary numbers for some odd
> reason.

It's not an odd reason, actually. Taking the principal branch -- which in
this case happens to be complex, as you noticed -- is the standard thing to
do in "higher" math. But for what you want to do, let me suggest that you
first define your own _real_ cube root function using

RealCbrt[x_] := Sign[x] Abs[x]^(1/3)

and then you can get the desired plot using

Plot[RealCbrt[x]*(x + 4), {x, -10, 10}]

David Cantrell


  • Prev by Date: Re: How to creat this 8×8 images
  • Next by Date: Re: Problem with FourierTransform
  • Previous by thread: Re: Problem with eval. of neg. cube root of neg. #
  • Next by thread: Re: Problem with eval. of neg. cube root of neg. #