The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
An elliptic function is a meromorphic complex function that is periodic in two directions. That is, there exist two nonzero complex numbers with such that
whenever is defined; note carefully the factors of 2. There are two natural ways of presenting elliptic functions: that of Weierstrass, and that of Jacobi. Historically, the Jacobi form was first presented and is the most practically useful, but the Weierstrass form is more elegant (IMO).
Terminology follows that of Abramowitz and Stegun wherever possible.
To install the most recent stable version on CRAN, use
install.packages()
at the R prompt:
R> install.packages("elliptic")
To install the current development version use
devtools
:
R> devtools::install_github("RobinHankin/elliptic")
And then to load the package use library()
:
library("elliptic")
The package comes with an extensive and detailed vignette; type
vignette("elliptic")
at the R commandline.
The Weierstrass elliptic function is evaluated numerically by
P()
, which takes the half periods . Thus
<- 0.3 + 0.2i
z <- 5+1i; omega2 <- 1+7i # half-periods
omega1 <- function(z){P(z,Omega=c(omega1,omega2))}
f c(f(z),f(z + 10+2i), f(z + 2+14i)) # should be equal
## [1] 2.958647-7.100563i 2.958647-7.100563i 2.958647-7.100563i
The elliptic functions can be visualised using
view()
:
<- seq(from=-4, to=4, len=200)
x <- x
y <- outer(x,1i*x, "+")
z <- P(z, c(1+1i,2-3i))
f par(pty="s")
view(x,y,f,real.contour=FALSE,drawlabel=FALSE,axes=FALSE,xlab="Re(z)",ylab="Im(z)", main="P(z,1+i,2-3i)")
axis(1,pos = -4)
axis(2,pos = -4)
lines(x=c(-4,4),y=c(4,4))
lines(y=c(-4,4),x=c(4,4))
Related functions include (sigma()
and the (zeta()
).
Jacobi’s elliptic functions are implemented in the package with their
standard names sn()
, cn()
, dn()
etc. For example:
view(x,y,sn(z,m=6),real=FALSE,drawlabel=FALSE,axes=FALSE,xlab="Re(z)",ylab="Im(z)", main="The Jacobi sn() function")
axis(1,pos = -4,at=c(-4,-2,0,2,4))
axis(2,pos = -4,at=c(-4,-2,0,2,4))
lines(x=c(-4,4),y=c(4,4))
lines(y=c(-4,4),x=c(4,4))
The Jacobi forms are useful in physics and we can use them to visualise potential flow in a rectangle:
<- 300
n <- K.fun(1/2) # aspect ratio
K <- function(z){1i*log((z-1.7+3i)*(z-1.7-3i)/(z+1-0.3i)/(z+1+0.3i))} # position of source and sink
f <- seq(from=-K,to=K,len=n)
x <- seq(from=0,to=K,len=n)
y <- outer(x,1i*y,"+")
z
view(x, y, f(sn(z,m=1/2)), nlevels=44, real.contour=TRUE, drawlabels=FALSE,
main="Potential flow in a rectangle",axes=FALSE,xlab="",ylab="")
rect(-K,0,K,K,lwd=3)
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.