7.46 Bug in derivative of JacobiDN in Maple 5 and Maple 6 (27.4.98)

7.46.1 Robert Michael Sinclair

7.46.1 Robert Michael Sinclair

Maple V R5’s expression for the partial derivative of JacobiDN with respect to its second argument is incorrect (the sign of the first summand is wrong, see below). A workaround is to substitute all occurrences of JacobiDN(u,k) in an expression which is to be differentiated with sqrt(1-k^2*JacobiSN(u,k)^2), and then differentiate.

In the following,

dj(u,k) returns Maple’s incorrect expression for the derivative,

cdj(u,k) returns Maple’s expression but with a minus sign before the first summand inserted by hand,

ndj(u,k,h) approximates the derivative by the standard difference quotient with step h, and

sdj(u,k) returns an expression computed using the workaround suggested above:

    |\^/|     Maple V Release 5 (WMI Campus Wide License) 
._|\|   |/|_. Copyright (c) 1981-1997 by Waterloo Maple Inc. All rights 
 \  MAPLE  /  reserved. Maple and Maple V are registered trademarks of 
 <____ ____>  Waterloo Maple Inc. 
      |       Type ? for help. 
 
> dj:=unapply(diff(JacobiDN(u,k),k),u,k); 
 
                                  2 
                  k JacobiSN(u, k)  JacobiDN(u, k) 
  dj := (u, k) -> -------------------------------- 
                                    2 
                               1 - k 
 
         - k JacobiCN(u, k) JacobiSN(u, k) u + 
 
        k JacobiCN(u, k) JacobiSN(u, k) EllipticE(JacobiSN(u, k), k)/ 
 
              2 
        (1 - k ) 
 
> lprint(dj(u,k)); 
 
   k*JacobiSN(u,k)^2*JacobiDN(u,k)/(1-k^2)-k*JacobiCN(u,k)*JacobiSN(u,k)*u 
  +k*JacobiCN(u,k)*JacobiSN(u,k)/(1-k^2)*EllipticE(JacobiSN(u,k),k) 
 
> cdj:=(u,k)-> 
> -k*JacobiSN(u,k)^2*JacobiDN(u,k)/(1-k^2)-k*JacobiCN(u,k)*JacobiSN(u,k)*u 
> +k*JacobiCN(u,k)*JacobiSN(u,k)/(1-k^2)*EllipticE(JacobiSN(u,k),k); 
 
                                     2 
                     k JacobiSN(u, k)  JacobiDN(u, k) 
  cdj := (u, k) -> - -------------------------------- 
                                       2 
                                  1 - k 
 
         - k JacobiCN(u, k) JacobiSN(u, k) u + 
 
        k JacobiCN(u, k) JacobiSN(u, k) EllipticE(JacobiSN(u, k), k)/ 
 
              2 
        (1 - k ) 
 
> ndj:=(u,k,h)->(JacobiDN(u,k+h)-JacobiDN(u,k))/h; 
 
                           JacobiDN(u, k + h) - JacobiDN(u, k) 
       ndj := (u, k, h) -> ----------------------------------- 
                                            h 
 
> sdj:=unapply(diff(sqrt(1-k^2*JacobiSN(u,k)^2),k),u,k); 
 
                       /                                           / 
                       |                   2      2                | 
  sdj := (u, k) -> 1/2 |-2 k JacobiSN(u, k)  - 2 k  JacobiSN(u, k) | 
                       |                                           | 
                       \                                           \ 
 
                                           3 
        k JacobiSN(u, k)   k JacobiSN(u, k) 
        ---------------- - ----------------- 
                  2                  2 
             1 - k              1 - k 
 
           u JacobiCN(u, k) JacobiDN(u, k) 
         + ------------------------------- 
                          k 
 
           JacobiCN(u, k) JacobiDN(u, k) EllipticE(JacobiSN(u, k), k) 
         - ---------------------------------------------------------- 
                                           2 
                                   k (1 - k ) 
 
        \\ 
        ||   /           2               2 
        ||  /  sqrt(1 - k  JacobiSN(u, k) ) 
        || / 
        // 
 
> Digits:=40; 
 
                             Digits := 40 
 
> evalf(dj(0.5,0.99)); 
 
              18.69744889484428844442342684197247575734 
 
> evalf(cdj(0.5,0.99)); 
 
              -.220767304895483330592093370822369837823 
 
> evalf(ndj(0.5,0.99,0.001)); evalf(ndj(0.5,0.99,0.0001)); 
 
              -.2208718933423780652373652837059697338000 
              -.2207777643737089925867484805746685460000 
 
> evalf(sdj(0.5,0.99)); 
 
              -.2207673048954833305920933708223698378326
 

See also: Bug in Jacobi elliptic function

It is corrected with Maple 7 (U. Klein)