Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

surd

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Syntax

surd(x, n)

Description

For a complex number x and integer n, surd(x, n) returns the n-th root of x whose (complex) argument is closest to that of x.

If x is a positive real number, surd(x, n) coincides with x^(1/n). If x is a negative real number and n is odd, then surd(x, n) coincides with -|x|^(1/n).

surd(x, n) returns that complex solution y of yn = x with polar angle closest to that of x; among two equally distant y's, the one with smaller argument is chosen. In contrast, x^(1/n) represents the solution with the smallest absolute value of the polar angle in the range .

If n is a numerical value, it must be a non-zero integer. If it is symbolic, it is understood to represent a non-zero integer.

surd(x, 2) is mathematically equivalent to sqrt(x). Unlike sqrt, however, surd may return an unevaluated symbolic call.

Environment Interactions

When called with a floating-point argument, the function is sensitive to the environment variable DIGITS which determines the numerical working precision.

Examples

Example 1

If n is odd and x is real, then surd(x, n) is real, too. On the other hand, x^(1/n) is not real if x is negative:

surd(-27, 3), surd(-27.0, 3), (-27)^(1/3), (-27.0)^(1/3)

Example 2

surd may be called with symbolic arguments:

surd(3, n)

Sometimes, surd returns an unevaluated function call:

surd(x, 3), surd(x, n^2 + n)

Return Values

Arithmetical expression.

See Also

MuPAD Functions

Was this topic helpful?