# Keir: Complementary solution to the Kelvin differential equation... In kelvin: Calculate Solutions to the Kelvin Differential Equation using Bessel Functions

## Description

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

## Usage

 ```1 2 3 4 5 6 7 8 9``` ```Keir(x, ...) ## Default S3 method: Keir(x, nu. = 0, nSeq. = 1, add.tol = TRUE, return.list = FALSE, show.scaling = FALSE, ...) Kei(...) Ker(...) ```

## Arguments

 `x` numeric; values to evaluate the complex solution at `...` additional arguments passed to `BesselK` or `Keir` `nu.` numeric; value of ν in Kei,Ker solutions `nSeq.` positive integer; equivalent to `nSeq` in `BesselK` `add.tol` logical; Should a fudge factor be added to prevent an error for zero-values? `return.list` logical; Should the result be a list instead of matrix? `show.scaling` logical; Should the normalization values be given as a message?

## Details

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

## 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.

Andrew Barbour

## References

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

`kelvin-package`, `Beir`, `BesselK`
 ```1 2 3 4 5 6 7 8``` ```Keir(1:10) # defaults to nu.=0, nSeq=1 Keir(1:10, nu.=2) Keir(1:10, nSeq=2) Keir(1:10, nSeq=2, return.list=TRUE) # Imaginary component only Kei(1:10) # Real component only Ker(1:10) ```