## `ldegree` -- the lowest degree of the terms in a polynomial

#### Introduction

`ldegree(`p`)` returns the lowest total degree of the terms of the polynomial `p`.

`ldegree(`p, x`)` returns the lowest degree of the terms in `p` with respect to the variable `x`.

#### Call(s)

`ldegree(p)`
`ldegree(p, x)`
`ldegree(f <, vars>)`
`ldegree(f <, vars>, x)`

#### Parameters

`p` | - | a polynomial of type `DOM_POLY`
`f` | - | a polynomial expression
`vars` | - | a list of indeterminates of the polynomial: typically, identifiers or indexed identifiers
`x` | - | an indeterminate

#### Returns

a nonnegative number. `FAIL` is returned if the input cannot be converted to a polynomial.

### Overloadable:

`p`, `f`

#### Related Functions

`coeff`, `degree`, `degreevec`, `ground`, `lcoeff`, `lmonomial`, `lterm`, `nterms`, `nthcoeff`, `nthmonomial`, `nthterm`, `poly`, `poly2list`, `tcoeff`

#### Details

- If the first argument `f` is not element of a polynomial domain, then `ldegree` converts the expression to a polynomial via `poly``(f)`. If a list of indeterminates is specified, then the polynomial `poly``(f, vars)` is considered.
- `ldegree(`f, vars, x`)` returns 0 if `x` is not an element of `vars`.
- The low degree of the zero polynomial is defined as 0.
- `ldegree` is a function of the system kernel.

#### Example 1

The lowest total degree of the terms in the following polynomial is computed:

    >> ldegree(x^3 + x^2*y^2)

                                         3

The next call regards the expression as a polynomial in `x` with a parameter `y`:

    >> ldegree(x^3 + x^2*y^2, x)

                                         2

The next expression is regarded as a bi-variate polynomial in `x` and `z` with coefficients containing the parameter `y`. The total degree with respect to `x` and `z` is computed:

    >> ldegree(x^3*z^2 + x^2*y^2*z, [x, z])

                                         3

We compute the low degree with respect to `x`:

    >> ldegree(x^3*z^2 + x^2*y^2*z, [x, z], x)

                                         2

A polynomial in `x` and `z` is regarded constant with respect to any other variable, i.e., its corresponding degree is 0:

    >> ldegree(poly(x^3*z^2 + x^2*y^2*z, [x, z]), y)

                                         0

#### Changes

- no changes

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