MathGroup Archive 2000

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

Search the Archive

Re: Graphing Functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22554] Re: [mg22476] Graphing Functions
  • From: BobHanlon at aol.com
  • Date: Thu, 9 Mar 2000 03:24:36 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

There are three roots to x^(1/3). For example,

y /. Solve[y^3 == 8, y] // N

{2., -1.0000000000000002 - 1.7320508075688772*I, 
  -0.9999999999999993 + 1.7320508075688772*I}

y /. Solve[y^3 == -8, y] // N

{-2., 1.0000000000000002 + 1.7320508075688772*I, 
  0.9999999999999993 - 1.7320508075688772*I}

For x < 0, the default root is not the real root

(-8)^(1/3) // N

1.0000000000000002 + 1.7320508075688772*I

Since you are only interested in the real roots, you want to represent 
x^(1/3) as Sign[x]*Abs[x]^(1/3) and x^(2/3) as (x^2)^(1/3)

f[x_?NumericQ] := Sign[x]*Abs[x]^(1/3) - (x^2)^(1/3);

Plot[f[x], {x, -10, 10}];


Bob Hanlon

In a message dated 3/8/2000 3:55:55 AM, jcharko at telusplanet.net writes:

>As a relative novice in Mathematica, I need help with a very basic
>problem involving the graphing of a certain function.
>
>The function in question is:
>
>                         x^(1/3) - x^(2/3).
>
>The plotting function Plot[f, xmin, xmax] seems unable to deal with cube
>roots of negative fractional real numbers.
>
>Please let me know how I can obtain a plot of the above function over
>the real number line from say,  from x = -10 to x = 10.
>


  • Prev by Date: Re: Q: Rookie question ..
  • Next by Date: Re: Re: Importing LaTex files
  • Previous by thread: Re: Graphing Functions
  • Next by thread: Re: Graphing Functions