# Numerator and denominator: f2nd fxnd

### 5.32.5 Numerator and denominator: f2nd fxnd

The f2nd command finds the numerator and denominator of rational function, after simplification.
fxnd is a synonym for f2nd.

- f2nd takes one argument:
  rat, a rational function.
- f2nd(rat) returns the list of the numerator and the denominator of the irreducible representation of rat.

#### Examples.

- Input:
  f2nd((x^2-1)/(x-1))
  Output:

  ⎡ ⎣ | x+1,1 | ⎤ ⎦

- Input:
  f2nd((x^2+2*x+1)/(x^2-1))
  Output:

  ⎡ ⎣ | x+1,x−1 | ⎤ ⎦