11
$\begingroup$

Is there a command to find the poles of a function $f=f(z)$?

example: let $$f(z) = \frac{1}{z^2-1}$$ then we know that the poles are at $z=\pm 1$ but is there a special command in mathematica to do this?

$\endgroup$
7
  • 3
    $\begingroup$ Solve[1/f[z] == 0, z]? $\endgroup$
    – Michael E2
    Jun 12, 2013 at 15:38
  • $\begingroup$ OK I thought there was some special command like Pole[f,z] or similar. Thanks, I'll try that. $\endgroup$
    – mapel
    Jun 12, 2013 at 15:40
  • 3
    $\begingroup$ Or, if you want to handle things like Tan[]: Reduce[1/Tan[x] == 0, x]]. Should work nicely for rational functions, too. $\endgroup$ Jun 12, 2013 at 15:43
  • $\begingroup$ @J. M. I think that is easier/smoother. $\endgroup$
    – mapel
    Jun 12, 2013 at 15:49
  • 1
    $\begingroup$ sometimes I use Solve[Denominator[f[z]]==0,z], but I would say this question is good because I also expect something much easier and more automatic (in case one doesn't want to organize the expression of f[z]). $\endgroup$
    – Leo Fang
    Jun 12, 2013 at 16:31

3 Answers 3

14
$\begingroup$

There is a special function for this: it's called TransferFunctionPoles. For the case you asked for:

TransferFunctionPoles[TransferFunctionModel[{{1/(z^2 - 1)}}, z]]

which returns the expected answer that there are two poles at

{{{-1, 1}}}

TransferFunctionPoles can also handle multivariable input/output models of the kind that control engineers like to play with, including symbolic transfer functions and time-delay systems. There are a number of related commands including TransferFunctionZeros, TransferFunctionModel, StateSpaceModel ways of converting continuous to discrete models, and special plotting functions like RootLocusPlot and NyquistPlot.

$\endgroup$
2
  • 5
    $\begingroup$ It doesn't work with Tan[z]. It complains about polynomial numerators and denominators. Is this method restricted to rational functions? $\endgroup$
    – Michael E2
    Jun 12, 2013 at 17:18
  • 5
    $\begingroup$ @@Michael E2 -- Whenever you see the phrase "transfer function," it implies rational functions. $\endgroup$
    – bill s
    Jun 12, 2013 at 18:12
4
$\begingroup$

Since V 13.0 we have FunctionPoles:"

From the documentation: "FunctionPoles returns a list of pairs {pole, multiplicity}."

f = 1 / (z^2 - 1);

FunctionPoles[f, z]

{{-1, 1}, {1, 1}}

To only get the poles:

{a, b} = FunctionPoles[f, z][[All, 1]]

{-1, 1}

Plot[f, {z, -10, 10},
 Epilog -> {Red, Dashed, InfiniteLine[{a, 0}, {0, 1}], InfiniteLine[{b, 0}, {0, 1}]},
 PlotRange -> Automatic]

enter image description here

$\endgroup$
2
$\begingroup$

Use FunctionDomain to find the real domain, then remove the whole line from the domain found. What is left are the poles. (this is all on the real line)

ClearAll[f,z]
f         = 1/(z^2-1)
domain    = FunctionDomain[f,z,Reals];
wholeLine = -Infinity < z < Infinity;

Reduce[ wholeLine && Not[domain],z,Reals]

Mathematica graphics

f         = Tan[z];
domain    = FunctionDomain[f,z,Reals];
wholeLine = -Infinity<z<Infinity;

Reduce[ wholeLine && Not[domain],z,Reals]

Mathematica graphics

It works for 2D also

ClearAll[f,x,y]
f         = 1/x Log[y];
domain    = FunctionDomain[f,{x,y},Reals];
wholeLine = {-Infinity<x<Infinity && -Infinity<y<Infinity};

Reduce[Join[wholeLine,{Not[domain]}],{x,y},Reals]

Mathematica graphics

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.