12.07.2015 Views

QUADRATIC CONVERGENCE OF THE TANH-SINH ...

QUADRATIC CONVERGENCE OF THE TANH-SINH ...

QUADRATIC CONVERGENCE OF THE TANH-SINH ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MA<strong>THE</strong>MATICS <strong>OF</strong> COMPUTATIONVolume 00, Number 0, Pages 000–000<strong>QUADRATIC</strong> <strong>CONVERGENCE</strong> <strong>OF</strong> <strong>THE</strong> <strong>TANH</strong>-<strong>SINH</strong>QUADRATURE RULEJONATHAN M. BORWEIN AND LINGYUN YEAbstract. In [5] and [2] the authors describe the remarkable effectiveness ofthe doubly exponential ‘tanh-sinh’ transformation for numerical integration—even for quite unruly integrands. Our intention in this note is to provide atheoretical underpinning when the integrand is analytic for the observed superlinearconvergence of the method. Our analysis rests on the correspondingbut somewhat easier analysis by Haber [1] of the less numerically effective‘tanh’ substitution.1. PreliminariesThe standard trapezoidal rule for numerical integration when the integrand isdefined on the interval (−∞, ∞) is:∫ ∞∞∑(1.1)f(t) dt ≈ h f(nh)−∞n=−∞On changing variables, we can approximate the definite integral via:∫ 1 ∫ ∞N∑(1.2) f(t) dt = f(ψ(x))ψ ′ (x) dx ≈ h ψ ′ (nh)f(ψ(nh)).−1−∞n=−NHere, ψ is any absolutely continuous monotonic increasing function mapping (−∞, ∞)onto (−1, 1), and without loss of generality, we assume the integrand is defined over(−1, 1).The tanh-sinh rule use the doubly-exponential transformation( π)(1.3) ψ(x) = tanh2 sinh(x)withψ ′ π cosh(x)(x) =2 cosh 2 ( π2 sinh(x)).Correspondingly, ψ(x) := tanh(x) gives rise to the scheme analyzed by Haber in[1].Received by the editor January 24, 2006.2000 Mathematics Subject Classification. Primary 65D30; Secondary 42B35, 65Y20.Key words and phrases. Numerical integration, variable transformations, trapezoidal rule,Hardy space .The first author is supported in part by NSERC and the Canada Research Chair Programme.1c○2006 American Mathematical Society


2 JONATHAN M. BORWEIN AND LINGYUN YE-infinityxinfinity-infinityxinfinitytanh(x)tanh(sinh(x))erf(x)tanh(x)tanh(sinh(x))erf(x)Figure 1. tanh(x), erf(x), tanh(sinh(x)) and their derivativesThe tanh-sinh scheme is based on the frequent observation, rooted in the Euler-Maclaurin summation formula [6], that for certain bell-shaped integrands, a simpleblock-function approximation to the integral is much more accurate than one wouldnormally expect. Various other efficient rules are described in [2, 5] (such as ψ(x) :=∫erf(x) = √ 2 xπ 0 e−t2 dt, which gives rise to “error function” or erf quadrature) butsince our experience is that the ‘tanh-sinh’ is almost always as-or-more effective,see [5, 6], we do not consider their analysis further herein. In practice tanh-sinh isalmost invariably the best rule and is often the only effective rule when more that 50or 100 digits are required. Figure 1 shows the three schemes we have introduced—erf and tanh(sinh) are visually very close while tanh is the outlier. One of theprimary reasons why we present this detailed analysis is this remarkable efficacyof ‘tanh-sinh’. A similar analysis may be undertaken for the ‘erf’ rule, but not asexplicitly since the zeros of the error function will be estimated numerically. Inaddition, various of the summations required appear more delicate.2. Hardy spaceWe will perform our analysis of the convergence of tanh-sinh rule in the Hardyspace H 2 , (see [3]).Definition 2.1. ([3], p.2) For 0 < p < ∞, Hardy space H p consists of thefunctions f, which are analytic on the unit disk and satisfies the growth condition{ ∫ 1 2πp‖f‖ H p := sup|f(re iθ )| dθ} p < ∞0≤r


<strong>QUADRATIC</strong> <strong>CONVERGENCE</strong> <strong>OF</strong> <strong>THE</strong> <strong>TANH</strong>-<strong>SINH</strong> QUADRATURE RULE 3Figure 2. Contour for integration over the rectangle AHardy space H 2 becomes a Hilbert space on imposing the inner product〈f, g〉 := 1 ∫f(z)g(z) |dz|.2π|z|=1Definition 2.2. ([4, Def. 12.6.1]) Let S denote a point set and X a complete innerproduct space of functions on S. A function of two variables z and w in S, K(z, w)is called a reproducing kernel for the space X if(1) For each fixed w ∈ S, K(z, w) is in X(2) For every function f(z) ∈ X and for every point w ∈ S, the reproducingproperty(2.1) f(w) = 〈f(z), K(z, w)〉 z .holds.[The subscript z indicates w is fixed and the inner product is taken on thevariable z.]With respect to the above inner product, H 2 has an orthonormal basis given by{1, z, z 2 , · · · , z n , · · · } and a reproducing kernel∞∑(2.2) K(z, w) := z n ¯w n 1=1 − z ¯wn=0Due to the existence of the reproducing kernel [4, Thm.12.6.1], the point functionalsP z defined, for |z| < 1, byP z (f) := f(z)are bounded linear functionals on H 2 satisfying(2.3) |P z f| 2 ≤ K(z, z) ‖f‖ 2 .2.1. A residue theorem.


