MathGroup Archive 2008

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

Search the Archive

Re: Plot results not right

  • To: mathgroup at
  • Subject: [mg89882] Re: Plot results not right
  • From: magma <maderri2 at>
  • Date: Tue, 24 Jun 2008 03:20:10 -0400 (EDT)
  • References: <g3nhbc$g6$>

On Jun 23, 8:54 am, BrenB <GoogleGro... at> wrote:
> I'm new to Mathematica.
> I'm studying Calculus, and I'm trying to reproduce, in Mathematica,
> the graph results of an equation in my book.
> Plot[2 x - 3 x^(2/3) + 4, {x, -1, 6}]
> The output graph is correct, except there should be graphing in the
> 2nd and 3rd quadrant, and there is none.
> Is there another way to enter this equation into Mathematica to get
> the correct graph results?
> Thanks

This is because x^(2/3) is a function which does not have a unique value.
You can read about it in tutorial/FunctionsThatDoNotHaveUniqueValues
If you use Mathematica 6.x, or the equivalent section if you use prior

So x^(2/3) when x is -1 for example, is not = to 1, but it is a
complex number for Mathematica.
x^(2/3) has in effect 3 solutions, one of them is 1, but Mathematica prefers
another one.
Perhaps you do not know about complex numbers yet, do not worry, they
are not so complex.

You can see what is going on by evaluating

x^(2/3) /. x -> -1 // N

So in the end, if you want to plot your function for negative x, I
would suggest you replace x^(2/3) by Abs[x]^(2/3), that is

Plot[2 x - 3 Abs[ x]^(2/3) + 4, {x, -1, 6}]

This is because you have a square (the 2 in 2/3), so if you use
Abs[x]^2 is the same as x^2 and Mathematica will not complain

hope that helps

  • Prev by Date: Re: Mathematica performance improvements
  • Next by Date: VectorAngle
  • Previous by thread: Re: Plot results not right
  • Next by thread: Re: Plot results not right