root - Maple Help

root

nth root of an algebraic expression

Calling Sequence

 root(x, n) root[n](x) ${\mathrm{root}}_{n}\left(x\right)$ root(x, n, symbolic) root[n](x, symbolic) ${\mathrm{root}}_{n}\left(x,\mathrm{symbolic}\right)$

Parameters

 x - any algebraic expression n - nonzero integer

Description

 • The function root computes an nth root of x where x can be:
 - A real or complex floating-point constant, for example, 2.0 or 2.0+0.5*I
 - A real or complex rational constant, for example, 8 or 2+I/2
 - A general symbolic expression, for example, b, -8*a^4*y, or ln(1+x)
 • If x is a real or complex floating-point constant, the root is computed in floating-point arithmetic. Otherwise, the root function tries to simplify x^(1/n). If no simplifications can be made, the power x^(1/n) is simply returned.
 • You can enter the command root using any of the equivalent calling sequences.
 • root(x,n) represents the "principal root", defined by the formula root(x,n) = exp(1/n * ln(x))
 • For example, the three roots of y^3+8=0 are -2, 1+I*sqrt(3), and 1-I*sqrt(3). Thus root(-8.0,3) returns 1.000000000 + 1.732050808 I, not the real number -2.0. See surd if you want the real nth root of a real number.
 • For fractional powers of rational constants, that is, radicals a^(n/d) and (a/b)^(n/d) where a, b, n, d are integers, Maple automatically writes them in a canonical form as fractional powers of integers by applying the following transformations

 (1) ${a}^{\frac{n}{d}}={a}^{\frac{qd+r}{d}}$ ==> ${a}^{q}{a}^{\frac{r}{d}}$ where $0 (2) ${\left(\frac{a}{b}\right)}^{\frac{n}{d}}$ ==> ${a}^{\frac{n}{d}}{b}^{-\frac{n}{d}}$ where $b>0$, $d>0$

 For example, 3^(5/2) ==> 3^(2+1/2) ==> 3^2*3^(1/2) ==> 9*3^(1/2) and (5/3)^(1/2) ==> 5^(1/2)*3^(-1/2) ==> 5^(1/2)*3^(1/2)/3. The root function does transformation (1) and the following transformations

 (3) ${\mathrm{root}}_{n}\left(-a\right)$ ==> ${\left(-1\right)}^{\frac{1}{n}}{\mathrm{root}}_{n}\left(a\right)$ (4) ${\mathrm{root}}_{n}\left({p}^{n}a\right)$ ==> $p{\mathrm{root}}_{n}\left(a\right)$ for prime $p<150$ (5) ${\mathrm{root}}_{n}\left({a}^{n}\right)$ ==> $a$ where $a>0$ (6) ${\mathrm{root}}_{kn}\left({a}^{mn}\right)$ ==> ${\mathrm{root}}_{k}\left({a}^{m}\right)$ for positive integers $a$, $k$, $m$, $n$ (7) ${\mathrm{root}}_{n}\left(\frac{a}{b}\right)$ ==> $\frac{{\mathrm{root}}_{n}\left(a\right){\mathrm{root}}_{n}\left({b}^{n-1}\right)}{b}$; Note: If the result of this rule includes a product of the form ${c}^{\frac{k}{m}}{d}^{\frac{k}{m}}$ for positive integers $c,d,k,m$, then these are combined into ${\left(cd\right)}^{\frac{k}{m}}$

 For example, root[3](-8) ==> 2*(-1)^(1/3) and root[3](72/5) ==> root[3](72)*root[3](5^2)/5 ==> 2*root[3](9)*root[3](5^2)/5 ==> 2/5*3^(2/3)*5^(2/3) ==> 2/5*15^(2/3). Note that no attempt is made to factor the input integer x.
 • For symbolic expressions, a number of simplifications are attempted. The main ones are:

 (8) ${\mathrm{root}}_{-n}\left(a\right)$ ==> $\frac{1}{{\mathrm{root}}_{n}\left(a\right)}$ if $n<0$, (9) ${\mathrm{root}}_{n}\left({a}^{n}b\right)$ ==> $a{\mathrm{root}}_{n}\left(b\right)$ if $\mathrm{signum}\left(a\right)=1$, and (10) ${\mathrm{root}}_{n}\left({a}^{n}b\right)$ ==> $-a{\mathrm{root}}_{n}\left({\left(-1\right)}^{n}b\right)$ if $\mathrm{signum}\left(a\right)=-1$

 where n is a positive integer and the condition signum(a)=1 means a is provably real and positive. Similar simplifications are made for negative powers. These simplifications are only made for explicit integer powers appearing in x. No attempt to factor the input x is made. See RootFinding[Isolate] if you want the real roots (zeros) of a univariate polynomial.
 • Note: Maple does not simplify root[n](x^n) to x. This is wrong for general x. Maple returns (x^n)^(1/n).  Sometimes, because of the context of your work, you know that this transformation is valid.  If the symbolic option is specified, and signum(x) is not known, then the command root applies transformation (9), effectively assuming that a is positive. It is also possible to force the root function to make a simplification by making the appropriate assumption, for example, assume(a>0).

