<-- Previous || Up || Next -->

Spence Function
Math Engineering Class

Public Function Spence( _
    ByVal vX As Variant _
    ) As Variant

Compute a form of Spence's integral due to K. Mitchell.

Examples:
    Spence(-5.0) = -2.74927912606081
    Spence(-0.5) = -0.448414206923646
    Spence(+0.0) = 0
    Spence(+0.5) = 0.582240526465013
    Spence(+1.0) = 1.64493406684823
    Spence(+5.0) = 1.78371916126664
See also:
    DSPENC Function
vX: Function returns Null if vX is Null or cannot be fixed up to a Double precision floating point number.

Spence(X) calculates the double precision Spence's integral for double precision argument X. Spence's function defined by

    integral from 0 to X of  -LOG(1-Y)/Y  DY.
For ABS(X) .LE. 1, the uniformly convergent expansion
    Spence = sum K=1,infinity  X**K / K**2
is valid.
This is a form of Spence's integral due to K. Mitchell which differs from the definition in the NBS Handbook of Mathematical Functions.
Spence's function can be used to evaluate much more general integral forms. For example,
    integral from 0 to Z of LOG(A*X+B)/(C*X+D) DX =
    LOG(ABS(B-A*D/C))*LOG(ABS(A*(C*X+D)/(A*D-B*C)))/C - Spence(A*(C*Z+D)/(A*D-B*C)) / C
References:
    K. Mitchell, Philosophical Magazine, 40, p.351 (1949).
    Stegun and Abromowitz, AMS 55, p.1004.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.