residue: Residue

Description Usage Arguments Details Value Author(s) Examples

Description

Calculate the residue of a complex-valued function using limits. Note that this function only works for simple poles.

Usage

1
residue(f, z0)

Arguments

f

A function whose residue to be calculated.

z0

A real or complex number at which the residue is evaluated.

Details

This function calculates Res(f,z_0) by taking the limit of (z-z_0)f(z) as z -> z_0. Therefore, z0 should be a simple pole (including one on the branch cut; see Examples).

Value

The calculated residue.

Author(s)

Char Leung

Examples

1
2
3
4
#The following function has three poles (exp(1i*pi), exp(1i*pi/3) and exp(5i*pi/3)). 
# exp(1i*pi) is a pole on the branch cut thus the other function "disc.integrate" 
# should not be used.
residue(function(z){log(z)/(1+z^3)},exp(1i*pi))

ComplexAnalysis documentation built on Jan. 15, 2017, 10:24 a.m.