Search code examples
rwolfram-mathematicaintegralwolframalpha

I want to use the function EllipticE( ), ElliptctcF( ) EllipticK( ) functions used in Wolfram in R


I have installed the pracma package, and I know there is a function is called ellipke() in R,this can be used in the same way as EllipticE() and EllipticF() in Wolfram, These functions are used for solving elliptical integrals, but the way to use these functions in Walfram is with two arguments for example like this:

EllipticK[2,3], mathematically is E(2|3).First I need to use a function like EllipticK() in R. Second I could used ellipke() (in R) like if I using EllipticE() and EllipticF() in Wolfram but only with one argument, for example in Wolfram is EllipticE(2,1) but in R just allow me do ellipke(2).


Solution

  • Use the Carlson package:

    > Carlson::elliptic_E(2,3)
    [1] 0.475224+1.591887i
    

    This is identical to EllipticE[2,3].

    EllipticK is the complete elliptic integral of first kind:

    EllipticK[x] = EllipticF[Pi/2,x]
    

    With Carlson:

    > Carlson::elliptic_F(pi/2,3)
    [1] 1.001077-1.17142i
    

    Identical to EllipticK[3].