BIT Numer Math (2010) 50: 193–206 DOI 10.1007/s10543-009-0246-8 An efficient calculation of the Clausen functions Cln(θ)(n ≥ 2) Jiming Wu · Xiaoping Zhang · Dongjie Liu Received: 3 August 2009 / Accepted: 3 December 2009 / Published online: 16 December 2009 © Springer Science + Business Media B.V. 2009 Abstract The Clausen functions appear in many problems, such as in the computa- tion of singular integrals, quantum field theory, and so on. In this paper, we consider the Clausen functions Cln(θ) with n ≥ 2. An efficient algorithm for evaluating them is suggested and the corresponding convergence analysis is established. Finally, some numerical examples are presented to show the efficiency of our algorithm. Keywords Clausen functions · Error estimate Mathematics Subject Classification (2000) 65R99 · 65G20 · 65B10 1 Introduction In many occasions, such as in the evaluation of singular integrals [1, 4, 6, 8, 14, 15, 17] and quantum field theory [5, 7, 9], it is often necessary to compute the Clausen Communicated by Lothar Reichel. J. Wu Laboratory of Computational Physics, Institute of Applied Physics and Computational Mathematics, P.O. Box 8009, Beijing 100088, P.R. China e-mail: [email protected] X. Zhang () School of Mathematics and Statistics, Wuhan University, Wuhan 430072, P.R. China e-mail: [email protected] D. Liu Department of Mathematics, College of Sciences, Shanghai University, Shanghai 200444, P.R. China e-mail: [email protected] 194 J. Wu et al. functions, defined by ∞ sin(kθ) = n ,neven, Cl (θ) = k 1 k (1.1) n ∞ cos(kθ) k=1 kn ,nodd. For n = 1, the function has an equivalent form θ Cl1(θ) =−ln2sin (1.2) 2 and for n = 2, it becomes the Clausen’s integral θ t Cl2(θ) =− ln2sin dt. (1.3) 0 2 Moreover, 0,neven, Cl (0) = (1.4) n ζ(n), n odd, where ∞ 1 ζ(s)= ks k=1 is the Riemann zeta function. We list some properties of the Clausen functions in the next theorem, which can be obtained directly from the definition (1.1). Theorem 1.1 (1) (Recurrence relations) For any positive integer n, = − n+1 Cln+1(θ) ( 1) Cln(θ). (1.5) (2) (Periodicity) For any positive integer n and any integer m, Cln(θ) = Cln(θ + 2mπ). (1.6) (3) (Parity) For any positive integer n, n+1 Cln(−θ)= (−1) Cln(θ). (1.7) Remark 1.1 Because of the periodicity in (1.6) and the parity in (1.7), the computa- tion of the Clausen functions can be restricted to the interval [0,π]. Therefore, we just need to proceed in our analysis with the condition θ ∈[0,π]. By (1.2), we see that Cl1(θ) has an explicitly simple form. Unfortunately, the Clausen functions Cln(θ) (n ≥ 2) do not possess this property. However, since the series in (1.1) with n ≥ 2 is convergent, it’s natural for us to propose the following direct algorithm. An efficient calculation of the Clausen functions Cln(θ)(n ≥ 2) 195 Algorithm 1 Let N be a positive integer. Then for n ≥ 2, one can use the truncated function N sin(kθ) = n ,neven, ClN (θ) = k 1 k (1.8) n N cos(kθ) k=1 kn ,nodd to approximate Cln(θ). Algorithm 1 has the following error estimate. N Theorem 1.2 Assume that Cln (θ) is defined by (1.8). Then there exists a positive constant C, independent of N, such that C |ClN (θ) − Cl (θ)|≤ . n n nN n−1 Proof For k ≥ N + 1, we see that 1 1 1 1 1 < = − k2n1 kn1 (k − 1)n1 kn1 − (k − 1)n1 (k − 1)n1 kn1 ≤ 1 1 − 1 (N + 1)n1 − N n1 (k − 1)n1 kn1 1 1 1 ≤ − . n −1 n n (1.9) n1N 1 (k − 1) 1 k 1 Therefore, if n = 2n1,by(1.9), ∞ | N − |≤ 1 Cln (θ) Cln(θ) k2n1 k=N+1 ∞ ≤ 1 1 − 1 − n N n1 1 (k − 1)n1 kn1 1 k=N+1 1 2 ≤ = . 2n −1 n−1 n1N 1 nN The case where n = 2n1 + 1 can be proved similarly, which completes the proof. Theorem 1.2 shows that the direct algorithm for Cl2(θ) has the slowest conver- gence rate, compared with that for the rest of the Clausen functions, and the conver- gence rate is improved with the increase in n. For this reason, there appeared a lot of papers discussing the computation of the Clausen’s integral Cl2(θ). For example, de Doelder [10] suggested an efficient algorithm for Cl2(θ) when θ is equal to a rational multiple of π. The starting point was an integral representation of Cl2(θ), which is different from, but equivalent to (1.1) with n = 2, i.e., 1 ln ρ (θ) =− θ dρ, <θ< π. Cl2 sin 2 0 2 0 ρ − 2ρ cos θ + 1 196 J. Wu et al. Concurrently, Grosjean [11] discussed the same problem through a different approach by making use of the series expansion ∞ sin(lpπ/q) Cl (pπ/q) = 2 l2 l=1 and proposed two computational schemes for Cl2(θ). The first one is θ θ 3 Cl (θ) ≈−θ ln sin + (π 2 − θ 2) − − 2ln2 sin θ 2 2 24 2 11 + ln 2 − sin(2θ), 0 ≤ θ ≤ π, (1.10) 16 whose relative error does not exceed 0.63%, and the second one is θ θ 5 Cl (θ) ≈−θ ln sin + (π 2 − θ 2)(120 − 7π 2 + 3θ 2) + 2ln2− sin θ 2 2 2880 4 89 2 449 − − ln 2 sin(2θ)+ ln 2 − sin(3θ) 128 3 972 4259 1 2 10397 − − ln 2 sin(4θ)+ ln 2 − sin(5θ) (1.11) 12288 2 5 37500 with a relative error less than 0.003%, where 0 ≤ θ ≤ π. There exist some shortcomings in the methods of de Doelder and Grosjean. The main one is that their methods are confined to the case where θ is equal to a rational multiple of π belonging to [0, 2π]. Moreover, (1.10) and (1.11) are not accurate enough to compute Cl2(θ). In 1968, Wood [16] suggested an efficient calculation of Cl2(θ) by integrating by parts the integral in (1.3) and then making use of the Chebyshev expansion for πt t cot 2 , which leads to the identity θ 1 Cl (θ) =−θ ln 2sin + π 2N (θ), 0 ≤ θ ≤ π 2 2 2 0 with ∞ N0(πx) = x a2r T2r (x), 0 ≤ x ≤ 1 r=0 and ∞ (−1)nB π 2n−1 a = 2n , 2r ( n + ) n−1(n − r)!(n + r)! n=r 2 1 4 where indicates the first term is halved, T2r (x) are the Chebyshev polynomials of the first kind and B2n are the Bernoulli numbers. Since the series a2r converges rapidly, an accuracy of 20 digits can be achieved by only requiring the calculation of a An efficient calculation of the Clausen functions Cln(θ)(n ≥ 2) 197 sine and a logarithm function and the evaluation of a Chebyshev series with 17 terms. In 1995, Kölbig [13] presented a different, substantially faster algorithm for Cl2(θ), also based on the Chebyshev expansion, which can be represented as the following two formulae: ∞ 1 3 2θ 1 1 Cl (θ) = θ − θ ln |θ|+ θ anT n , − π ≤ θ ≤ π 2 2 2 π 2 2 n=0 and ∞ 2θ 1 3 Cl (θ) = (π − θ) bnT n − 2 , π ≤ θ ≤ π, 2 2 π 2 2 n=0 where an and bn are some coefficients, whose definitions and evaluation constitute the main contents of [13]. To our knowledge, there apparently are few works in the literature that address the efficient computation of Clausen functions with n>2. Recently, we were informed that a recurrence algorithm for the Clausen functions with n ≥ 2 can be constructed through Entry 13 in page 260 of [3]. In this paper, we obtain a different series, but equivalent to (1.1), for the Clausen functions Cln(θ) (n ≥ 2), which is not of the recurrence type and has an exponential convergence rate. Thus, an efficient algorithm is naturally proposed. Compared with the aforementioned recurrence algorithm, our formula is closed and can be used to compute the Clausen functions Cln(θ) with different n directly. The rest of the paper is organized as follows. In the next section, the main result of this paper is suggested and the related theoretical analysis is given. In Sect. 3,some numerical experiments are presented to show the efficiency of our algorithm. 2 Calculation of Cln(θ) (n ≥ 2) Define θ n t Ln(θ) := − t ln2sin dt (2.1) 0 2 and θ n t Jn(θ) := t cot dt. (2.2) 0 2 By applying the identity ∞ 2k t t k t cot = 1 + (−1) B k 2 2 2 (2k)! k=1 in (2.2), we get Jn+1(θ) = 2(n + 1)Nn(θ), (2.3) 198 J. Wu et al. where n+1 ∞ 2k+n+1 1 θ k θ Nn(θ) = + (−1) B k . (2.4) n + 1 n + 1 2 (2k + n + 1)(2k)! k=1 By integration by parts of (2.1) and using (2.3), we have n+1 θ θ 1 Ln(θ) =− ln2sin + Jn+1(θ) n + 1 2 2(n + 1) n+1 θ θ =− ln2sin + Nn(θ). (2.5) n + 1 2 The following lemma will be employed in proving the main result presented in Theorem 2.1. Lemma 2.1 Assume that m, n are two positive integers, and let Nn be defined in (2.4).
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages14 Page
-
File Size-