The inverse Z-transform of a rational function: invztrans

### 6.58.2 The inverse Z-transform of a rational function: invztrans

The inverse Z-transform of a rational expression is a formula for the general term of a sequence with the given rational expression as its Z-transform. The invztrans command finds the inverse Z-transform of a rational expression.

- invztrans command takes one mandatory and two optional arguments:
  - rat, a rational expression.
  - Optionally, x the variable (by default x).
  - Optionally, n, a variable to be used by the result (by default x).
- ztrans(rat ⟨ x,n⟩) returns the inverse Z-transform of rat.

Examples.

- Input:
  invztrans(x/(x-1))
  Output:

  1

  (since ztrans(1)=x/(x-1))
- Input:
  invztrans(z/(z-1),z,n)
  Output:

  1

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

  x

- Input:
  invztrans(z/(z-1)^2,z,n)
  Output:

  n