# WeierstrassP: Weierstrass P and related functions In elliptic: Weierstrass and Jacobi Elliptic Functions

## Description

Weierstrass elliptic function and its derivative, Weierstrass sigma function, and the Weierstrass zeta function

## Usage

 ```1 2 3 4``` ```P(z, g=NULL, Omega=NULL, params=NULL, use.fpp=TRUE, give.all.3=FALSE, ...) Pdash(z, g=NULL, Omega=NULL, params=NULL, use.fpp=TRUE, ...) sigma(z, g=NULL, Omega=NULL, params=NULL, use.theta=TRUE, ...) zeta(z, g=NULL, Omega=NULL, params=NULL, use.fpp=TRUE, ...) ```

## Arguments

 `z` Primary complex argument `g` Invariants `g=c(g2,g3)`. Supply exactly one of (`g`, `Omega`, `params`) `Omega` Half periods `params` Object with class “`parameters`” (typically provided by `parameters()`) `use.fpp` Boolean, with default `TRUE` meaning to calculate P(z^C) where z^C is congruent to z in the period lattice. The default means that accuracy is greater for large z but has the deficiency that slight discontinuities may appear near parallelogram boundaries `give.all.3` Boolean, with default `FALSE` meaning to return P(z) and `TRUE` meaning to return the other forms given in equation 18.10.5, p650. Use `TRUE` to check for accuracy `use.theta` Boolean, with default `TRUE` meaning to use theta function forms, and `FALSE` meaning to use a Laurent expansion. Usually, the theta function form is faster, but not always `...` Extra parameters passed to `theta1()` and `theta1dash()`

## Note

In this package, function `sigma()` is the Weierstrass sigma function. For the number theoretic divisor function also known as “sigma”, see `divisor()`.

## Author(s)

Robin K. S. Hankin

## References

R. K. S. Hankin. Introducing Elliptic, an R package for Elliptic and Modular Functions. Journal of Statistical Software, Volume 15, Issue 7. February 2006.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53``` ```## Example 8, p666, RHS: P(z=0.07 + 0.1i,g=c(10,2)) ## Example 8, p666, RHS: P(z=0.1 + 0.03i,g=c(-10,2)) ## Right answer! ## Compare the Laurent series, which also gives the Right Answer (tm): P.laurent(z=0.1 + 0.03i,g=c(-10,2)) ## Now a nice little plot of the zeta function: x <- seq(from=-4,to=4,len=100) z <- outer(x,1i*x,"+") view(x,x,limit(zeta(z,c(1+1i,2-3i))),nlevels=6,scheme=1) #now figure 18.5, top of p643: p <- parameters(Omega=c(1+0.1i,1+1i)) n <- 40 f <- function(r,i1,i2=1)seq(from=r+1i*i1, to=r+1i*i2,len=n) g <- function(i,r1,r2=1)seq(from=1i*i+r1,to=1i*i+2,len=n) solid.lines <- c( f(0.1,0.5),NA, f(0.2,0.4),NA, f(0.3,0.3),NA, f(0.4,0.2),NA, f(0.5,0.0),NA, f(0.6,0.0),NA, f(0.7,0.0),NA, f(0.8,0.0),NA, f(0.9,0.0),NA, f(1.0,0.0) ) dotted.lines <- c( g(0.1,0.5),NA, g(0.2,0.4),NA, g(0.3,0.3),NA, g(0.4,0.2),NA, g(0.5,0.0),NA, g(0.6,0.0),NA, g(0.7,0.0),NA, g(0.8,0.0),NA, g(0.9,0.0),NA, g(1.0,0.0),NA ) plot(P(z=solid.lines,params=p),xlim=c(-4,4),ylim=c(-6,0),type="l",asp=1) lines(P(z=dotted.lines,params=p),xlim=c(-4,4),ylim=c(-6,0),type="l",lty=2) ```

### Example output

```Attaching package: 'elliptic'

The following objects are masked from 'package:stats':

sd, sigma

The following object is masked from 'package:base':

is.primitive

[1] -22.9745-63.05323i
[1] 76.58833-50.50379i
[1] 76.58833-50.50379i
Warning message:
In parameters(Omega = c(1 + (0+0.1i), 1 + (0+1i))) :
Omega supplied not a primitive pair of half periods.  Function converting Omega to a primitive pair
```

elliptic documentation built on May 2, 2019, 9:37 a.m.