This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Add-ons / Standard Packages / DiscreteMath  /


The term transform usually refers to a mathematical operation that takes a given function and returns a new function. The transformation is sometimes done by means of a sum formula. Examples include the transform and the discrete-time Fourier transform. Transforms are frequently used to change a complicated problem into a simpler one. The simpler problem is then solved, usually using elementary algebraic means. The solution to the simpler problem is taken over to the original problem using the inverse transform. A standard example is the use of the transform to solve a difference or recurrence equation.
This package implements the transform. The transform of a function of the integer-valued variable is the function defined by . The package DiscreteMath`RSolve`

is automatically loaded.

The transform and its inverse.

  • This loads the package.
  • In[1]:= <<DiscreteMath`ZTransform`

  • This evaluates a

  • In[2]:= ZTransform[Sin[n], n, z]


  • The functions you are transforming can contain symbolic quantities.
  • In[3]:= ZTransform[n^3 a^n, n, z]


  • Here is the inverse

    transform of the previous result.
  • In[4]:= InverseZTransform[%, z, n] // Together


  • ZTransform knows the standard properties of the transform such as linearity and the behavior of differences. The superscript (0,0,1) means the first derivative with respect to the third variable.
  • In[5]:= ZTransform[f[n] - f[n-1] + -n^2 g[n], n, z]


    ZTransform recognizes the Kronecker delta function KroneckerDelta and the discrete unit step function DiscreteStep. These functions are discussed in the section on the DiscreteMath`KroneckerDelta` package.

  • Here is a transform of an expression involving a delta function.
  • In[6]:= ZTransform[Sin[n] KroneckerDelta[n - 7], n, z]


  • The inverse transforms of many standard functions include delta functions.
  • In[7]:= InverseZTransform[ArcTan[1/z], z, n]


  • The convention is to make the assumptions about parameters necessary for the transform to exist. However, if the form the transform takes depends on the assumptions made, then the transform will return unevaluated.
  • In[8]:= ZTransform[DiscreteStep[n - b], n, z]


  • Assumptions about parameters can be made by defining Positive, Negative, Sign, or IntegerQ for a parameter. This is the transform for a step on the positive real axis.
  • In[9]:= b /: Positive[b] = True;
    b /: IntegerQ[b] = True;
    ZTransform[DiscreteStep[n - b], n, z]


  • Here the step is on the negative real axis, outside the summation limits of the

  • In[12]:= c /: Sign[c] = 1;
    c /: IntegerQ[c] = True;
    ZTransform[DiscreteStep[n + c], n, z]