Re: Problem with eval. of neg. cube root of neg. #
- To: mathgroup at smc.vnet.net
- Subject: [mg49921] Re: [mg49894] Problem with eval. of neg. cube root of neg. #
- From: DrBob <drbob at bigfoot.com>
- Date: Fri, 6 Aug 2004 03:09:38 -0400 (EDT)
- References: <200408051321.JAA05879@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
It's no use saying the cube root of -5 is real; that's just an opinion. There are two other cube roots, and the "principle" cube root Mathematica computes is NOT real. The distinction is important mathematically because it allows, for instance, all cube roots of -1 to be powers of the principle root. If you want to take charge of what is computed, you can do so as follows: Clear[f] f[x_] := Sign[x]*Abs[x]^(1/3)*(x + 4) Plot[f[x], {x, -10, 10}] Bobby On Thu, 5 Aug 2004 09:21:47 -0400 (EDT), Josh <pootleguard-mathgroup at yahoo.com> 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 ... > > > -- DrBob at bigfoot.com www.eclecticdreams.net
- References:
- Problem with eval. of neg. cube root of neg. #
- From: pootleguard-mathgroup@yahoo.com (Josh)
- Problem with eval. of neg. cube root of neg. #