rootsconmode SciMax Toolbox rootsepsilon

SciMax Toolbox >> rootscontract

rootscontract

Maxima Function

Calling Sequence

rootscontract (expr)

Description

Converts products of roots into roots of products. For example, rootscontract (sqrt(x)*y^(3/2)) yields sqrt(x*y^3).

When radexpand is true and domain is real, rootscontract converts abs into sqrt, e.g., rootscontract (abs(x)*sqrt(y)) yields sqrt(x^2*y).

There is an option rootsconmode affecting rootscontract as follows:

Problem            Value of        Result of applying
                  rootsconmode        rootscontract
x^(1/2)*y^(3/2)      false          (x*y^3)^(1/2)
x^(1/2)*y^(1/4)      false          x^(1/2)*y^(1/4)
x^(1/2)*y^(1/4)      true           (x*y^(1/2))^(1/2)
x^(1/2)*y^(1/3)      true           x^(1/2)*y^(1/3)
x^(1/2)*y^(1/4)      all            (x^2*y)^(1/4)
x^(1/2)*y^(1/3)      all            (x^3*y^2)^(1/6)

When rootsconmode is false, rootscontract contracts only with respect to rational number exponents whose denominators are the same. The key to the rootsconmode: true examples is simply that 2 divides into 4 but not into 3. rootsconmode: all involves taking the least common multiple of the denominators of the exponents.

rootscontract uses ratsimp in a manner similar to logcontract.

Examples:

(%i1) rootsconmode: false$
(%i2) rootscontract (x^(1/2)*y^(3/2));
                                   3
(%o2)                      sqrt(x y )
(%i3) rootscontract (x^(1/2)*y^(1/4));
                                   1/4
(%o3)                     sqrt(x) y
(%i4) rootsconmode: true$
(%i5) rootscontract (x^(1/2)*y^(1/4));
(%o5)                    sqrt(x sqrt(y))
(%i6) rootscontract (x^(1/2)*y^(1/3));
                                   1/3
(%o6)                     sqrt(x) y
(%i7) rootsconmode: all$
(%i8) rootscontract (x^(1/2)*y^(1/4));
                              2   1/4
(%o8)                       (x  y)
(%i9) rootscontract (x^(1/2)*y^(1/3));
                             3  2 1/6
(%o9)                      (x  y )
(%i10) rootsconmode: false$
(%i11) rootscontract (sqrt(sqrt(x) + sqrt(1 + x))
                    *sqrt(sqrt(1 + x) - sqrt(x)));
(%o11)                          1
(%i12) rootsconmode: true$
(%i13) rootscontract (sqrt(5+sqrt(5)) - 5^(1/4)*sqrt(1+sqrt(5)));
(%o13)                          0
rootsconmode SciMax Toolbox rootsepsilon