5

Is there a simple way to determine the order of the poles of a rational function?

I have a difficult function where I need Mathematica to find the poles. It would be interesting to also know what the order is. Does there exist a basic command?

Michael E2
  • 235,386
  • 17
  • 334
  • 747
cherzieandkressy
  • 339
  • 1
  • 2
  • 8

2 Answers2

11

One quick way for rational functions is to leverage built-in control system functions:

TransferFunctionPoles[TransferFunctionModel[1/(1 + s^2), s]][[1, 1]]
   {-I, I}
J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
8

Yo can go by solving the inverse of the function and then Count the solution.

f[x_] := x/(a - x)^3/(b - x);
div = x /. Solve[1/f[x] == 0, x];
poles = Union[div]
Count[div, #] & /@ poles

{a,b}

{3,1}

Depending on how complicated your function is, you may have to go for numerical treatment, like NSolve or NRoots.

Tally

As Guess who it is suggests, You can use Tally[div] instead of Count.

For some reason I always forget the right command at right time :] .

Sumit
  • 15,912
  • 2
  • 31
  • 73