Landen's transformation is a mapping of the parameters of an elliptic integral, useful for the efficient numerical evaluation of elliptic functions. It was originally due to John Landen and independently rediscovered by Carl Friedrich Gauss.
The incomplete elliptic integral of the first kind F is
                    F        (        φ        ∖        α        )        =        F        (        φ        ,        sin                α        )        =                  ∫                      0                                φ                                                              d              θ                                      1              −              (              sin                            θ              sin                            α                              )                                  2                                                                    ,                where                     α                 is the modular angle. Landen's transformation states that if                               α                      0                                  ,                               α                      1                                  ,                               φ                      0                                  ,                               φ                      1                                   are such that                     (        1        +        sin                          α                      1                          )        (        1        +        cos                          α                      0                          )        =        2                 and                     tan                (                  φ                      1                          −                  φ                      0                          )        =        cos                          α                      0                          tan                          φ                      0                                  , then
                                                                        F                (                                  φ                                      0                                                  ∖                                  α                                      0                                                  )                                                            =                (                1                +                cos                                                  α                                      0                                                                    )                                      −                    1                                                  F                (                                  φ                                      1                                                  ∖                                  α                                      1                                                  )                                                                                                  =                                                                            1                      2                                                                      (                1                +                sin                                                  α                                      1                                                  )                F                (                                  φ                                      1                                                  ∖                                  α                                      1                                                  )                .                                                            Landen's transformation can similarly be expressed in terms of the elliptic modulus                     k        =        sin                α                 and its complement                               k          ′                =        cos                α                .
Consider an example when the transformation does not change the value of the integral. Let
                    I        =                  ∫                      0                                              π              2                                                            1                                          a                                  2                                                            cos                                  2                                                          (              θ              )              +                              b                                  2                                                            sin                                  2                                                          (              θ              )                                              d        θ                and                                           a                                   and                                           b                                   are replaced by their arithmetic and geometric means respectively, that is
                              a                      1                          =                                            a              +              b                        2                          ,                          b                      1                          =                              a            b                          ,                                              I                      1                          =                  ∫                      0                                              π              2                                                            1                                          a                                  1                                                  2                                                            cos                                  2                                                          (              θ              )              +                              b                                  1                                                  2                                                            sin                                  2                                                          (              θ              )                                              d        θ        .                Therefore,
                    I        =                              1            a                          K        (                                            (                              a                                  2                                            −                              b                                  2                                            )                        a                          )        ,                                              I                      1                          =                              2                          a              +              b                                      K        (                                            a              −              b                                      a              +              b                                      )        .                From equation (aa) we conclude
                    K        (                                            (                              a                                  2                                            −                              b                                  2                                            )                        a                          )        =                                            2              a                                      a              +              b                                      K        (                                            a              −              b                                      a              +              b                                      )                and                               I                      1                          =        I                .
