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?
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?
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}
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 :] .
Solve[]/Reduce[] on Denominator[f[x]].
– J. M.'s missing motivation
Jul 27 '15 at 13:20
Solve then you may have to go numeric, like NSolve or NRoots.
– Sumit
Jul 27 '15 at 16:53