Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I need to plot the cube root of x in mathematica, but the plot shows me only the real part. I want it to look like wolframalpha plot with both real and imaginary parts of the function. Is it possible to do it?

EDIT:

This is what I want the plot to look like

share|improve this question
1  
Look e.g. at this post : mathematica.stackexchange.com/questions/3886/…, where I demonstrated ContourPlot approach, or yet another example : mathematica.stackexchange.com/questions/3458/… –  Artes May 18 '12 at 23:34

2 Answers 2

I am probably misunderstanding you but, to see branch cuts and the like, you can do this sort of thing:

GraphicsGrid[
 {{Plot3D[Im[(x + I*y)^(1/3)], {x, -5, 5}, {y, -5, 5}],
   Plot3D[Re[(x + I*y)^(1/3)], {x, -5, 5}, {y, -5, 5}]}}
 ]

Mathematica graphics

so there's a branch cut along the negative real axis.

EDIT: In response to comment:

Plot[{Re[x^(1/3)], Im[x^(1/3)]}, {x, -3, 3}]

Mathematica graphics

share|improve this answer
    
I want to plot 2d functions and I the output should look like this –  Alpine May 18 '12 at 22:25
    
I like the trick you used to draw branch cuts. –  Michael Wijaya May 18 '12 at 23:53
    
For me your after edit picture does not correspond to the result of the Wolfram Alpha query. If you are confident your picture was the result of the query at the time, maybe you can edit the question. I'd say right now this Q&A is in poor shape. –  Jacob Akkerboom Aug 28 '13 at 11:37
    
@JacobAkkerboom I don't remember if there was a discussion about this, or why I put it there. If you find the Q&A poor feel free to contribute a better answer. –  acl Aug 29 '13 at 10:05

Because M. always takes the principal value of complex numbers, you don't see the values for negative x. You can try ParametricPlot like this:

ParametricPlot[{x^3, x}, {x, -2, 2}]

Mathematica graphics

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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