Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Finding real roots of negative numbers (for example, $\sqrt\[3\]{-8}$)

Yes, I know there are other Threads which have similar questions and yes I read them but I am just not able to solve the problem. Please help me I am totally at the limit with this :(

How do I plot a cubic root in Mathematica, where also the negative graph is shown? cubic root in plot without negative graph

NOTE: Threads I have found and not understood

How to plot imaginary part of a function

Finding real roots of negative numbers (for example, $\sqrt[3]{-8}$)

Plotting Complex Quantity Functions

share|improve this question

marked as duplicate by whuber, rcollyer, Sjoerd C. de Vries, R. M. Sep 28 '12 at 22:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

The second question you linked to would definitely be a duplicate. Why not explain what you did not understand about any of those threads? Something you specifically had trouble with, perhaps? – J. M. Sep 28 '12 at 17:02
Using one of the linked questions, one might be inspired to try Plot[Root[#^3 - x &, 1], {x, -2, 2}], which works. – whuber Sep 28 '12 at 17:04

The simplest solution to this type of problem is usually to use a function like Solve or NSolve to generate solutions to an equation, which can then be plotted.

In this case, I would do the following:

Plot[p /. NSolve[p^3 == x, p, Reals], {x, -10, 10}]

a plot of the cube root

All I am doing is plotting p such that p is a solution to p^3 == x. NSolve allows me to force the result to be a real number.

This is a (very) minor variation on the techniques mentioned in solutions that you link in your question.

I recommend that you read this link for more information on why Mathematica does what it does. Essentially, real numbers have unique cube roots, but (non-zero) complex numbers have 3 distinct roots. Mathematica assumes that all symbols are complex, so it has a choice about which of the 3 roots it could return. For reasons explained in the link, Mathematica chooses the complex root with a positive imaginary part.

Addendum by J. M.

In version 9, one now has the new functions CubeRoot[], which returns real-valued cube roots of real numbers (and does not evaluate for complex arguments), and the more general Surd[]. See the documentation for details.

share|improve this answer

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