## `denom` -- the denominator of a rational expression

#### Introduction

`denom``(f)` returns the denominator of the expression `f`.

#### Call(s)

`denom(f)`

#### Parameters

`f` | - | an arithmetical expression

#### Returns

an arithmetical expression.

### Overloadable:

`f`

#### Related Functions

`gcd`, `factor`, `normal`, `numer`

#### Details

- `denom` regards the input as a rational expression: non-rational subexpressions such as `sin(x)`, `x^(1/2)` etc. are internally replaced by ``temporary variables''. The denominator of this rationalized expression is computed, the temporary variables are finally replaced by the original subexpressions.

- Numerator and denominator are not necessarily cancelled: the denominator returned by `denom` may have a non-trivial `gcd` with the numerator returned by `numer`. Pre-process the expression by `normal` to enforce cancellation of common factors. Cf. example 2.

#### Example 1

We compute the denominators of some expressions:

    >> denom(-3/4)

                                         4

    >> denom(x + 1/(2/3*x -2/x))

                                        2
                                     2 x  - 6

    >> denom((cos(x)^2 -1)/(cos(x) -1))

                                    cos(x) - 1

#### Example 2

`denom` performs no cancellations if the rational expression is of the form ``numerator/denominator'':

    >> r := (x^2 - 1)/(x^3 - x^2 + x - 1): denom(r)

                                       2    3
                                  x - x  + x  - 1

This denominator has a common factor with the numerator of `r`; `normal` enforces cancellation of common factors:

    >> denom(normal(r))

                                       2
                                      x  + 1

However, automatic normalization occurs if the input expression is a sum:

    >> denom(r + x/(x + 1) + 1/(x + 1) - 1)

                                       2
                                      x  + 1

    >> delete r:

#### Changes

- no changes

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