Title: | Calculate Solutions to the Kelvin Differential Equation using Bessel Functions |
---|---|
Description: | Uses Bessel functions to calculate the fundamental and complementary analytic solutions to the Kelvin differential equation. |
Authors: | Andrew J Barbour |
Maintainer: | Andrew J Barbour <[email protected]> |
License: | GPL (>= 2) |
Version: | 2.0-2 |
Built: | 2025-01-24 02:53:33 UTC |
Source: | https://github.com/abarbour/kelvin |
The functions here use Bessel functions to calculate the analytic solutions to the Kelvin differential equation, namely the fundamental (Be) and equivalent (Ke) complex functions.
The complex second-order ordinary differential equation, known as the Kelvin differential equation, is defined as
and has a suite of complex solutions. One set of solutions,
, is defined in the following manner:
where
is a Bessel function of the first kind, and
is a modified Bessel function of the first kind.
Similarly, the complementary solutions, ,
are defined as
where is a modified Bessel function of the second kind.
The relationships between in the differential equation, and
the solutions
and
are as follows
In the case where , the differential equation reduces to
which has the set of solutions:
This package has functions to calculate
and
.
Andrew Barbour <[email protected]>
Abramowitz, M. and Stegun, I. A. (Eds.). "Kelvin Functions."
in Handbook of Mathematical Functions with Formulas, Graphs,
and Mathematical Tables, 9th printing. New York: Dover, pp. 379-381, 1972.
Kelvin functions: http://mathworld.wolfram.com/KelvinFunctions.html
Bessel functions: http://mathworld.wolfram.com/BesselFunction.html
Fundamental solution: Beir
Equivalent solution: Keir
This function calculates the complex solution to the Kelvin differential
equation using modified Bessel functions of the first kind, specifically
those produced by BesselJ
.
Beir(x, ...) ## Default S3 method: Beir(x, nu. = 0, nSeq. = 1, return.list = FALSE, ...) Bei(...) Ber(...)
Beir(x, ...) ## Default S3 method: Beir(x, nu. = 0, nSeq. = 1, return.list = FALSE, ...) Bei(...) Ber(...)
x |
numeric; values to evaluate the complex solution at |
... |
|
nu. |
numeric; value of |
nSeq. |
positive integer; equivalent to |
return.list |
logical; Should the result be a list instead of matrix? |
Ber
and Bei
are wrapper functions
which return the real and imaginary components of Beir
, respectively.
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
http://mathworld.wolfram.com/KelvinFunctions.html
Imaginary: http://mathworld.wolfram.com/Bei.html
Real: http://mathworld.wolfram.com/Ber.html
Beir(1:10) # defaults to nu.=0 Beir(1:10, nu.=2) Beir(1:10, nSeq.=2) Beir(1:10, nSeq.=2, return.list=TRUE) # Imaginary component only Bei(1:10) # Real component only Ber(1:10)
Beir(1:10) # defaults to nu.=0 Beir(1:10, nu.=2) Beir(1:10, nSeq.=2) Beir(1:10, nSeq.=2, return.list=TRUE) # Imaginary component only Bei(1:10) # Real component only Ber(1:10)
This function calculates the complex solution to the Kelvin differential
equation using modified Bessel functions of the second kind, specifically
those produced by BesselK
.
Keir(x, ...) ## Default S3 method: Keir( x, nu. = 0, nSeq. = 1, add.tol = TRUE, return.list = FALSE, show.scaling = FALSE, ... ) Kei(...) Ker(...)
Keir(x, ...) ## Default S3 method: Keir( x, nu. = 0, nSeq. = 1, add.tol = TRUE, return.list = FALSE, show.scaling = FALSE, ... ) Kei(...) Ker(...)
x |
numeric; values to evaluate the complex solution at |
... |
|
nu. |
numeric; value of |
nSeq. |
positive integer; equivalent to |
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? |
Ker
and Kei
are wrapper functions
which return the real and imaginary components of Keir
,, respectively.
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
http://mathworld.wolfram.com/KelvinFunctions.html
Imaginary: http://mathworld.wolfram.com/Kei.html
Real: http://mathworld.wolfram.com/Ker.html
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)
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)