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

• To: mathgroup at smc.vnet.net
• Subject: [mg49920] Re: [mg49894] Problem with eval. of neg. cube root of neg. #
• From: Murray Eisenberg <murray at math.umass.edu>
• Date: Fri, 6 Aug 2004 03:09:37 -0400 (EDT)
• Organization: Mathematics & Statistics, Univ. of Mass./Amherst
• References: <200408051321.JAA05879@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Try

Needs["Miscellaneous`RealOnly`"]
Plot[x^(1/3)*(x + 4), {x, -10, 10}]

and see, e.g.,

http://hilbert.math.hr/arhive/mathgroup/1999/01/0051.html

for an explanation.

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.If I do:
>
> f[x_] := (x^(1/3))*(x + 4)
>
> and then:
>
> f[-5] // N
>
> I get:
>
> -0.854988 - 1.48088 \[ImaginaryI]
>
> when the correct answer is the negative cube root of negative 5, which
> is approximately - (-1.70998) = 1.70998
>
> I can send a copy of the notebook that shows where this is happening
> to anyone who requests it...
>
> Can anyone explain what is going on here? Is this a bug or am I
> missing something?
>
> Thanks in advance for any help ...
>
>

--
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

```

• Prev by Date: Re: populate a list with random numbers from normaldistribution?
• Next by Date: Re: Problem with eval. of neg. cube root of neg. #
• Previous by thread: Problem with eval. of neg. cube root of neg. #
• Next by thread: Re: Problem with eval. of neg. cube root of neg. #