Accelerating the pace of engineering and science

# poles

Poles of expression or function

## Syntax

poles(f,var)
P = poles(f,var)
[P,N] = poles(f,var)
[P,N,R] = poles(f,var)
poles(f,var,a,b)
P = poles(f,var,a,b)
[P,N] = poles(f,var,a,b)
[P,N,R] = poles(f,var,a,b)

## Description

poles(f,var) finds nonremovable singularities of f. These singularities are called the poles of f. Here, f is a function of the variable var.

P = poles(f,var) finds the poles of f and assigns them to vector P.

[P,N] = poles(f,var) finds the poles of f and their orders. This syntax assigns the poles to vector P and their orders to vector N.

[P,N,R] = poles(f,var) finds the poles of f and their orders and residues. This syntax assigns the poles to vector P, their orders to vector N, and their residues to vector R.

poles(f,var,a,b) finds the poles in the interval (a,b).

P = poles(f,var,a,b) finds the poles of f in the interval (a,b) and assigns them to vector P.

[P,N] = poles(f,var,a,b) finds the poles of f in the interval (a,b) and their orders. This syntax assigns the poles to vector P and their orders to vector N.

[P,N,R] = poles(f,var,a,b) finds the poles of f in the interval (a,b) and their orders and residues. This syntax assigns the poles to vector P, their orders to vector N, and their residues to vector R.

## Input Arguments

 f Symbolic expression or function. var Symbolic variable. Default: Variable determined by symvar. a,b Real numbers (including infinities) that specify the search interval for function poles. Default: Entire complex plane.

## Output Arguments

 P Symbolic vector containing the values of poles. N Symbolic vector containing the orders of poles. R Symbolic vector containing the residues of poles.

## Examples

Find the poles of these expressions:

```syms x
poles(1/(x - i))
poles(sin(x)/(x - 1))```
```ans =
i

ans =
1```

Find the poles of this expression. If you do not specify a variable, poles uses the default variable determined by symvar:

```syms x a
poles(1/((x - 1)*(a - 2)))```
```ans =
1```

To find the poles of this expression as a function of variable a, specify a as the second argument:

```syms x a
poles(1/((x - 1)*(a - 2)), a)```
```ans =
2```

Find the poles of the tangent function in the interval (-pi, pi):

```syms x
poles(tan(x), x, -pi, pi)```
```ans =
-pi/2
pi/2```

The tangent function has an infinite number of poles. If you do not specify the interval, poles cannot find all of them. It issues a warning and returns an empty symbolic object:

```syms x
poles(tan(x))```
```Warning: Cannot determine the poles.
ans =
[ empty sym ]```

If poles can prove that the expression or function does not have any poles in the specified interval, it returns an empty symbolic object without issuing a warning:

```syms x
poles(tan(x), x, -1, 1)```
```ans =
Empty sym: 0-by-1```

Use two output vectors to find the poles of this expression and their orders. Restrict the search interval to (-pi, 10*pi):

```syms x
[Poles, Orders] = poles(tan(x)/(x - 1)^3, x, -pi, pi)```
```Poles =
-pi/2
pi/2
1

Orders =
1
1
3```

Use three output vectors to find the poles of this expression and their orders and residues:

```syms x a
[Poles, Orders, Residues] = poles(a/x^2/(x - 1), x)```
```Poles =
1
0

Orders =
1
2

Residues =
a
-a```

expand all

### Tips

• If poles cannot find all nonremovable singularities and cannot prove that they do not exist, it issues a warning and returns an empty symbolic object.

• If poles can prove that f has no poles (either in the specified interval (a,b) or in the complex plane), it returns an empty symbolic object without issuing a warning.

• a and b must be real numbers or infinities. If you provide complex numbers, poles uses an empty interval and returns an empty symbolic object.