Elliptic Functions and Integrals
Labels: feature, triaged, module: special

# Elliptic Functions and Integrals

A brief proposal for providing a complete suite of elliptic functions and integrals as PyTorch operators. Enjoy!

One of a five-part series of special functions issues:

- Bessel and Related Functions (#76324)
- Elliptic Functions and Integrals (#80157)
- Gamma and Related Functions (#78065)
- Orthogonal Polynomials (#80152)
- 

## Parameterization

More than any other special functions, elliptic functions and integrals are expressed in various ways. In particular, the parameter is expressed using the modulus, $k$, modular angle, \alpha, or the parameter $m$. 

The following formulas relate them:

$k = \sin \times \alpha$

$m = k^{2} = \sin \times 2 \times \alpha$

So that the integral of the third kind (for example) may be expressed as either:

$\Pi(n, φ, k)$
$\Pi(n, φ, α)$
$\Pi(n, φ, m)$

This proposal provides `k` and `m` variations denoted by either `_k` or `_m` suffixes.

## API

### Elliptic Integrals (*k*)

- [ ] `complete_elliptic_integral_k_e(input: Tensor, *, out=None) → Tensor`

- [ ] `complete_elliptic_integral_k_k(input: Tensor, *, out=None) → Tensor`

### Elliptic Integrals (*m*)

- [ ] `complete_elliptic_integral_m_e(input: Tensor, *, out=None) → Tensor`

- [ ] `complete_elliptic_integral_m_k(input: Tensor, *, out=None) → Tensor`

### Jacobi Elliptic Functions (*k*)

- [ ] `jacobi_elliptic_k_amplitude(input: Tensor, k, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_k_cd(input: Tensor, k, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_k_cn(input: Tensor, k, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_k_cs(input: Tensor, k, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_k_dc(input: Tensor, k, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_k_dn(input: Tensor, k, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_k_ds(input: Tensor, k, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_k_nc(input: Tensor, k, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_k_nd(input: Tensor, k, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_k_ns(input: Tensor, k, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_k_sc(input: Tensor, k, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_k_sd(input: Tensor, k, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_k_sn(input: Tensor, k, *, out=None) → Tensor`

### Jacobi Elliptic Functions (*m*)

- [ ] `jacobi_elliptic_m_amplitude(input: Tensor, m, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_m_cd(input: Tensor, m, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_m_cn(input: Tensor, m, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_m_cs(input: Tensor, m, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_m_dc(input: Tensor, m, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_m_dn(input: Tensor, m, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_m_ds(input: Tensor, m, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_m_nc(input: Tensor, m, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_m_nd(input: Tensor, m, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_m_ns(input: Tensor, m, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_m_sc(input: Tensor, m, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_m_sd(input: Tensor, m, *, out=None) → Tensor`

- [ ] `jacobi_elliptic_m_sn(input: Tensor, m, *, out=None) → Tensor`

### Inverse Jacobi Elliptic Functions (*k*)

- [ ] `inverse_jacobi_elliptic_k_cd(input: Tensor, k, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_k_cn(input: Tensor, k, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_k_cs(input: Tensor, k, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_k_dc(input: Tensor, k, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_k_dn(input: Tensor, k, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_k_ds(input: Tensor, k, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_k_nc(input: Tensor, k, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_k_nd(input: Tensor, k, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_k_ns(input: Tensor, k, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_k_sc(input: Tensor, k, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_k_sd(input: Tensor, k, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_k_sn(input: Tensor, k, *, out=None) → Tensor`

### Inverse Jacobi Elliptic Functions (*m*)

- [ ] `inverse_jacobi_elliptic_m_cd(input: Tensor, m, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_m_cn(input: Tensor, m, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_m_cs(input: Tensor, m, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_m_dc(input: Tensor, m, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_m_dn(input: Tensor, m, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_m_ds(input: Tensor, m, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_m_nc(input: Tensor, m, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_m_nd(input: Tensor, m, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_m_ns(input: Tensor, m, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_m_sc(input: Tensor, m, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_m_sd(input: Tensor, m, *, out=None) → Tensor`

- [ ] `inverse_jacobi_elliptic_m_sn(input: Tensor, m, *, out=None) → Tensor`

- [ ] `carlson_elliptic_integral_rc(x, y)`

- [ ] `carlson_elliptic_integral_rd(x, y, z)`

- [ ] `carlson_elliptic_integral_rf(x, y, z)`

- [ ] `carlson_elliptic_integral_rg(x, y, z)`

### Jacobi Theta Functions

- [ ] `jacobi_theta_1(x, q)`

- [ ] `jacobi_theta_2(x, q)`

- [ ] `jacobi_theta_3(x, q)`

- [ ] `jacobi_theta_4(x, q)`

### Jacobi Theta Derivatives

- [ ] `jacobi_theta_derivative_1(x, q)`

- [ ] `jacobi_theta_derivative_2(x, q)`

- [ ] `jacobi_theta_derivative_3(x, q)`

- [ ] `jacobi_theta_derivative_4(x, q)`