4 JONATHAN M. BORWEIN AND LINGYUN YEIn the sequel we shall use the following lemma, a version of which is given withoutproof in [1]. We set{ −πi, Im z > 0(2.4) Ψ(z) :=πi, Im z < 0.Lemma 2.3. [1, Lemma 2]) Suppose that α and h are positive real numbers andf is a function satisfying the following conditions:(1) f is analytic on the closure of the strip S α = {−α < Im z < α}∫ a+iα(2) lim a→±∞ a−iα |f(z)|dz = 0(3) ∫ ∞−∞ f(x)dx and ∑ ∞n=−∞f(nh) exists.Then∫ ∞f(x)dx = 1 ∫f(z)Ψ(z) dz.−∞ 2πi ∂S αMoreover,∞∑h f(nh) = 1 ∫f(z) π cot πz2πi ∂S αh dz.n=−∞Proof. First, we consider integrating f on the boundary of rectangle A := {z :−α < Imz < α and − a < Rez < a} as shown in Figure 2. Since f is analytic onA, we have∫ ∫ a ∫ ∫f + f = − f − fC1 −aC21 C41and∫C3Combining these two equations gives∫ af = 1 ( ∫ ∫ ∫− f + f −−a 2 C1 C3∫ a ∫ ∫f − f = − f − f.−aC22 C42C21∫ ∫ ∫ )f − f + f + f .C41 C22 C42Letting a → ∞, by the condition 2. of the hypotheses, ∫ C21 f, ∫ C41 f, ∫ ∫C22 f andf will each converge to zero. Thus, we getC42∫ ∞f(x)dx = 1 ∫f(z)Ψ(z) dz.−∞ 2πi ∂S αThe function f(z) π cot(πz/h) has poles at nh for integer n with residues hf(nh).According to the residue theorem, we have∫1N∑f = h f(nh)2πin=−∞C1+C2+C3+C4n=−Nwhere N is the largest integer such that Nh < a and C2 = C21 + C22, C4 =C41 + C42. Letting a → ∞, we obtain∞∑h f(nh) = 1 ∫f(z)π cot πz2πi ∂S αh dz,as claimed.More generally, similar arguments will establish:□


<strong>QUADRATIC</strong> <strong>CONVERGENCE</strong> <strong>OF</strong> <strong>THE</strong> <strong>TANH</strong>-<strong>SINH</strong> QUADRATURE RULE 5Lemma 2.4. Suppose, in Lemma 2.3, that f has poles z i with residues Res(z i )inside S α . Then∫ ∞∫1f(x)dx =f(z)Ψ(z) dz + πi ∑ Res(z + i−∞2πi) − πi ∑ Res(z − i )∂S α ii∫1(2.5)=f(z)Ψ(z) dz − ∑ Res(z i )Ψ(z i )2πi ∂S α iand(2.6) h∞∑n=−∞f(nh) = 1 ∫( πz)f(z)π cot dz − ∑ 2πi ∂S αhiRes(z i )π cotHere z + i and z + i represent the poles above and below the real line.( πzi).h2.2. Our working notation. We will work with the following quantities for h > 0.(1) The integral: If := ∫ 1−1 f.(2) The tanh-sinh approximation:N∑ π cosh(nh)( ( π))T h,N f := h2 cosh 2 ( π2 sinh(nh)) f tanh2 sinh(nh) .n=−N(3) The N-th approximation error:(4) The approximation limit:E h,N f := (I − T h,N ) f.T h f = lim T h,N f,N−→∞which will be shown to exist in lemma 3.1.(5) The limit error:E h := (I − T h ) f.Then I, T h,N , E h,N and are bounded linear functionals on H 2 . So are T h , andE h once we show they exist.3. The associated space G 2Along with H 2 , it is helpful to use the same change of variable as in (1.3) todefine a corresponding space of functions, [4]. Precisely, we let G 2 be the set offunctions of the formψ ′ (w)f (ψ(w)) f ∈ H 2 and ψ as in (1.3).Assumptions. We assume ψ maps region A onto the unit disk, that functions inG 2 are analytic on A, and are defined almost everywhere on ∂A.Letting ̂f(w) := ψ ′ (w)f (ψ (w)), we can induce an inner product in G 2 by〈 ̂f, ĝ〉 G 2 := 〈f, g〉 H 2 = 1 ∫f(z)g(z) |dz|2π |z|=1= 1 ∫(3.1)f(ψ(w))g(ψ(w))|ψ ′ (w) dw|2π ∂A= 1 ∫̂f(w)ĝ(w) |dw/ψ ′ (w)|.2π∂A