The same equation can be proved by integration by substitution. It is convenient to first cast the integral in an algebraic form by a substitution of                                           θ            =            arctan                                      (                                                x                  b                                            )                                              ,                                           d            θ            =                          (                                                1                  b                                                            cos                                  2                                                          (              θ              )              )                        d            x                                   giving
                    I        =                  ∫                      0                                              π              2                                                            1                                          a                                  2                                                            cos                                  2                                                          (              θ              )              +                              b                                  2                                                            sin                                  2                                                          (              θ              )                                              d        θ        =                  ∫                      0                                ∞                                                1                          (                              x                                  2                                            +                              a                                  2                                            )              (                              x                                  2                                            +                              b                                  2                                            )                                              d        x                A further substitution of                                           x            =            t            +                                                            t                                      2                                                  +                a                b                                                             gives the desired result
                                                                        I                                                            =                                  ∫                                      0                                                        ∞                                                                                        1                                          (                                              x                                                  2                                                                    +                                              a                                                  2                                                                    )                      (                                              x                                                  2                                                                    +                                              b                                                  2                                                                    )                                                                                      d                x                                                                                                  =                                  ∫                                      −                    ∞                                                        ∞                                                                                        1                                          2                                                                                                    (                                                          t                                                              2                                                                                      +                                                                                          (                                                                                                                                            a                                      +                                      b                                                                        2                                                                                                  )                                                                                            2                                                                                      )                                                    (                                                      t                                                          2                                                                                +                          a                          b                          )                                                                                                                                    d                t                                                                                                  =                                  ∫                                      0                                                        ∞                                                                                        1                                                                  (                                                  t                                                      2                                                                          +                                                                              (                                                                                                                            a                                  +                                  b                                                                2                                                                                      )                                                                                2                                                                          )                                                                    (                                                  t                                                      2                                                                          +                                                                              (                                                                                          a                                b                                                                                      )                                                                                2                                                                          )                                                                                                            d                t                                                            This latter step is facilitated by writing the radical as
                                          (                          x                              2                                      +                          a                              2                                      )            (                          x                              2                                      +                          b                              2                                      )                          =        2        x                                            t                              2                                      +                                          (                                                                            a                      +                      b                                        2                                                  )                                            2                                                            and the infinitesimal as
                    d        x        =                              x                                          t                                  2                                            +              a              b                                              d        t                so that the factor of                                           x                                   is recognized and cancelled between the two factors.
Arithmetic-geometric mean and Legendre's first integral
If the transformation is iterated a number of times, then the parameters                                           a                                   and                                           b                                   converge very rapidly to a common value, even if they are initially of different orders of magnitude. The limiting value is called the arithmetic-geometric mean of                                           a                                   and                                           b                                  ,                                           AGM                        (            a            ,            b            )                                  . In the limit, the integrand becomes a constant, so that integration is trivial
                    I        =                  ∫                      0                                              π              2                                                            1                                          a                                  2                                                            cos                                  2                                                          (              θ              )              +                              b                                  2                                                            sin                                  2                                                          (              θ              )                                              d        θ        =                  ∫                      0                                              π              2                                                            1                          AGM                            (              a              ,              b              )                                              d        θ        =                              π                          2                            AGM                            (              a              ,              b              )                                              The integral may also be recognized as a multiple of Legendre's complete elliptic integral of the first kind. Putting                                                         b                              2                                      =                          a                              2                                      (            1            −                          k                              2                                      )                                  
                    I        =                              1            a                                    ∫                      0                                              π              2                                                            1                          1              −                              k                                  2                                                            sin                                  2                                                          (              θ              )                                              d        θ        =                              1            a                          F                  (                                    π              2                                ,          k          )                =                              1            a                          K        (        k        )                Hence, for any                                           a                                  , the arithmetic-geometric mean and the complete elliptic integral of the first kind are related by
                    K        (        k        )        =                                            π              a                                      2                            AGM                            (              a              ,              a                                                1                  −                                      k                                          2                                                                                  )                                              By performing an inverse transformation (reverse arithmetic-geometric mean iteration), that is
                              a                      −            1                          =        a        +                                            a                              2                                      −                          b                              2                                                                                                  b                      −            1                          =        a        −                                            a                              2                                      −                          b                              2                                                                                        AGM                (        a        ,        b        )        =        AGM                (        a        +                                            a                              2                                      −                          b                              2                                                    ,        a        −                                            a                              2                                      −                          b                              2                                                    )                        the relationship may be written as
                    K        (        k        )        =                                            π              a                                      2                            AGM                            (              a              (              1              +              k              )              ,              a              (              1              −              k              )              )                                                      which may be solved for the AGM of a pair of arbitrary arguments;
                    AGM                (        u        ,        v        )        =                                            π              (              u              +              v              )                                      4              K                              (                                                                            u                      −                      v                                                              v                      +                      u                                                                      )                                                    .                The definition adopted here for                                           K            (            k            )                                   differs from that used in the arithmetic-geometric mean article, such that                                           K            (            k            )                                   here is                                           K            (                          m                              2                                      )                                   in that article.