Learn R Programming

ComplexAnalysis (version 1.0)

limit: Limit of a function

Description

Calculate the limit of a complex-valued function from any direction on the complex plane.

Usage

limit(f, z0, z = NULL, track = FALSE)

Arguments

f
The function whose limit to be calculated.
z0
The point at which the limit is calculated. It can also be infinity on the complex plane. That is, -Inf, Inf, -Inf*1i and Inf*1i.
z
Is NULL if calculating the limit at infinity otherwise a real or complex scalar or one of "right","upright","up","upleft","left","downleft","down" & "downright" as the starting point calculating the limit of approaching z0. Therefore, inserting any two real or complex numbers $z_1$ and $z_2$ such that $Arg(z_1-z_0)=Arg(z_2-z_0)$, would give the same result. Instead of specifying the direction by supplying a number, one of the following, "right","upright","up","upleft","left","downleft","down" & "downright", can also be used to represent the direction.
track
If TRUE, the record of the sequential calculation will be printed.

Value

value
The calculated limit.
comp2
The record of calculations. A six-column matrix indicating the count, epsilon (eps), input (input of f), output (output of f), delta1 (difference of the real part of two consecutive outputs) and delta2 (difference of the imaginary part of two consecutive outputs)

Details

Note: accuracy depends on (1) the effect of the rounding error and (2) how well-behaved (or badly behaved) the function is. For most functions, the result is accurate for at least 6 to 7 decimal places.

Examples

Run this code
limit(function(z){3*sin(z)/z+4},Inf,track=TRUE)

Run the code above in your browser using DataLab