6 JONATHAN M. BORWEIN AND LINGYUN YEThen G 2 is a Hilbert space and the mapping f ↦→ ̂f is an isomorphism of H 2onto G 2 . Also, G 2 has an orthonormal basis with elements(3.2) φ n (z) := ψ ′ (z) (ψ(z)) nandLemma 3.1. Assume the reproducing kernel of H 2 is K(z, w), then the reproducingkernel of G 2 is(3.3) ̂K(z, w) = K (ψ(z), ψ(w)) · ψ ′ (z) · ψ ′ (w)given the transformation ψ(z) from H 2 to G 2 .Proof. Given the reproducing property (2.1) and the definition of the inner product(3.1), if ̂K(z, w) denotes the reproducing kernel of G 2 then〈 ̂f(z), ̂K(z, w)〉 z = 1 ∫̂f(z)2π̂K(z, w)| dz/ψ ′ (z)|= ̂f(w)∂A= ψ ′ (w) · 〈f(z), K(z, ψ(w))〉∫z= ψ ′ 1(w) · ̂f(z)K(ψ(z), ψ(w))ψ2π′ (z)| dz/ψ ′ (z)|∂A= 1 ∫̂f(z)K(ψ(z), ψ(w))ψ2π′ (z)ψ ′ (w) |dz/ψ ′ (z)|∂AComparing the last integral with the one on the first line, we get̂K(z, w) = K (ψ(z), ψ(w)) · ψ ′ (z) · ψ ′ (w).Therefore for the tanh-sinh transformation, by (2.2), G 2 has a reproducing kernel()̂K(z, w) = 1/ 1 − ψ(z)ψ(w) · ψ ′ (z) · ψ ′ (w)(3.4)=×π 24 cosh ( π2 sinh(z) − π 2 sinh(w))cosh(z) cosh(w)cosh ( π2 sinh(z)) cosh ( π2 sinh(w)).Consequently, the point functionals on G 2 , ̂P z , defined for z ∈ A bŷP z ̂f = ̂f(z)are bounded linear functionals (see Thm. 12.6.1 of [4]) and satisfy(3.5) | ̂P z f| 2 ≤ ̂K(z, z) ‖ ̂f‖ 2 .3.1. Further working notation. We use similar notation in G 2 as in H 2 :Î ̂f :=∫ 1−1f(x)dx =̂T h,N ̂f := Th,N f = h∫ ∞−∞N∑n=−NÊ h,N ̂f :=(Î − ̂Th,N)̂f,̂f(u)du,̂f(nh),□