Examples Using root

 > root(3.0,3);
 ${1.442249570}$ (1)
 > root[3](3.0);
 ${1.442249570}$ (2)
 > root(3,3);
 ${{3}}^{{1}}{{3}}}$ (3)
 > root(8,3);
 ${2}$ (4)
 > root[3](8);
 ${2}$ (5)
 > root(24,3);
 ${2}{}{{3}}^{{1}}{{3}}}$ (6)
 > root(24/5,3);
 $\frac{{2}{}{{3}}^{{1}}{{3}}}{}{{5}}^{{2}}{{3}}}}{{5}}$ (7)
 > root(72/5,3);
 $\frac{{2}{}{{15}}^{{2}}{{3}}}}{{5}}$ (8)
 > root(-8,3);
 ${2}{}{\left({-1}\right)}^{{1}}{{3}}}$ (9)
 > root(-8.0,3);
 ${1.000000000}{+}{1.732050807}{}{I}$ (10)
 > root[3](3+4*I);
 ${\left({3}{+}{4}{}{I}\right)}^{{1}}{{3}}}$ (11)
 > root[3](3.0+4.0*I);
 ${1.628937146}{+}{0.5201745022}{}{I}$ (12)
 > root[3](x);
 ${{x}}^{{1}}{{3}}}$ (13)
 > root[3](16*x^3*y);
 ${2}{}{{2}}^{{1}}{{3}}}{}{\left({{x}}^{{3}}{}{y}\right)}^{{1}}{{3}}}$ (14)
 > root[4](-16*x^4*y);
 ${2}{}{\left({-}{{x}}^{{4}}{}{y}\right)}^{{1}}{{4}}}$ (15)
 > root[3](16*x^3*y,symbolic);
 ${2}{}{x}{}{{2}}^{{1}}{{3}}}{}{{y}}^{{1}}{{3}}}$ (16)
 > root[4](-16*x^4*y,symbolic);
 ${2}{}{x}{}{\left({-}{y}\right)}^{{1}}{{4}}}$ (17)
 > assume(x>0);
 > root[3](16*x^3*y);
 ${2}{}{\mathrm{x~}}{}{{2}}^{{1}}{{3}}}{}{{y}}^{{1}}{{3}}}$ (18)
 > root[4](-16*x^4*y);
 ${2}{}{\mathrm{x~}}{}{\left({-}{y}\right)}^{{1}}{{4}}}$ (19)
 > assume(x<0);
 > root[3](16*x^3*y);
 ${-}{2}{}{\mathrm{x~}}{}{\left({-}{2}{}{y}\right)}^{{1}}{{3}}}$ (20)
 > root[4](-16*x^4*y);
 ${-}{2}{}{\mathrm{x~}}{}{\left({-}{y}\right)}^{{1}}{{4}}}$ (21)
 > root[4]((x-1)^4*y);
 $\left({-}{\mathrm{x~}}{+}{1}\right){}{{y}}^{{1}}{{4}}}$ (22)
 > f := expand( (x-1)^3 );
 ${f}{≔}{{\mathrm{x~}}}^{{3}}{-}{3}{}{{\mathrm{x~}}}^{{2}}{+}{3}{}{\mathrm{x~}}{-}{1}$ (23)
 > root[3](f);
 $\left({-}{\mathrm{x~}}{+}{1}\right){}{\left({-1}\right)}^{{1}}{{3}}}$ (24)
 > root[3](f*y);
 ${\left(\left({{\mathrm{x~}}}^{{3}}{-}{3}{}{{\mathrm{x~}}}^{{2}}{+}{3}{}{\mathrm{x~}}{-}{1}\right){}{y}\right)}^{{1}}{{3}}}$ (25)
 Note the differences among the outputs of the root, ^, and surd commands.
 > 8^(1/3); root(8, 3); surd(8, 3);
 ${{8}}^{{1}}{{3}}}$
 ${2}$
 ${2}$ (26)
 > (8.0)^(1/3); root(8.0, 3); surd(8.0, 3);
 ${2.000000000}$
 ${2.000000000}$
 ${2.000000000}$ (27)
 > (-8)^(1/3); root(-8, 3); surd(-8, 3);
 ${\left({-8}\right)}^{{1}}{{3}}}$
 ${2}{}{\left({-1}\right)}^{{1}}{{3}}}$
 ${-2}$ (28)
 > (-8.0)^(1/3); root(-8.0, 3); surd(-8.0, 3);
 ${1.000000000}{+}{1.732050807}{}{I}$
 ${1.000000000}{+}{1.732050807}{}{I}$
 ${-2.000000000}$ (29)