E409: Summation of Trigonometric Series

Author(s): T. Håvie, K.S. Kölbig Library: MATHLIB
Submitter: Submitted: 01.12.1994
Language: Fortran Revised:

Function subprograms RTRGSM and DTRGSM compute the sum of the trigonometric series

displaymath92

for a given argument x in the range tex2html_wrap_inline96 and given coefficients tex2html_wrap_inline98 .

On CDC and Cray computers, the double-precision version DTRGSM is not available.

Structure:

FUNCTION subprogram
User Entry Names: RTRGSM, DTRGSM

Usage:

In any arithmetic expression, for tex2html_wrap_inline100 (type REAL), tex2html_wrap_inline102 (type DOUBLE PRECISION),

    tTRGSM(X,A,N,B,M,IOP)
has the value f(x).
X
(Type according to t) Argument x.
A
(Type according to t) One-dimensional array of dimension (0:d) where tex2html_wrap_inline108 , containing the constant coefficient tex2html_wrap_inline110 in A(0) and the cosine coefficients tex2html_wrap_inline112 in A(k).
N
(INTEGER) The number n of cosine coefficients.
B
(Type according to t) One-dimensional array of length tex2html_wrap_inline116 , containing the sine coefficients tex2html_wrap_inline118 in B(k).
M
(INTEGER) The number m of sine coefficients.
IOP
(INTEGER) An option number:
tex2html_wrap_inline122 the general case,
tex2html_wrap_inline124 all tex2html_wrap_inline126 are zero, i.e. f(x)=f(-x),
tex2html_wrap_inline130 all tex2html_wrap_inline132 are zero, i.e. f(x)=-f(-x).

Method:

Standard recurrence relations are used for calculating the sum (see Ref. 1).

Notes:

For a function f(z) given in the range tex2html_wrap_inline138 , use the transformation

eqnarray70

References:

  1. W. Clenshaw, A note on the summation of Chebyshev series, MTAC (later renamed Math. Comp.) 9 (1955) 118-120.
tex2html_wrap_inline140

Michel Goossens Wed Jun 5 03:52:33 METDST 1996