Sun Nov  1 14:50:44 MST 1998
aquarius% reduce
REDUCE 3.6, 15-Jul-95, patched to 15 Apr 96 ...

1: % ---------[ R e d u c e ]----------
% ---------- Initialization ----------
on time;


Time: 0 ms

% ---------- Special Functions ----------
load_package(specfn)$


Time: 1490 ms  plus GC time: 40 ms
% Bernoulli numbers: B_16 => -3617/510   [Gradshteyn and Ryzhik 9.71]
Bernoulli(16);


  - 3617
---------
   510

Time: 20 ms

% d/dk E(phi, k) => [E(phi, k) - F(phi, k)]/k  where  F(phi, k) and E(phi, k)
% are elliptic integrals of the 1st and 2nd kind, respectively
% [Gradshteyn and Ryzhik 8.123(3)]
df(EllipticE(phi, k^2), k);


    3                 2                2 2
(2*k *(elliptice(phi,k )*jacobicn(phi,k )

                        2                2                2
        - jacobicn(phi,k )*jacobidn(phi,k )*jacobisn(phi,k )

                        2 2  4                     2 2         4
        - jacobisn(phi,k ) *k *phi + jacobisn(phi,k ) *phi))/(k  - 1)

Time: 20 ms

% Jacobian elliptic functions: d/du dn u => -k^2 sn u cn u
% [Gradshteyn and Ryzhik 8.158(3)]
df(Jacobidn(u), u);


df(jacobidn(u),u)

Time: 0 ms

% Bessel function of the first kind of order 2 => 0.04158 + 0.24740 i
% => -2 sqrt(pi)   [Gradshteyn and Ryzhik 8.338(3)]
Gamma(-1/2);


  - 2*pi
----------
 sqrt(pi)

Time: 10 ms

% psi(1/3) => - Euler's_constant - pi/2 sqrt(1/3) - 3/2 log 3  where  psi(x)
% is the psi function [= d/dx log Gamma(x)]   [Gradshteyn and Ryzhik 8.366(6)]
Psi(1/3);


     1
psi(---)
     3

Time: 0 ms

% Bessel function of the first kind of order 2 => 0.04158 + 0.24740 i
on complex, rounded;


*** Domain mode complex changed to complex-rounded 

Time: 10 ms

BesselJ(2, 1 + i);


0.041579886944 + 0.247397641513*i

Time: 330 ms

off complex, rounded;


*** Domain mode complex-rounded changed to rounded 

Time: 0 ms

% => 12/pi^2   [Gradshteyn and Ryzhik 8.464(6)]
BesselJ(-5/2, pi/2);


          - 5   pi
besselj(------,----)
          2     2

Time: 10 ms

% => sqrt(2/(pi z)) (sin z/z - cos z)   [Gradshteyn and Ryzhik 8.464(3)]
BesselJ(3/2, z);


         3
besselj(---,z)
         2

Time: 10 ms

% d/dz J_0(z) => - J_1(z)   [Gradshteyn and Ryzhik 8.473(4)]
df(BesselJ(0, z), z);


 - besselj(1,z)

Time: 10 ms

% Associated Legendre (spherical) function of the 1st kind: P^mu_nu(0)
% => 2^mu sqrt(pi) / [Gamma([nu - mu]/2 + 1) Gamma([- nu - mu + 1]/2)]
%    [Gradshteyn and Ryzhik 8.756(1)]
LegendreP(nu, mu, 0);


  mu      mu*pi + nu*pi          mu + nu + 1
 2  *cos(---------------)*gamma(-------------)
                2                     2
-----------------------------------------------
                        - mu + nu + 2
       sqrt(pi)*gamma(----------------)
                             2

Time: 40 ms

% P^1_3(x) => -3/2 sqrt(1 - x^2) (5 x^2 - 1)
%             [Gradshteyn and Ryzhik 8.813(4)]
LegendreP(3, 1, x);


            2             2
 3*sqrt( - x  + 1)*( - 5*x  + 1)
---------------------------------
                2

Time: 30 ms

% nth Chebyshev polynomial of the 1st kind: T_n(x) => 0
% [Gradshteyn and Ryzhik 8.941(1)]
ChebyshevT(1008, x) - 2*x*ChebyshevT(1007, x) + ChebyshevT(1006, x);


0

Time: 308680 ms  plus GC time: 55490 ms
% T_n(-1) => (-1)^n   [Gradshteyn and Ryzhik 8.944(2)]
ChebyshevT(n, -1);


      n
( - 1)

Time: 10 ms

% => arcsin z/z   [Gradshteyn and Ryzhik 9.121(26)]
load_package(specfn2)$


Time: 130 ms  plus GC time: 70 ms
hypergeometric({1/2, 1/2}, {3/2}, z^2);


 asin(abs(z))
--------------
    abs(z)

Time: 10 ms

% => sin(n z)/(n sin z cos z)   [Gradshteyn and Ryzhik 9.121(17)]
hypergeometric({(n + 2)/2, -(n - 2)/2}, {3/2}, sin(z)^2);


                 n + 2    - n + 2     3         2
hypergeometric({-------,----------},{---},sin(z) )
                   2        2         2

Time: 10 ms

% zeta'(0) => - 1/2 log(2 pi)   [Gradshteyn and Ryzhik 9.542(4)]
sub(x = 0, df(Zeta(x), x));


sub(x=0,df(zeta(x),x))

Time: 10 ms

% Dirac delta distribution => 3 f(4/5) + g'(1)
%operator f, g;
%int(f((x + 2)/5)*delta((x - 2)/3) - g(x)*df(delta(x - 1), x), x, 0, 3);
%clear f, g;
% Define an antisymmetric function f
operator f;


Time: 0 ms

antisymmetric f;


Time: 0 ms

% Test it out => [-f(a, b, c), 0]
{f(c, b, a), f(c, b, c)};


{ - f(a,b,c),0}

Time: 0 ms

clear f;


Time: 0 ms

% *** Numerical evaluation of elliptic integrals causes conflicts with other
% functions, so numerically check the result of d/dk E(phi, k) now. ***
df(EllipticE(phi, k^2), k);


    3                 2                2 2
(2*k *(elliptice(phi,k )*jacobicn(phi,k )

                        2                2                2
        - jacobicn(phi,k )*jacobidn(phi,k )*jacobisn(phi,k )

                        2 2  4                     2 2         4
        - jacobisn(phi,k ) *k *phi + jacobisn(phi,k ) *phi))/(k  - 1)

Time: 20 ms

on rounded;


Time: 0 ms

sub({phi = Pi/2, k = 1/4}, ws);


 - 0.0483389030682

Time: 870 ms  plus GC time: 70 ms
sub({phi = Pi/2, k = 1/4}, (EllipticE(phi, k^2) - EllipticF(phi, k^2))/k);


 - 0.201139864105

Time: 400 ms  plus GC time: 70 ms
off rounded;


Time: 0 ms

% ---------- Quit ----------
quit;

Quitting

real 381.36
user 368.01
sys 1.30
