This is prefaced by saying that I have at most 3 hours of experience in Mathematica, so please treat me gently. Anyways, my problem is that I'm trying to plot g(x) from x=-3 to x=3 and it seems to only want to display values of x>0 I've uploaded images of my inputs and what Mathematica is giving me.

I'm assuming the trouble is coming about because g(x) has a non-differentiable point a x=0, but even when I set the domain to x[-3,-1] and avoid zero entirely it still makes a graph with x[0,1] and doesn't even plot anything. Help please?

This is my g(x)

Attempting to plot g(x)

Attempt to force negative x values

  • 1
    $\begingroup$ Table[g[x], {x, -3, 3}] // N shows that results for x < 0 are imaginary. $\endgroup$ – Chris Degnen Nov 19 '17 at 0:47

The function in question is not real valued at negative x, so naturally Plot fails to graph the negative portions. If you intended for x^(2/3) to be the square of the real cube root of x, then you can explicitly request that with:

g[x_] := CubeRoot[x]^2/(1+x+x^4);

As an additional note, general real odd roots are provided by the Surd function, e.g. g[x_] := Surd[x,3]^2/(1+x+x^4).

  • $\begingroup$ I'm able to get a graph on my TI-89 of this function for values less than zero, what's it doing differently? $\endgroup$ – Alex Nov 19 '17 at 2:27
  • $\begingroup$ @Alex - Mathematica generally operates in the complex plane. Your calculator doesn't. $\endgroup$ – Bob Hanlon Nov 19 '17 at 4:35

x^(2/3) can be real or complex for negative x. Try

Plot[Re[g[x]], {x, -3, 3}]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.