16
$\begingroup$

Is there a way to find $\sqrt[n]{x}$ with Mathematica beside of x^(1/n) as this is something different, because this is not always the same $$(-1)^{\frac{2}{4}}=i \neq 1= \sqrt[4]{(-1)^2}$$ In the help I only found Sqrt[x] which is the squareroot and CubeRoot[x] for the cubic root.
Is there a reason that there aren't $n$-th roots implemented? (Assuming they really don't exist and I am not to stupid to find them).

I am using Mathematica 9.0.1 Student Edition.

$\endgroup$
6
  • 4
    $\begingroup$ Look at Surd it's new in ver.9, e.g. Surd[11, 5] // N yields 1.61539 $\endgroup$
    – Artes
    Commented Mar 12, 2013 at 13:04
  • $\begingroup$ Related mathematica.stackexchange.com/questions/3886/… $\endgroup$
    – Artes
    Commented Mar 12, 2013 at 13:13
  • 1
    $\begingroup$ It is generally welcome to post an answer to your own question. I'll upvote it. $\endgroup$
    – Artes
    Commented Mar 12, 2013 at 13:25
  • $\begingroup$ Actually, one of the four solutions of $\sqrt[4]{(-1)^2} = 1^{\frac{1}{4}}$ is $i$. $\endgroup$ Commented Mar 12, 2013 at 16:42
  • $\begingroup$ @poorsod Do you think of $z^4=1$? that is something different (an equation), I am talking about the function, this need to be welldefined so their are no solutions there are just values which are taken. $\endgroup$ Commented Mar 12, 2013 at 16:45

2 Answers 2

13
$\begingroup$

@Dominic This is really more of a comment on your answer, rather than an answer to your question, but I need to use an image. There's actually a distinction between the way that Surd formats in StandardForm and the way that $x^{1/3}$ formats in traditional form, which can't really be illustrated using $\TeX$ and MathJax. The following shows x^(1/3) and Surd[x,3] in both Standard and Tradtional forms. Also note that there is a specific CubeRoot function.

enter image description here

Note that there's a little extra hook on the real valued roots to helps distinguish it from the complex valued root. Whether this is truly useful or not is, uh, debateable.

Finally, note that we can use Surd for even roots, but they don't accept negative input.

Plot[Evaluate[Table[Surd[x, n], {n, 1, 10}]], {x, -1.2, 1.2}]

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ One might add that radical notation (for Power) can be entered with Ctrl-2 Ctrl-5. And surd can be entered ESC surd ESC. $\endgroup$
    – Michael E2
    Commented Mar 12, 2013 at 17:20
12
$\begingroup$

As Artes said in the comments, in Mathematica 9 there is the new function Surd[x,n] which gives the real- valued $n^\text{th}$ root of $x$.

In Standardform Surd[x,n] formats as $\sqrt[n]{x}$.

$\endgroup$

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