<strong>QUADRATIC</strong> <strong>CONVERGENCE</strong> <strong>OF</strong> <strong>THE</strong> <strong>TANH</strong>-<strong>SINH</strong> QUADRATURE RULE 7̂T h ̂f :=)lim ̂T h,N ̂f and Êh ̂f :=(Î − ̂Th ̂fN−→∞Lemma 3.2. For h > 0 the operators ̂T h and Êh are bounded linear functionalson G 2 (as are ̂T h,N and Êh,N ).Proof. Define | ̂T h,N | ̂f = h ∑ Nn=−N | ̂f(nh)| ≥ ̂T h,N ̂f. The inequality (3.5) showsthat| ̂T h,N | ̂f ≤ h‖ ̂f‖N∑̂K(nh, nh) 1/2(3.6)where(3.7)< h‖ ̂f‖= h‖ ̂f‖= h‖ ̂f‖≤≤hπ‖ ̂f‖hπ‖ ̂f‖n=−N∞∑n=−∞∞∑n=−∞∞∑n=−∞∞∑n=−∞∞∑n=−∞̂K(nh, nh) 1/21π cosh(nh)√·1 − tanh 2 (π/2 sinh(nh))2 cosh 2 (π/2 sinh(nh))π cosh(nh)2 cosh(π/2 sinh(nh))nh−π/2| sinh(nh)|ee −h|n|/2 = h · π · coth (h/4) ‖ ̂f‖.‖ ̂f‖ 2 = ‖f‖ 2 = 〈f, f〉 = 1 ∫2π= 1 ∫2π|z|=1|z|=1f(z)f(z) |dz||f(z)| 2 |dz|.Since f ∈ H 2 belongs to L 2 on the unit circle, (3.7) is finite. Equation (3.6) showsthat ̂T h,N ̂f is absolutely convergent. Also,̂T h ̂f ≤ h · π · coth(h/4)‖ ̂f‖.Thus, ̂T h and also Êh are bounded linear operators on G 2 .□If a space X has a reproducing kernel, every bounded linear functional on X hasa very simple expression. In the next result, L (z) denotes a functional L applied toK with respect to variable z while keeping w constant.Theorem 3.3. [4, Thm 12.6.6 and Cor 12.6.7] Let X has a reproducing kernelK(z, w), and assume L is a bounded linear functional defined on X, then‖L‖ 2 = L w L z K(z, w).When L is any of the previous functionals on G 2 ,(3.8) ‖L‖ 2 = L (z) L (w) ̂K(z, w)since all functionals considered are real.


8 JONATHAN M. BORWEIN AND LINGYUN YEOur goal is to estimate the approximation error||E h,N || = ||Êh,N ||which will be computed by repeated use of Lemma 3.2 and (3.8).4. Evaluation of the error norm ||Êh,N ||Let ̂σ h,N := ̂T h − ̂T h,N . Then (3.8) implies that(4.1)||Êh,N || 2 = ||Êh + ̂σ h,N || 2= Êh,(z)Êh,(w) ̂K(z, w) +} {{ }Êh,(z)̂σ h,N,(w) ̂K(z, w)} {{ }e 1+ ̂σ h,N,(z) Ê h,(w) ̂K(z, w) + ̂σ h,N,(z)̂σ h,N,(w) ̂K(z, w)} {{ } } {{ }e 3e 2e 4.In (4.1), the error is divided into four parts denoted by e 1 , e 2 , e 3 , and e 4 . In thefollowing three subsections, we will evaluate these quantities term by term.4.1. Evaluation of e 2 and e 3 . The second and third terms of (4.1) are actuallyequal. Indeed:(4.2)e 3 = ̂σ h,N,(z) Ê h,(w) ̂K(z, w) = Ê h,(z)̂σ h,N,(w) ̂K(z, w)⎛⎞= Êh,(z) ⎝h ∑ ̂K(z, nh) ⎠= Êh,(z)= h ∑|n|>N⎛|n|>N⎝h ∑|n|>NÊ h F nh⎞F nh (z) ⎠whereF nh := P nh,(w) ̂K(z, w)(4.3)=π 2 cosh(z) cosh(nh)4 cosh ( π2 sinh(z) − π 2 sinh(nh)) cosh ( π2 sinh(z)) cosh ( π2 sinh(nh)).To calculate (4.2), first we compute ÎF nhÎF nh ===∫ ∞−∞∫ ∞−∞P nh,(w) ̂K(z, w)dzπ 2 cosh(z) cosh(nh)4 cosh ( π2 sinh(z) − π 2 sinh(nh)) cosh ( π2 sinh(z)) cosh ( πdz2sinh(nh))cosh(z)π 2 ∫cosh(nh) ∞4 cosh ( π2 sinh(nh)) −∞cosh ( π2 sinh(z) − π 2 sinh(nh)) cosh ( πdz.2sinh(z))


<strong>QUADRATIC</strong> <strong>CONVERGENCE</strong> <strong>OF</strong> <strong>THE</strong> <strong>TANH</strong>-<strong>SINH</strong> QUADRATURE RULE 9Using the change of variable u := π 2 sinh(x), and letting a := π 2sinh(nh), we get(4.4)(4.5)Applying the identitywe see thatÎF nh = π cosh(nh)2 cosh(a)(4.4) === π cosh(nh)cosh(a)∫ ∞−∞∫ ∞−∞1cosh(u − a) cosh(u) du1cosh(a) + cosh(2u − a) du.sinh(a)cosh(a) + cosh(b) = 11 + e b−a − 11 + e b+a ,∫π cosh(nh) ∞()1cosh(a) sinh(a) −∞ 1 + e 2u−2a − 11 + e 2u duπ cosh(nh)cosh(a) sinh(a) · aπ 2 sinh(2nh)(4.6)=2 sinh (π sinh(nh)) = ÎF nh.∞XBy a similar manipulation, we get ̂T n F nh =π 2 h cosh(nh)(4.7)sinh(π sinh(nh)) 1 + e − 1π sinh(rh)−π sinh(nh) 1 + e sinh(rh)cosh(rh).πTherefore(4.8) h ∑Ê h F nh = ∑×|n|>N{ ∞∑r=−∞r=−∞1|n|>Nπ 2 cosh(nh)sinh (π sinh(nh))()}11 + e − 1h cosh(rh) − sinh(nh) .π sinh(rh)−π sinh(nh) 1 + e π sinh(rh)Consider the summation∞∑()1S n :=1 + e − 1h cosh(rh),π sinh(rh)−π sinh(nh) 1 + e π sinh(rh)r=−∞and note that for h > 0∣S n = ∣e π sinh(nh) − 1∣= sinh(π/2 sinh(nh))≤sinh(π/2 sinh(nh))∞∑r=−∞= h sinh(π/2 sinh(nh))π/2 sinh(rh)e h cosh(rh)e π sinh(nh) + e π sinh(rh) 2 cosh (π/2 sinh(rh))∞∑r=−∞∞∑r=−∞{2 e π/2 sinh(nh) π/2 sinh(rh)e h cosh(rh)e π sinh(nh) + e π sinh(rh) cosh (π/2 sinh(rh))h cosh(rh)cosh(π/2 sinh(rh))1 + 2∞∑r=1cosh(rh)cosh(π/2 sinh(rh))}.


10 JONATHAN M. BORWEIN AND LINGYUN YEIf we denote(4.9) C(h) := 1 + 2thenand by (4.8)h ∑|n|>N(4.10)SinceÊ h F nh ≤ ∑|n|>N= π22cosh(x)cosh(π/2 sinh(x))∞∑r=1cosh(rh)cosh(π/2 sinh(rh))S n ≤ h C(h) sinh(π/2 sinh(nh))π 2 cosh(nh){hC(h) sinh (π/2 sinh(nh)) + sinh(nh)}sinh(π sinh(nh))⎛⎞⎝ ∑ hC(h) cosh(nh)cosh(π sinh(nh)/2) + ∑ sinh(2nh)⎠ .sinh(π sinh(nh))|n|>N|n|>Nis a decreasing function, we have∑n>NAlso, becausecosh(nh)cosh(π/2 sinh(nh))≤1 h= 2πh= 2πh∫ ∞N−1∫ ∞cosh(x)cosh(π/2 sinh(x)) dxπ/2 sinh(N−1)sech(u)du( π2 − arctan (sinh( )))sinh(N − 1)πwhen x is large enough,limx→∞ x ( π2 − arctan(x) )= 1 2( π) ( 1O2 − arctan (x) = Ox)thus(4.11)∑n>N( )cosh(nh)1cosh(π/2 sinh(nh)) = O eN−1e− πhAlso, the second summation in (4.10) is less than the first one , which gives(4.12) e2 = e3 = h ∑)Ê h F nh = O(C(h)e − eN−1π|n|>N4.2. Evaluation of e 1 . In order to compute e 1 = Êh,(z)Êh,(w) ̂K(z, w), we haverecourse to the results of Section 2.1. In this case, the reproducing kernel ̂K(z, w)has poles at w = i · arcsin(2n + 1) with residue π cosh(z)/ sinh(π sinh(z)) and polesat w = arcsinh(sinh(z) + (2n + 1)i) with reside −π cosh(z)/ sinh(π sinh(z)). Sincewe are dealing with real functions, ̂K(z, w) = ̂K(z, w), as a function of w, satisfiesthe conditions of Lemmas 2.3 and 2.4, if we take α ≤ i arcsin(1).


<strong>QUADRATIC</strong> <strong>CONVERGENCE</strong> <strong>OF</strong> <strong>THE</strong> <strong>TANH</strong>-<strong>SINH</strong> QUADRATURE RULE 11Therefore,∫1Ê h,(w) ̂K(z, w) = ̂K(z, w)Φ(w) dw2πi ∂S α= 1 ∫π 2 cosh(z) cosh(w)Φ(w)2πi ∂S α4 cosh ( π2 sinh(z) − π 2 sinh(w)) cosh ( π2 sinh(z)) cosh ( πdw,2sinh(w))where(4.13)Φ(z) := Φ(z; h) = Ψ(z) − π cot πz{h−2πi1−exp(−2πiz/h)=, Im(z)> 0, Im(z)< 0.2πi1−exp(2πiz/h)Here Ψ(x) is defined as in (2.4). If we let α → ∞ while keeping ∂S α away from thepoles,(2.5) gives=∫ ∞−∞12πi∫f(x)dx∂S αf(z)Ψ(z) dz −+ π cosh(z)sinh(π sinh(z))∞∑n=−∞π cosh(z)sinh(π sinh(z))∞∑n=−∞Ψ(i arcsin(2n + 1))Ψ (arcsinh (sinh(z) + (2n + 1)i))and equation (2.6) gives=h∞∑n=−∞12πi∫f(nh)∂S αf(z)π cot πzh dz −+ π cosh(z)sinh(π sinh(z))∞∑n=−∞π cosh(z)∞∑( )π · i arcsin(2n + 1)π cotsinh(π sinh(z))hn=−∞( )π · arcsinh(sinh(z) + (2n + 1)i)π cothWe thus have=Ê h,(w) ̂K(z, w)∫1π cosh(z)̂K(z, w)Φ(w) dw −2πi ∂S αsinh(π sinh(z))+ π cosh(z)sinh(π sinh(z))∞∑n=−∞∞∑n=−∞Φ(arcsinh(sinh(z) + (2n + 1)i))Φ(i arcsin(2n + 1))


12 JONATHAN M. BORWEIN AND LINGYUN YESince |Φ(x + iy)| ∼ 2π exp(−2π|y|/h), the integral part will go to zero as α → ∞.Also, since Φ(−w) = −Φ(w),π cosh(z)∞∑Φ(i arcsin(2n + 1))sinh(π sinh(z))Therefore== 0.n=−∞π cosh(z)sinh(π sinh(z)) lim(4.14) Ê h,(w) ̂K(z, w) =π cosh(z)sinh(π sinh(z))LettingN∑N→∞n=−N∞∑n=−∞H(z) := Êh,(w) ̂K(z, w),Φ(i arcsin(2n + 1))Φ(arcsinh(sinh(z) + (2n + 1)i)).it is easy to see that H(z) ∈ C ∞ . Also, since we have shown Êh is a bounded linearfunctional and∫ ∞∞∑Ê h = Êh,(z)H(z) = H(z)dz − h H(nh).−∞n=−∞Thus, ∑ ∞n=−∞H(nh) exists for all h > 0 and H(z) is integrable because the integrandis independent of h. Taking h → 0, the summation part will converge to zeroso that the integral is finite. Therefore, H(z) satisfies the conditions of the Poissonsummation formula (see the proof of [7, 243–4]). It follows that∞∑∫ ∞(4.15) ‖Êh‖ 2 = Êh H = −2 H(x) cos(2πrx/h) dx.Setthenr=1H n (x) := Φ (arcsinh (sinh(z) + (2n − 1)i)) + Φ (arcsinh (sinh(z) − (2n − 1)i))(4.16) H(x) =∞∑n=1−∞π cosh(x)sinh(π sinh(x)) H n(x).Letting A(z, n) and B(z, n) denote the real part and imaginary part ofarcsinh(sinh(z) + (2n − 1)i),we have( 1 √A(z, n) = sgn(z) · ln sinh(z)2 + 4n22 + 1 √sinh(z)2 + (2n − 2)22√ ⎞(1√+ sinh(z)2 + 4n22 + 1 )√ 2sinh(z)2 + (2n − 2)22 − 1⎠( √)B(z, n) = arcsin 1/2 (sinh (z)) 2 + 4 n 2 − 1/2√(sinh (z)) 2 + (2 n − 2) 2


<strong>QUADRATIC</strong> <strong>CONVERGENCE</strong> <strong>OF</strong> <strong>THE</strong> <strong>TANH</strong>-<strong>SINH</strong> QUADRATURE RULE 13where(4.17) sgn(z) =Therefore{1, Re(z)> 0−1, Re(z)< 0.Φ(arcsinh(sinh(z) + (2n − 1)i)) = Φ(A(z, n) + B(z, n)i)Φ(arcsinh(sinh(z) − (2n − 1)i)) = Φ(A(z, n) − B(z, n)i)and()−1H n (z) = 2πi1 − exp( 2πB(z,n)−i2πA(z,n)h) + 11 − exp( 2πB(z,n)+i2πA(z,n)h)(4.18)=By (4.15) and (4.16),(4.19)−4π sin( 2πA(z,n)h) exp( 2πB(z,n)1 − 2 exp( 2πB(z,n)h‖Êh‖ 2 = −2= −2∞∑r=1∞∑∫ ∞r=1 n=1−∞ n=1∫ ∞∞∑) cos( 2πA(z,n)h∞∑−∞h)) + exp( 4πB(z,n)h)π cosh(x)sinh(π sinh(x)) H n(x) cos(2πrx/h) dxπ cosh(x)sinh(π sinh(x)) H n(x) cos(2πrx/h) dxUsing a more elaborate (and computer algebra assisted) version of the argumentgiven by [1] for tanh, we can estimate e 1 by(4.20) e 1 = ‖Êh‖ 2 = O(e −A/h)where A is a positive constant. This entails integrating the integral component of(4.19) by parts twice to obtain(4.21)∫ ∞π cosh(x)H n (x)−∞ sinh(π sinh(x)) cos(2πrx/h)dx( ) 2 ∫ h ∞() ′′π cosh(x)= −H n (x)cos (2πrx/h) dx.2πrsinh(π sinh(x))−∞which is( ) e−A/hOr 2 n 2Our numerical experiments indicate that A is some constant bounded below by 5/2and above by 10.4.3. Evaluation of e 4 . We have:e 4 = ̂σ h,N,(z)̂σ h,N,(w) ̂K(z, w)= h2 π 2 ∑4X|r|,|n|>Nwhich can be written ash 2 π 2(4.22)2r,n>Ncosh(nh) cosh(rh)cosh ( π2 sinh(nh) − π 2 sinh(rh)) cosh ( π2 sinh(nh)) cosh ( π2 sinh(rh))sinh(rh)cosh(nh) cosh(rh)cosh π sinh(nh) − π sinh(rh)cosh π sinh(nh)cosh π 2 2 2 2


14 JONATHAN M. BORWEIN AND LINGYUN YEX(4.23)+ h2 π 2cosh(nh) cosh(rh)2 cosh π sinh(nh) − π sinh(rh)cosh π sinh(nh)cosh sinh(rh).π r,−n>N 2 2 2 2XThen, because of (4.11), equation (4.23) is equal toh 2 π 2cosh(nh) cosh(rh)X sinh(rh)2 cosh π sinh(nh) + π sinh(rh)cosh π sinh(nh)cosh π r,n>N 2 2 2 2≤ h2 π 2!2cosh(nh)(4.24)= Oe − 2eN−1π2 cosh(π/2 sinh(nh))n>NAlso, (4.22) can be written ash 2 π 2 ∑ cosh 2 (nh)2 cosh 2 (π/2 sinh(nh))n>N+ 2 ∑cosh(nh) cosh(rh)cosh ( π2 sinh(nh) − π 2 sinh(rh)) cosh ( π2 sinh(nh)) cosh ( π2 sinh(rh)).n>r>NThe first term above is less than(4.25) O) (e − 2eN−1πand the second term is less than the first. Equation (4.24) and (4.25) together give( )(4.26) e 4 = ̂σ h,N,(z)̂σ h,N,(w) ̂K(z, w) = O e − 2eN−1π .5. The main resultsCombining (4.12), (4.20) and (4.26) we getTheorem 5.1. (Tanh-sinh convergence.) (a) For f ∈ H 2 and ψ(x) = tanh( π 2 sinh(x)),the error bound can be evaluated as:(||Êh,N || 2 = ||E h,N || 2 = O e −A/h) )+ O(C(h)e − eN−1πwhere the order constant is independent of both N and h. Here as before∞∑ cosh(rh)(5.1) C(h) := 1 + 2cosh(π/2 sinh(rh)) ≤ 1 + 4πhr=1(b) This method exhibits quadratic convergence as we let N → ∞ and h → 0 + ,while keeping Nh a constant.Proof. (a) We estimate||Êh,N || 2 = ||E h,N || 2 = e 1 + e 2 + e 3 + e 4(= O e −A/h) + O(= O e −A/h) + O(C(h)e − eN−1π(C(h)e − eN−1π)+ O).) (e − 2eN−1πTo obtain the estimate for C(h) observe thathC(h) ≤ h + 2∫ ∞0cosh(t)cosh(π/2 sinh(t)) dt = h + 4 π∫ ∞0( π)sech2 x dx,


<strong>QUADRATIC</strong> <strong>CONVERGENCE</strong> <strong>OF</strong> <strong>THE</strong> <strong>TANH</strong>-<strong>SINH</strong> QUADRATURE RULE 15since the first integrand is decreasing. The latter integral evaluates to 1.(b) In this case the order termO(e −A/h)shows quadratic convergence as h → 0, because when h is halved, e −A/h will besquared. Similarly,)O(C(h)e − eN−1πexhibits exponential convergence as N → ∞.6. Analysis for Error Function and Other TransformationsAs shown in Figure 1, tanh, tanh-sinh and error function have very similar properties:absolutely continuous monotonic increasing functions mapping (−∞, ∞)onto (−1, 1), infinitely differentiable and every order of their derivatives quicklyvanishes at infinity. It’s not surprising that a similar approach can be appliedto analyze the convergent property of error function and more generally, to anytransformation with the property above.For example, the error quadrature uses the transformation:(6.1) ψ(x) = erf(x) = √ 2 ∫ xe −t2 dtπwith0ψ ′ (x) = 2 √ πe −x2As in section 3, one can introduce a corresponding space G ∗ 2 ,which contains theset of functions of the formG 2 ∗ then has a reproducing kernelψ ′ (w)f (ψ(w)) f ∈ H 2 and ψ as in (6.1).̂K(z, w) = 1/=()1 − ψ(z)ψ(w) · ψ ′ (z) · ψ ′ (w)4π (1 − erf(z)erf(w)) · e−z2 e −w2The approximation error ||Êh,N || can still be divided into 4 parts as in (4.1) ande 2 = e 3 = h ∑Ê h F nhwheree 4 = 4 π∑|r|,|n|>N|n|>Ne −r2 h 2 e −n2 h 21 − erf(rh)erf(nh)F nh := P nh,(w) ̂K(z, w)= 4 πe −z2 e −n2 h 21 − erf(z)erf(nh) .In order to evaluate e 1 , one need to find out the poles of11 − erf(z)erf(w) .□


16 JONATHAN M. BORWEIN AND LINGYUN YEAlso, the evaluation of e 2 and e 3 involves the careful estimation of∞∑ ∞∑ e −r2 h 21 − erf(rh)erf(nh)n=a r=bHere we will not give further analysis. For any other quadrature rules with similarproperties, the similar approach can be taken.7. Numerical Convergence and ExamplesWe conclude with a few numerical illustrations and a brief discussion of theoptimality of the coefficient of the infinite trapezoidal rule.7.1. Numerical results. We exhibit results for the following set of test functions,earlier studied in [5]:(1) ∫ 1t log(1 + t) dt = 1/40(2) ∫ 10 t2 arctan t dt = (π − 2 + 2 log 2)/12(3) ∫ π/2(4) ∫ 10e t cos t dt = (e π/2 − 1)/20arctan( √ 2+t 2 )(1+t 2 ) √ dt = 2+t 2 5π2 /96(5) ∫ 1 √0 t log t dt = −4/9(6) ∫ 1 √0 1 − t2 dt = π/4(7) ∫ 10√t√1−t 2 dt = 2√ πΓ(3/4)/Γ(1/4) = β(1/2, 3/4)/2(8) ∫ 10 log2 t dt = 2(9) ∫ π/2(10) ∫ π/20(11) ∫ ∞0(12) ∫ ∞0(13) ∫ ∞log(cos t) dt = −π log(2)/20√ √tan t dt = π 2/211+t 2 dt = π/2e −t√tdt = √ πe −t2 /2 dt = √ π/20(14) ∫ ∞e −t cos t dt = 1/20Note that the first four of these integrals involve well-behaved continuous functionson finite intervals. The integrands in problems 5 and 6 have an infinitederivative at an endpoint. In 7 through 10, there is an integrable singularity atan endpoint. In 11 through 13, the interval of integration is infinite, requiring atransformation such as s = 1/(t + 1). Problem 14 is an oscillatory function on aninfinite interval.Table 1 gives the actual error resulting from using the summation (1.2) as anapproximation to the specified integral, rounded to the nearest power of ten. Theprecision used in these calculations was 1000 digits, so no results are shown witherrors less than 10 −1000 . The “level” shown in the table is an index of the intervalh, according to the rule h = 2 −m , where m is the level. In other words, at eachsuccessive level, the interval h is halved.It can be seen from the results in the table that the tanh-sinh scheme achievesapproximately exponential convergence, in the sense that the number of correctdigits approximately doubles with each level. In some cases, such as Problems 3, 5and 8, the convergence is slightly better than a doubling with each level; in othercases, such as Problems 12, 13 and 14, the rate is slightly less. It is remarkable thatProblems 1, 6, 7, 9 and 10 exhibit virtually identical convergence behavior.


<strong>QUADRATIC</strong> <strong>CONVERGENCE</strong> <strong>OF</strong> <strong>THE</strong> <strong>TANH</strong>-<strong>SINH</strong> QUADRATURE RULE 17Level Prob. 1 Prob. 2 Prob. 3 Prob. 4 Prob. 5 Prob. 6 Prob. 71 10 −4 10 −4 10 −4 10 −4 10 −5 10 −5 10 −62 10 −11 10 −11 10 −9 10 −9 10 −12 10 −12 10 −123 10 −24 10 −19 10 −21 10 −18 10 −28 10 −25 10 −264 10 −51 10 −38 10 −49 10 −36 10 −62 10 −50 10 −495 10 −98 10 −74 10 −106 10 −73 10 −129 10 −99 10 −986 10 −195 10 −147 10 −225 10 −145 10 −265 10 −196 10 −1947 10 −390 10 −293 10 −471 10 −290 10 −539 10 −391 10 −3888 10 −777 10 −584 10 −974 10 −582 10 −779 10 −77791011Level Prob. 8 Prob. 9 Prob. 10 Prob. 11 Prob. 12 Prob. 13 Prob. 141 10 −5 10 −4 10 −6 10 −2 10 −2 10 −1 10 −12 10 −12 10 −11 10 −12 10 −5 10 −4 10 −3 10 −23 10 −29 10 −24 10 −25 10 −11 10 −9 10 −6 10 −54 10 −62 10 −50 10 −48 10 −22 10 −15 10 −9 10 −85 10 −130 10 −97 10 −98 10 −45 10 −28 10 −19 10 −146 10 −266 10 −195 10 −194 10 −91 10 −50 10 −37 10 −267 10 −540 10 −389 10 −388 10 −182 10 −92 10 −66 10 −488 10 −777 10 −777 10 −365 10 −170 10 −126 10 −889 10 −731 10 −315 10 −240 10 −16410 10 −584 10 −457 10 −30411 10 −870 10 −564Table 1. Tanh-sinh errors at level m for the 14 test problems7.2. Non-optimality of the limiting trapezoidal rule. Finally, we examinethe optimality of the coefficient of the infinite trapezoidal rule ̂T h with ψ(x) asdefined in (1.3). Let A := {. . . , a −1 , a 0 , a 1 . . .} be the sequence of coefficients for̂T h such that̂T h;A ̂f =∞ ∑n=−∞a n ̂f(nh)for every ̂f ∈ G 2 , andÊ h;A = Î − ̂T h;AWe may ask whether A h where a n ≡ h is optimal in the sense that‖Êh;A h‖ = inf ‖Êh;A‖for all A’s for which ̂T A is a bounded linear functional. As shown in [1], A h isoptimal if and only if ̂T h integrates F nh exactly for every integer n. But from theanalysis in Section 4.1, we know ÊhF nh ≠ 0; consequently A h is not optimal.References[1] Seymour Haber, “The Tanh Rule for Numerical Integration,” SIAM Journal on NumericalAnalysis, 14 (1977), 668–685.[2] J.M. Borwein, D.H. Bailey D. H. & R. Girgensohn, Experimentation in Mathematics, AKPeters, 2004.


18 JONATHAN M. BORWEIN AND LINGYUN YE[3] P.L. Duren, Theory of H p spaces, Academic Press, New York, 1970.[4] P.J. Davis, Interpolation and Approximation, Blaisdell, New York, 1963.[5] D.H. Bailey and J.M. Borwein, “Highly Parallel, High-Precision Numerical Integration,” D-drive preprint #294, 2005.[6] D.H. Bailey and J. M. Borwein, “Effective Error Bounds for Euler-Maclaurin-Based QuadratureSchemes,” D-drive preprint 297, 2005.[7] Serge Lang, Real and Functional analysis, Springer-Verlag, 1993.Faculty of Computer Science, Dalhousie University, Halifax, NS, B3H 2W5, Canada.E-mail address: jborwein@cs.dal.caFaculty of Computer Science, Dalhousie University, Halifax, NS, B3H 2W5, Canada.E-mail address: lingyun@cs.dal.ca

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!