## `radsimp` -- simplify radicals in arithmetical expressions

#### Introduction

`radsimp` simplifies arithmetical expressions containing radicals.

#### Call(s)

`radsimp(z)`

#### Parameters

`z` | - | an arithmetical expression

#### Returns

an arithmetical expression.

#### Further Documentation

Chapter ``Manipulating Expressions'' of the Tutorial.

#### Related Functions

`combine`, `ifactor`, `normal`, `rectform`, `simplify`

#### Details

- `radsimp(`z`)` tries to simplify the radicals in the expression `z`. The result is mathematically equivalent to `z`.
- The call `radsimp(`z`)` is equivalent to `simplify(z, sqrt)`.

#### Example 1

We demonstrate the simplification of constant expressions with square roots and higher order radicals:

    >> radsimp(2*2^(1/4) + 2^(3/4) - (6*2^(1/2) + 8)^(1/2))

                                         0

    >> radsimp(
         sqrt(14 + 3*sqrt(3 + 2*sqrt(5 - 12*sqrt(3 - 2*sqrt(2)))))
       )

                                      1/2
                                     2    + 3

    >> radsimp(3*sqrt(7)/(sqrt(7) - 2))

                                       1/2
                                    2 7    + 7

    >> radsimp(sqrt(1 + sqrt(3)) + sqrt(3 + 3*sqrt(3))
                    - sqrt(10 + 6*sqrt(3)))

                                         0

    >> x := sqrt(3)*I/2 + 1/2: y := x^(1/3) + x^(-1/3): z := y^3 - 3*y

          /           1                     1/2       1/3 \3
          | --------------------- + (1/2 I 3    + 1/2)    |  -
          |         1/2       1/3                         |
          \ (1/2 I 3    + 1/2)                            /

                       1/2       1/3             3
             3 (1/2 I 3    + 1/2)    - ---------------------
                                               1/2       1/3
                                       (1/2 I 3    + 1/2)

    >> radsimp(z)

                                         1

    >> delete x, y, z:

#### Example 2

`radsimp` also works on arithmetical expressions containing variables:

    >> z := x/(sqrt(3) - 1) - x/2

                                      x       x
                                   -------- - -
                                    1/2       2
                                   3    - 1

    >> radsimp(z) = expand(radsimp(z))

                             /  1/2       \          1/2
                             | 3          |   x   x 3
                           x | ---- + 1/2 | - - = ------
                             \  2         /   2     2

    >> delete z:

#### Background

- For constant algebraic expressions, `radsimp` constructs a tower of algebraic extensions of Q using the domain `Dom::AlgebraicExtension`. It tries to return the simplest possible form.
- This function is based on an algorithm described in Borodin, Fagin, Hopcroft and Tompa, ``Decreasing the Nesting Depth of Expressions Involving Square Roots'', JSC 1, 1985, pp. 169-188.

#### Changes

- no changes

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000