Learn R Programming

kelvin (version 1.2-2)

Keir: Equivalent solution to the Kelvin differential equation: Bessel-K

Description

This function calculates the complex solution to the Kelvin differential equation using modified Bessel functions of the second kind, specifically those produced by Bessel::BesselK.

Usage

Keir(xseq, nu. = 0, nSeq. = 1, add.tol = TRUE,
    return.list = FALSE, show.scaling = FALSE, ...)

## S3 method for class 'default': Keir(xseq, nu. = 0, nSeq. = 1, add.tol = TRUE, return.list = FALSE, show.scaling = FALSE, ...)

Kei(...)

Ker(...)

Arguments

xseq
vector; values to evaluate the complex solution at
nu.
scalar; value of $\nu$ in $\mathcal{K}_\nu$
nSeq.
positive integer; if $nSeq > 1$, computes the result for a sequence of values; if $\nu >= 0: \nu, \nu+1, \cdots, \nu+nSeq-1$, if $\nu < 0: \nu, \nu-1, \cdots, \nu-nSeq+1$.
add.tol
boolean; fudge factor to prevent an error for zero-values
return.list
boolean; Should the result be a list instead of matrix?
show.scaling
boolean; Should the normalization values be given as a message?
...
additional arguments. In Keir they are passed to Bessel::BesselK, and in Ker, and Kei they are passed

Value

  • If return.list==FALSE (the default), a complex matrix with as many columns as using nSeq. creates. Otherwise the result is a list with matrices for Real and Imaginary components.

Details

Ker and Kei are wrapper functions which return the real and imaginary components, respectively.

References

http://mathworld.wolfram.com/KelvinFunctions.html

Imaginary: http://mathworld.wolfram.com/Kei.html

Real: http://mathworld.wolfram.com/Ker.html

See Also

kelvin-package

Other solutions: Bei, Beir, Beir.default, Ber

Examples

Run this code
Keir(1:10)    # defaults to nu.=0, nSeq=1
Keir(1:10,nSeq=2)
Keir(1:10,nSeq=2,return.list=FALSE)
# Imaginary component only
Kei(1:10)
# Real component only
Ker(1:10)

Run the code above in your browser using DataLab