Giter Site home page Giter Site logo

elliptic.jl's Introduction

Elliptic Special Functions for Julia

This julia package provides the following:

Elliptic Integrals

K(m) Complete elliptic integral of the first kind, K(m) = F(π/2|m)
F(phi, m) Incomplete elliptic integral of the first kind, F(φ|m)
E(m) Complete elliptic integral of the second kind, E(m) = E(π/2|m)
E(phi, m) Incomplete elliptic integral of the second kind, E(φ|m)
Pi(n, phi, m) Incomplete elliptic integral of the third kind, Π(n;φ|m)

The parameter m = k^2 = sin(α)^2 where α is the modular angle and k is the modulus.

julia> import Elliptic

julia> Elliptic.K(0.5)
1.854074677301372

Jacobi Elliptic Functions

am(u, m) Jacobi amplitude, defined by u = F(am(u|m)|m)
sn(u, m) Jacobi elliptic function, sn(u|m) = sin(am(u|m))
cn(u, m) Jacobi elliptic function, cn(u|m) = cos(am(u|m))
dn(u, m) Jacobi elliptic function, dn(u|m) = sqrt(1 - m sn(u|m)^2)
cd(u, m) Jacobi elliptic function, cd(u|m)
sd(u, m) Jacobi elliptic function, sd(u|m)
nd(u, m) Jacobi elliptic function, nd(u|m) = 1/dn(u|m)
dc(u, m) Jacobi elliptic function, dc(u|m)
nc(u, m) Jacobi elliptic function, nc(u|m) = 1/cn(u|m)
sc(u, m) Jacobi elliptic function, sc(u|m)
ns(u, m) Jacobi elliptic function, ns(u|m) = 1/sn(u|m)
ds(u, m) Jacobi elliptic function, ds(u|m)
cs(u, m) Jacobi elliptic function, cs(u|m)
julia> import Elliptic.Jacobi

julia> Jacobi.sn(2, 9)
-0.15028246569211734

Matlab Compatibility

ellipj(u, m) returns (sn(u,m), cn(u,m), dn(u,m))
ellipke(m) returns (K(m), E(m))

For convenience, the matlab compatible ellipj and ellipke routines are also provided. ellipj(u,m) is equivalent to sn(u,m), cn(u,m), dn(u,m), but faster if you want all three. Likewise, ellipke(m) is equivalent to K(m), E(m), but faster if you want both.

julia> import Elliptic

julia> k,e = Elliptic.ellipke(0.5)
(1.854074677301372,1.3506438810476757)

julia> sn,cn,dn = Elliptic.ellipj(0.672, 0.36)
(0.6095196917919022,0.792770928653356,0.9307281387786907)

Installation

julia> Pkg.update()

julia> Pkg.add("Elliptic")

Definitions

F(\phi|m) = \int_0^\phi d\theta (1 - m\sin^2\theta)^{-1/2}

E(\phi|m) = \int_0^\phi d\theta (1 - m\sin^2\theta)^{1/2}

\Pi(n;\varphi|m) = \int_0^\varphi d\theta, (1-n\sin^2\theta)^{-1}(1 - m\sin^2\theta)^{-1/2}

elliptic.jl's People

Contributors

nolta avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.