# Plot cubic root which includes the negative graph [duplicate]

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?

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

• 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? Commented Sep 28, 2012 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. Commented Sep 28, 2012 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}]


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.

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.