1 Introduction

In [15] (see also [3, 14]) it was seen that Clenshaw–Curtis quadrature [2] exhibits a rather curious phenomenon when used to approximate integrals of the form

$$\begin{aligned} \int _{-1}^1 f_{z}(x)\ dx, \quad f_{z}(x)=\frac{1}{z-x}, \end{aligned}$$
(1.1)

where \(z\) is a complex number not in [\(-\)1,1], which is that the error does not decay to zero evenly but does so in two distinct stages.

Recently [4] a quadrature rule based on the zeros of \((1-x^2)T_{n-1}^{'}(x)\), which can be regarded as a generalization of Clenshaw–Curtis quadrature, was derived for the Gegenbauer weight function \((1-x^2)^{\lambda -\frac{1}{2}}\), where \(\lambda > -\frac{1}{2}\). In particular it was shown that if \(I^{(\lambda )}(f)\) denotes the integral

$$\begin{aligned} \ I^{(\lambda )}(f)=\int _{-1}^1 (1-x^2)^{\lambda -\frac{1}{2}} f(x)\ dx, \quad \lambda > -\frac{1}{2}, \end{aligned}$$
(1.2)

then

$$\begin{aligned} \ I^{(\lambda )}(f) = \psi _{n}^{(\lambda )}(f) + E_{n}^{(\lambda )}(f), \end{aligned}$$
(1.3)

where \(f(x)\) is a function analytic over some region of the complex plane containing the interval [\(-\)1,1], \( \psi _{n}^{(\lambda )}(f)\) denotes the approximation to \(\ I^{(\lambda )}(f)\) and \(E_{n}^{(\lambda )}(f)\) denotes the error in that approximation.

A method for the evaluation of \( \psi _{n}^{(\lambda )}(f)\) was described in [4] and for the evaluation of \(E_{n}^{(\lambda )}(f)\) in [12], this latter method being similar to those methods used for the evaluation of the error terms that arise in Gauss-Gegenbauer quadrature [8] or Gauss-Jacobi quadrature [9], see also [7, 10, 11].

The question we shall address in this paper is: Does a similar phenomenon exist for the quadrature rule in [4] as exists for Clenshaw–Curtis quadrature? In fact it will be seen that when the function \(f(x)= f_{z}(x)\) in (1.2) such a property does indeed exist for \(\lambda = \lambda _{p} = (2p+1)/2, p=0,1, \ldots \). Unfortunately however, expression  (1.3) with \(f(x)= f_{z}(x)\) does not lend itself to our needs and so in order to proceed we shall begin by deriving a different expression for the error term using the Hermite contour integral representation of the error in polynomial interpolation [6, p. 251].

2 Error formula

Theorem 2.1

Let \(f_{z}(x)\) be defined by (1.1), then

$$\begin{aligned} \ E_{n}^{(\lambda )}(f_{z}) = \frac{Q_{n}^{(\lambda )}(z) - Q_{n-2}^{(\lambda )}(z)}{T_{n}(z) - T_{n-2}(z)} \quad n \ge 2, \end{aligned}$$
(2.1)

where

$$\begin{aligned} \ Q_{n}^{(\lambda )}(z) = \int _{-1}^{1}\frac{(1-x^2)^{\lambda - \frac{1}{2}}T_{n}(x)}{z-x}\ dx, \quad (z \notin [-1,1]). \end{aligned}$$
(2.2)

Proof

Following [15, Theorem 1] and [6, p. 251] the pointwise error in the polynomial interpolant \(p_{n-1}(x)\) of \(f_{z}(x)\) at the nodes \( \{x_{j}\}_{j=1}^{n} \) is given by

$$\begin{aligned} f_{z}(x)\!-\! p_{n-1}(x) \!=\! \frac{(x-x_{1})\ldots (x-x_{n})}{2\pi i}\!\!\int _{C}\frac{1}{(\zeta -x_{1})\ldots (\zeta \!-\!x_{n})(\zeta -x)(z-\zeta )} d\zeta ,\nonumber \\ \end{aligned}$$
(2.3)

where \(C\) is a simple, closed, rectifiable curve enclosing the interval [\(-\)1,1] but excluding the pole \(\zeta =z.\)

By deforming the contour \(C\) into a circle \(|\zeta |=R\) and applying the residue theorem to the integral in (2.3) then, as \(R \rightarrow \infty , \)

$$\begin{aligned} f_{z}(x)- p_{n-1}(x) = \frac{(x-x_{1})\ldots (x-x_{n})}{(z-x_{1})\ldots (z-x_{n})(z-x)}. \end{aligned}$$
(2.4)

Since [1]

$$\begin{aligned} (1-x^2)T_{n-1}^{'}(x) = \frac{(n-1)}{2}( T_{n-2}(x) - T_{n}(x)) \quad n \ge 2, \end{aligned}$$

we shall define

$$\begin{aligned} w_{n}(x) = T_{n}(x) - T_{n-2}(x) \quad n \ge 2. \end{aligned}$$
(2.5)

Thus, expression (2.4) leads to

$$\begin{aligned} \int _{-1}^1 (1-x^2)^{\lambda -\frac{1}{2}} f_{z}(x)\ dx - I_{n}^{(\lambda )}(f_{z}) = \frac{1}{w_{n}(z)}\int _{-1}^1 \frac{(1-x^2)^{\lambda -\frac{1}{2}}w_{n}(x)}{z-x} dx,\qquad \qquad \end{aligned}$$
(2.6)

where \( I_{n}^{(\lambda )}(f_{z})\) denotes the approximation to \( I^{(\lambda )}(f_{z})\). The theorem now follows from expressions  (2.2), (2.5) and (2.6).

Unfortunately it remains an open question both in the present paper and in [15] as to whether the above can be extended in some form to more general functions. It is not difficult however to generalise this theorem to any rational function of the form

$$\begin{aligned} r(x) = \sum _{i=0}^{m} a_{i}x^{i} + \sum _{j=1}^{k} \frac{b_{j}}{x-z_{j}}, \end{aligned}$$

where all the poles \(z_{j}\) are assumed to be distinct. Indeed, by  (1.3) and (2.1) for any \(n\)-point interpolatory rule with \( n>m \)

$$\begin{aligned} \ I^{(\lambda )}(r) - \psi _{n}^{(\lambda )}(r) = \sum _{j=1}^{k}\ b_{j} \,\left( \frac{Q_{n}^{(\lambda )}(z_{j}) - Q_{n-2}^{(\lambda )}(z_{j})}{T_{n}(z_{j}) - T_{n-2}(z_{j})} \right) . \end{aligned}$$

In particular, since

$$\begin{aligned} \frac{a^{2}}{a^{2}+x^{2}}\ =\ \frac{ai}{2}\left( \frac{1}{ai+x}+\frac{1}{ai-x} \right) , \end{aligned}$$

the error curve shown in Fig. 1 can be derived.

Finally, in order to continue we shall require the conformal mapping

$$\begin{aligned} z = \frac{1}{2}( \zeta + \zeta ^{-1}) \quad \zeta = \rho e^{i\theta } \quad 0 \le \theta < 2\pi , \end{aligned}$$
(2.7)

which transforms the circle \(\mid \zeta \mid = \rho > 1\) onto an ellipse \( \varepsilon _{\rho } \) with foci at \(z = \pm 1\) and semi-axes \((\rho \pm \rho ^{-1})/2\). \(\square \)

Fig. 1
figure 1

Absolute errors when approximating the integral in Sect. 5 by generalised Clenshaw–Curtis quadrature using various values of \(n\), \(n\) even with \(\lambda = 5/2.\) Note the logarithmic scale on the vertical axis. At a certain value of \(n\), indicated by the vertical, dashed line, the convergence rate decreases. The value of \(n\) follows from Eq. (4.3) by using the method described in Sect. 5

3 A generalization of Weideman et al.’s formula

Weideman et al. have derived a formula for \(Q_{n}^{(\lambda _{0})}(z)\) which we shall generalise to one for \(Q_{n}^{(\lambda _{p})}(z) \ \ p=0,1,2,\ldots \), see Theorem 3.2 below. In particular, when \(p=0\) the following result is known [15].

Theorem 3.1

Assume \( z \in \varepsilon _{\rho } \); then

$$\begin{aligned} Q_{n}^{(\lambda _{0})}(z) = \mu \zeta ^{-n}\pi i + \left\{ \begin{array}{l@{\quad }l} W_{n}(\zeta ) &{} n \text{ even, } \\ (W_{n+1}(\zeta )+W_{n-1}(\zeta ))/2z &{} n \text{ odd, } \end{array} \right. \end{aligned}$$

where \(\mu \) is defined by

$$\begin{aligned} \mu&= \left\{ \begin{array}{ll} -1 &{} { Im}(z)>0, \\ 0 &{} { Im}(z)=0, \\ +1 &{} { Im}(z)<0, \end{array} \right. \end{aligned}$$
(3.1)
$$\begin{aligned} W_{n}(\zeta )&= 2\left( \zeta ^{-n}\;H_{n}(\zeta ) + \zeta ^{n}\;H_{n}(1/\zeta ) \; \right) , \end{aligned}$$
(3.2)

and

$$\begin{aligned} H_{n}(t)\;=\;\int _{0}^{t} \frac{w^{n}}{1-w^{2}} dw, \quad n\;=\;0,1,2,\ldots \ . \end{aligned}$$

When \(z\) is real (i.e. \(\zeta >1\) or \(\zeta <-1\)) the first integral in (3.2) should be interpreted as a Cauchy Principal Value integral.

In order to simplify the presentation of our proof of Theorem 3.2 it will be helpful to move some of the more technical manipulations that arise therein, along with brief summaries of their proofs if required, to Appendices A1–A7. This has the advantage of allowing one to focus solely upon the theorem itself. We should also point out that the proof of Theorem 3.2 that we shall give will not be the somewhat shorter proof using Mathematical Induction but instead we follow a more general approach which has the advantage of allowing us to choose other values of \(\lambda \). Finally, throughout this paper we define

$$\begin{aligned} B = \frac{\varGamma (\lambda + \frac{1}{2})\sqrt{\pi }}{\varGamma (\lambda +1)},\ \ \ L = \frac{(-1)^{p}}{2^{2p-1}}, \end{aligned}$$

and [4]

$$\begin{aligned} Z_{r}(\lambda ) = \left\{ \begin{array}{ll} \prod \nolimits _{j=1}^{r-1}(\frac{j-\lambda }{j+\lambda }) &{} \text{ if } r\ge 2 , \\ 1 &{} \text{ if } r=1 , \\ -1 &{} \text{ if } r=0 , \\ -Z_{1-r}(\lambda ) &{} \text{ if } r<0 . \end{array} \right. \end{aligned}$$
(3.3)

Lemma 3.1

For n odd, \(\ \ Q_{n}^{(\lambda )}(z) = \frac{1}{2z} \left( \ Q_{n+1}^{(\lambda )}(z) + Q_{n-1}^{(\lambda )}(z) \right) .\)

Proof

It is well-known that [1]

$$\begin{aligned} 2xT_{n}(x) = T_{n+1}(x) + T_{n-1}(x). \end{aligned}$$
(3.4)

If we now substitute (3.4) into  (2.2), partialise the integrand and recall that \(n\) is assumed to be odd the result follows. \(\square \)

Theorem 3.2

Assume \( z \in \varepsilon _{\rho } \) and \(\lambda \;=\lambda _{p},\ \ p=0,1,2,\ldots \) and also let \(\mu \) and \(W_{n}(\zeta )\) be defined as in Theorem 3.1 then

$$\begin{aligned} \ Q_{n}^{(\lambda _{p})}(z) = \frac{(-1)^{p}}{2^{2p}}\left[ \;A(\zeta )\ +\ B(\zeta )\;\right] , \end{aligned}$$
(3.5)

where for

  1. (i)

    \(n\) even

    $$\begin{aligned} A(\zeta )&= \left( \zeta -\frac{1}{\zeta }\right) ^{2p}\left[ \frac{\mu \pi i}{\zeta ^{n}}\;+\;W_{n}(\zeta )\right] ,\\ B(\zeta )&= 4\sum _{j=0}^{p-1}\;\left[ \left( \sum _{k=0}^{j}\;(-1)^{k}\;C_{k}^{2p}\;\delta _{2j+1-2k} \right) \ \left( \frac{2p-2j-1}{n^{2}-(2p-2j-1)^{2}}\right) \right] , \end{aligned}$$

    with

    $$\begin{aligned} \delta _{2j+1-2k} = \ \zeta ^{2j+1-2k}+\frac{1}{\zeta ^{2j+1-2k}}, \end{aligned}$$

    and

  2. (ii)

    \(n\) odd

    $$\begin{aligned} A(\zeta )\ =\ \left( \zeta -\frac{1}{\zeta }\right) ^{2p}\left[ \frac{\mu \pi i}{\zeta ^{n}}\;+\;\frac{1}{2z}\left( W_{n+1}(\zeta )+W_{n-1}(\zeta )\right) \right] , \end{aligned}$$

    and

    $$\begin{aligned} B(\zeta ) = 4\sum _{j=0}^{p-1}\;\left[ \!\!\left( \sum _{k=0}^{j} {'}\;(-1)^{k}\;C_{k}^{2p} \;\left( \zeta ^{2j-2k}+\frac{1}{\zeta ^{2j-2k}}\right) \right) \left( \frac{2p-2j}{n^{2}-(2p-2j)^{2}}\right) \!\!\!\right] , \end{aligned}$$

    where the single prime indicates that the last term \(k\)=\(j\) is to be halved. In the case \(p=0\) the term \(B(\zeta )\) should be omitted from (3.5), the theorem then reducing to that of Theorem 3.1.

Proof

We begin by recalling the following expansion for \(Q_{n}^{(\lambda )}(z)\) which depends on the parity of \(n\). By setting

$$\begin{aligned} \ n\ =\ 2s+\sigma , \end{aligned}$$
(3.6)

where \(s\) is an integer and \(\sigma \;=\;0\) or 1 according to whether \(n\) is even or odd then [4]

$$\begin{aligned} Q_{n}^{(\lambda )}(z)\ =\ B\;\sum _{k=1}^{\infty }\;\zeta ^{1-\sigma - 2k}\left[ \;Z_{k+s+\sigma \;}(\lambda )\ +\ Z_{k-s}(\lambda )\; \right] , \end{aligned}$$
(3.7)

where \( z \in \varepsilon _{\rho } \), \(z\;\notin \;[-1,1]\) and \(|\zeta |\;>1\). In particular, for \(n\) even and \(\lambda \;=\;\lambda _{p}\),

$$\begin{aligned} Q_{n}^{(\lambda _{p})}(z) \!&= \! B\left( \sum _{k=1}^{\infty }\zeta ^{1 - 2k}Z_{k+\frac{n}{2}}(\lambda _{p})+ \!\sum _{k=1}^{\frac{n}{2}} \zeta ^{1 -2k}Z_{k-\frac{n}{2}}(\lambda _{p})+\!\!\!\sum _{k=\frac{n}{2}+1}^{\infty }\zeta ^{1 - 2k}Z_{k-\frac{n}{2}}(\lambda _{p}) \!\!\right) \nonumber \\ \!&= \!\mathrm series \;1+\mathrm series \;2+\mathrm series \;3. \end{aligned}$$
(3.8)

Let us now consider each series separately beginning with series 1, followed by series 3 and then finally series 2.

  1. (a)

    Series 1 From (3.8), A2 and (3.3) it follows that [5]

    $$\begin{aligned} \mathrm series \;1\ =\ L\sum _{j=0}^{2p}\left( \;(-1)^{j}\; C_{j}^{2p}\;\sum _{k=1}^{\infty }\;\frac{\zeta ^{1 - 2k}}{n+2k-2p+2j-1}\;\right) . \end{aligned}$$
    (3.9)

    At this point it will be helpful to express the inner summation in  (3.9) as follows.

    1. (i)

      \(0\le j \le p-1,\)

      $$\begin{aligned} \sum _{k=1}^{\infty }\;\frac{\zeta ^{1-2k}}{n+2k-2p+2j-1}&= \sum _{k=1}^{p-j}\;\frac{\zeta ^{-(2k-1)}}{n-(2p-2j-2k+1)}\nonumber \\&+\,\zeta ^{n-2p+2j}\;H_{n}(1/\zeta ), \end{aligned}$$
      (3.10)

      where the second term on the right-hand side of  (3.10) follows by manipulating a geometric series and expressing it in terms of an integral. Similarly for

    2. (ii)

      \(j=p\),

      $$\begin{aligned} \sum _{k=1}^{\infty }\;\frac{\zeta ^{1-2k}}{n+2k-1}\;=\ \zeta ^{n}\;\;H_{n}(1/\zeta ), \end{aligned}$$

      and for

    3. (iii)

      \(p+1 \le j \le 2p,\)

      $$\begin{aligned} \sum _{k=1}^{\infty }\frac{\zeta ^{1-2k}}{n+2k-2p+2j-1}&= -\sum _{k=1}^{j-p}\;\frac{\zeta ^{2k-1}}{n+2j-2p-2k+1}\\&+\ \zeta ^{n-2p+2j}\;\;H_{n}(1/\zeta ). \end{aligned}$$

      By substituting (i), (ii) and (iii) into (3.9) and rearranging terms it follows that

      $$\begin{aligned}&\frac{1}{L}\mathrm series \;1\;=\; \sum _{j=0}^{p-1}\;\left( (-1)^{j}\; C_{j}^{2p} \;\sum _{k=1}^{p-j}\;\frac{\zeta ^{-(2k-1)}}{n-(2p-2j-2k+1)}\right) \nonumber \\&\quad -\sum _{j=p+1}^{2p}\left( (-1)^{j}\; C_{j}^{2p} \sum _{k=1}^{j-p}\frac{\zeta ^{2k-1}}{n+(2j-2p-2k+1)}\right) \nonumber \\&\quad +\,\left( \zeta -\frac{1}{\zeta }\right) ^{2p}\zeta ^{n}H_{n}(1/\zeta ). \end{aligned}$$
      (3.11)
  2. (b)

    Series 3 By repeating part (a) but this time using \(Z_{k-\frac{n}{2}}(p+1/2)\) it follows that

    $$\begin{aligned} \mathrm series \;3\ =\;-\;L\sum _{j=0}^{2p}\left( \;(-1)^{j}\; C_{j}^{2p} \sum _{k=\frac{n}{2}+1}^{\infty }\;\frac{\zeta ^{1 - 2k}}{n-(2k-2p+2j-1)}\;\right) , \end{aligned}$$

    which leads to

    $$\begin{aligned}&\frac{\mathrm{series}\;3}{L}=-\zeta ^{-n}\sum _{j=0}^{p-1}\left( (-1)^{j}\; C_{j}^{2p} \;\zeta ^{2j-2p}\sum _{k=1}^{p-j}\frac{\zeta ^{2k-1}}{2k-1}\right) \nonumber \\&\quad -\zeta ^{-n}\sum _{j=p+1}^{2p}\left( (-1)^{j} C_{j}^{2p}\;\zeta ^{2j-2p}\sum _{k=1}^{j-p}\frac{\zeta ^{-(2k-1)}}{2k-1}\right) + \left( \;\zeta -\frac{1}{\zeta }\;\right) ^{2p}\;\frac{1}{\zeta ^{n}}H_{0}(\frac{1}{\zeta }).\nonumber \\ \end{aligned}$$
    (3.12)
  3. (c)

    Series 2 To obtain a similar expression for Series 2 we first note that from (3.3) and (3.8) Series 2 may be expressed as

    $$\begin{aligned} \mathrm Series \;2\ =\;-\;L\sum _{j=0}^{2p}\left( \;(-1)^{j}\ C_{j}^{2p} \;\sum _{k=1}^{\frac{n}{2}}\;\frac{\zeta ^{-(2k-1)}}{n-(2k+2p-2j-1)}\;\right) .\qquad \quad \end{aligned}$$
    (3.13)

    In particular, for

    1. (iv)

      \(0\le j \le p-1,\)

      $$\begin{aligned}&\sum _{k=1}^{\frac{n}{2}}\frac{\zeta ^{-(2k-1)}}{n-(2k+2p-2j-1)}\nonumber \\&\quad =\zeta ^{2p-2j-n}\left[ -\sum _{k=1}^{p-j}\frac{\zeta ^{-(2k-1)}}{2k-1}-\sum _{k=1}^{p-j}\frac{\zeta ^{n-(2k-1)}}{n-(2k-1)}+H_{0}(\zeta )-H_{n}(\zeta ) \right] ,\nonumber \\ \end{aligned}$$
      (3.14)
    2. (v)

      \(j\;=\;p,\)

      $$\begin{aligned} \sum _{k=1}^{\frac{n}{2}}\frac{\zeta ^{-(2k-1)}}{n-(2k-1)} \ =\ \zeta ^{-n}\;(H_{0}(\zeta )-H_{n}(\zeta )), \end{aligned}$$
      (3.15)

      and

    3. (vi)

      \(p+1\le j \le 2p,\)

      $$\begin{aligned}&\sum _{k=1}^{\frac{n}{2}}\frac{\zeta ^{-(2k-1)}}{n-(2k+2p-2j-1)}\nonumber \\&\quad =\zeta ^{2p-2j-n}\left[ -\sum _{k=1}^{j-p}\frac{\zeta ^{2k-1}}{2k-1}+\sum _{k=1}^{j-p}\frac{\zeta ^{n+(2k-1)}}{n+(2k-1)}+H_{0}(\zeta )-H_{n}(\zeta ) \right] .\nonumber \\ \end{aligned}$$
      (3.16)

    Substituting (3.14), (3.15) and (3.16) into (3.13) now leads to

    $$\begin{aligned}&\frac{\mathrm{Series}\;2}{L} \ = \ -\;(-1)^{p}\ C_{p}^{2p} \;\zeta ^{-n}\;\left[ H_{0}(\zeta )-H_{n}(\zeta ) \right] \nonumber \\&\quad -\sum _{j=0}^{p-1}\frac{(-1)^{j}\ C_{j}^{2p}}{\zeta ^{n+2j-2p}}\left[ -\sum _{k=1}^{p-j} \frac{\zeta ^{-(2k-1)}}{2k-1}-\!\!\sum _{k=1}^{p-j}\frac{\zeta ^{n-(2k-1)}}{n-(2k-1)}+H_{0}(\zeta )-H_{n}(\zeta )\!\!\right] \nonumber \\&\quad -\sum _{j=p+1}^{2p}\frac{(-1)^{j}\ C_{j}^{2p} }{\zeta ^{n+2j-2p}}\left[ -\sum _{k=1}^{j-p}\frac{\zeta ^{2k-1}}{2k-1}+\!\!\sum _{k=1}^{j-p}\frac{\zeta ^{n+(2k-1)}}{n+(2k-1)}+H_{0}(\zeta )-H_{n}(\zeta )\!\! \right] .\nonumber \\ \end{aligned}$$
    (3.17)

    As we shall see the desired result, expression (3.5), will now follow by adding together Series 1, 2 and 3 and simplifying. For clarity of presentation however we shall begin by simplifying the sum of those terms in  (3.11), (3.12) and  (3.17) that contain an integral followed by simplifying the sum of the remaining terms.

  4. (d)

    Terms that contain an integral.

    $$\begin{aligned}&\left( \zeta -\frac{1}{\zeta }\right) ^{2p}\left[ \zeta ^{n}\;H_{n}\left( \frac{1}{\zeta }\right) \ + \ \frac{1}{\zeta ^{n}}\;H_{n}(\zeta )\;+\;\frac{1}{\zeta ^{n}}\;\left( H_{0}\left( \frac{1}{\zeta }\right) -H_{0}(\zeta ) \right) \right] \nonumber \\&\quad =\frac{1}{2}W_{n}(\zeta )\left( \zeta -\frac{1}{\zeta }\right) ^{2p}+\frac{1}{2\zeta ^{n}}\left( \zeta -\frac{1}{\zeta }\right) ^{2p}\left[ \ln \left( \frac{\zeta +1}{\zeta -1}\right) -\ln \left( \frac{1+\zeta }{1-\zeta }\right) \right] ,\nonumber \\ \end{aligned}$$
    (3.18)

    where the terms in square brackets reduce to \(\pi i\) when \(\mathrm Im (\zeta )>0\) and to \(-\pi i\) when \(\mathrm Im (\zeta )<0\). Thus, the right-hand side of expression (3.18) becomes

    $$\begin{aligned} \frac{1}{2}\left( \zeta -\frac{1}{\zeta }\right) ^{2p}W_{n}(\zeta )\ +\ \frac{1}{2}\frac{\mu \pi i}{\zeta ^{n}}\;\left( \zeta -\frac{1}{\zeta }\right) ^{2p}, \end{aligned}$$
    (3.19)

    where \(\mu \) is defined as in (3.1).

  5. (e)

    The remaining terms. Some of the expressions we shall meet in this section and elsewhere are somewhat cumbersome and so, where necessary, we shall let

    $$\begin{aligned} K&= 2k-1,\\ \alpha _{p,j}&= p-j\ \ (j\;=\;0,1,\ldots ,p-1) \ \ \mathrm and \\ \beta _{p,j}&= j-p, \ \ (j\;=\;p+1,\ldots ,2p). \end{aligned}$$

    Thus, by A2b the sum of the remaining terms S is given by

    $$\begin{aligned} S&= \sum _{j=0}^{p-1}\left( (-1)^{j}\ C_{j}^{2p} \; \zeta ^{2\alpha _{p,j}}\sum _{k=1}^{\alpha _{p,j}}\frac{\zeta ^{-K}}{n-K}\right) -\sum _{j=p+1}^{2p}\left( (-1)^{j}\ C_{j}^{2p} \; \zeta ^{-2\beta _{p,j}}\sum _{k=1}^{\beta _{p,j}}\frac{\zeta ^{K}}{n+K}\right) \;\\&+\sum _{j=0}^{p-1}\left( (-1)^{j}\ C_{j}^{2p} \sum _{k=1}^{\alpha _{p,j}}\frac{\zeta ^{-K}}{n-(2\alpha _{p,j}-K)}\right) -\!\!\sum _{j=p+1}^{2p}\left( (-1)^{j}\ C_{j}^{2p} \sum _{k=1}^{\beta _{p,j}}\frac{\zeta ^{K}}{n+(2\beta _{p,j}-K)}\right) . \end{aligned}$$

    Bearing in mind A2, A3 with \(\zeta \) replaced by \( 1/\zeta \) and A4 the previous line becomes

    $$\begin{aligned} S&= 2\;\!\sum _{j=0}^{p-1}\left( (-1)^{j}\ C_{j}^{2p} \; \zeta ^{2\alpha _{p,j}}\sum _{k=1}^{\alpha _{p,j}}\frac{K\zeta ^{-K}}{n^{2}-K^{2}}\right) +\! \sum _{j=0}^{p-1}\left( (-1)^{j}\ C_{j}^{2p} \sum _{k=1}^{\alpha _{p,j}}\frac{\zeta ^{K-2\alpha _{p,j}}}{n-K}\right) \nonumber \\&-\ \sum _{j=0}^{p-1}\left( (-1)^{j}\ C_{j}^{2p} \;\zeta ^{-2\alpha _{p,j}}\sum _{k=1}^{\alpha _{p,j}}\frac{\zeta ^{K}}{n+K}\right) \nonumber \\&= 2\sum _{j=0}^{p-1}\!\left[ \!\left( \sum _{k=0}^{j}\;(-1)^{k}\; C_{k}^{2p}\;\delta _{2j+1-2k} \right) \! \left( \frac{2p-2j-1}{n^{2}-(2p-2j-1)^{2}}\right) \!\right] . \end{aligned}$$
    (3.20)

    Expression (3.5) now follows by adding  (3.19) to (3.20) and multiplying the result by \((-1)^{p}/2^{2p-1}\).\(\square \)

Proof of Theorem 3.2(ii). Since \(n\) is assumed to be odd that is, \(n\pm 1\) are both even, it follows from Lemma 3.1, expression (3.5) and part i) of this theorem that

$$\begin{aligned}&(-1)^{p}2^{2p}\;Q_{n}^{(p+\frac{1}{2})}(z) = \ \left( \zeta -\frac{1}{\zeta }\right) ^{2p}\left[ \frac{\mu \pi i}{\zeta ^{n}}\;+\;\frac{1}{2z}\left( W_{n+1}(\zeta )+W_{n-1}(\zeta )\right) \right] +\nonumber \\&\frac{2}{z}\;\sum _{j=0}^{p-1}\;\left[ \left( \sum _{k=0}^{j}\;(-1)^{k}\; C_{k}^{2p}\;\delta _{2j+1-2k} \right) \left( \frac{2\alpha _{p,j}}{n^{2}-(2\alpha _{p,j})^{2}}+\frac{2\alpha _{p,j}-2}{n^{2}-(2\alpha _{p,j}-2)^{2}}\right) \right] .\nonumber \\ \end{aligned}$$
(3.21)

Letting

$$\begin{aligned} A_{j}\ =\ \sum _{k=0}^{j}\;(-1)^{k}\;C_{k}^{2p}\;\delta _{2j+1-2k}, \end{aligned}$$
(3.22)

the summation part of (3.21) may now be expressed as

$$\begin{aligned} \frac{A_{0}2p}{n^{2}-(2p)^{2}}\;+\;\sum _{j=1}^{p-1}\;(A_{j-1}+A_{j}) \frac{(2\alpha _{p,j})}{n^{2}-(2\alpha _{p,j})^{2}}, \end{aligned}$$

that is,

$$\begin{aligned} (-1)^{p}2^{2p}\;Q_{n}^{(p+\frac{1}{2})}(z)&= \left( \zeta -\frac{1}{\zeta }\right) ^{2p}\left[ \frac{\mu \pi i}{\zeta ^{n}}\;+\;\frac{1}{2z}\left( W_{n+1}(\zeta )+W_{n-1}(\zeta )\right) \right] \nonumber \\&+ \frac{2}{z}\;\left( \frac{A_{0}2p}{n^{2}-(2p)^{2}}+\sum _{j=1}^{p-1}\;(A_{j-1}+A_{j}) \frac{(2\alpha _{p,j})}{n^{2}-(2\alpha _{p,j})^{2}}\right) .\nonumber \\ \end{aligned}$$
(3.23)

By comparing (3.23) with (3.5) when \(n\) is odd the desired result will follow if

$$\begin{aligned} \frac{1}{2z}\;A_{0}\ =\ 1, \end{aligned}$$
(3.24)

and

$$\begin{aligned} \frac{1}{2z}\;(A_{j-1}\;+\;A_{j})\ =\ \sum _{k=0}^{j} {'}\;(-1)^{k}\; C_{k}^{2p}\;\left( \ \zeta ^{2j-2k}+\frac{1}{\zeta ^{2j-2k}}\ \right) \ \ \ j=1,\ldots ,p-1. \end{aligned}$$
(3.25)

Clearly, by (2.7) and (3.22) expression (3.24) follows. Also, from A5 and (3.22) for \(j=1,\ldots ,p-1\) it follows that

$$\begin{aligned}&\frac{1}{2z}\;(A_{j-1}\;+\;A_{j})\ =\ (-1)^{0}\; C_{0}^{2p} \;\left( \ \zeta ^{2j}+\frac{1}{\zeta ^{2j}}\ \right) \\&\quad +\ \sum _{r=1}^{j-1}\left( (-1)^{r}\;C_{0}^{2p}+ \sum _{k=0}^{r-1}\;(-1)^{r-1}\left( \;C_{k}^{2p}\;-\;C_{k+1}^{2p}\right) \right) \left( \ \zeta ^{2j-2r}+\frac{1}{\zeta ^{2j-2r}}\ \right) \\&\quad +\;\left( (-1)^{j}\;C_{0}^{2p}+ \sum _{k=0}^{j-1}\;(-1)^{j-1}\left( \;C_{k}^{2p}\;-\;C_{k+1}^{2p}\right) \right) , \end{aligned}$$

which, after cancellation of some terms reduces to expression  (3.25).

Expression (3.5) now follows by substituting  (3.24) and (3.25) into  (3.23).

4 Error analysis, \(n\) large

Since it is well-known [13] that for \( z \in \varepsilon _{\rho } \) with \(n\rightarrow \infty \)

$$\begin{aligned} T_{n}(z)\; = \;\frac{1}{2}(\zeta ^{n}+\zeta ^{-n}) \sim \;\frac{\zeta ^{n}}{2}, \end{aligned}$$
(4.1)

it follows that the denominator in expression (2.1) is \(O(\rho ^{n})\) and so any change in the rate of convergence of \(E_{n}^{(p+\frac{1}{2})}(f_{z})\) must come from the numerator. For this reason we shall begin by considering the numerator of  (2.1). We shall also require the following lemma.

Lemma 4.1

For \(n\) even and \(\zeta \notin (-\infty ,-1]\cup [1,\infty )\)

$$\begin{aligned} W_{n}(\zeta )\ =\ -\frac{4\zeta (\zeta ^{2}+1)}{(\zeta ^{2}-1)^{2}}\;\frac{1}{n^{2}}\;-\;\frac{4\zeta (\zeta ^{2}+1)}{(\zeta ^{2}-1)^{4}}(\zeta ^{4}+22\zeta ^{2}+1)\;\frac{1}{n^{4}}\;+\;O\left( \frac{1}{n^{6}}\right) . \end{aligned}$$
(4.2)

Proof

Repeated integration by parts of the integrals in  (3.2).

We are now in a position to derive the rate of convergence of the error term \( E_{n}^{(p+\frac{1}{2})}(f_{z}) \) for large \(n\). To this end we shall deduce the following theorem. \(\square \)

Theorem 4.1

Assume \( z \in \varepsilon _{\rho } \) and \(\zeta \notin (-\infty ,-1]\cup [1,\infty )\) then, as \(n\rightarrow \infty \), for

  1. (a)

    \(n\) even

    $$\begin{aligned} Q_{n}^{(p+\frac{1}{2})}(z)\ -\ Q_{n-2}^{(p+\frac{1}{2})}(z)\ =\ \frac{(-1)^{p+1}\mu \pi i}{2^{2p}\zeta ^{n-1}}\;\left( \zeta -\frac{1}{\zeta }\right) ^{2p+1} \nonumber \\ +\frac{(-1)^{p+1}3}{2^{2p-4}}\left( \zeta -\frac{1}{\zeta }\right) ^{2p-2}\left( \zeta +\frac{1}{\zeta }\right) \frac{1}{n^{4}}\ +\ O\left( \frac{1}{n^{5}}\right) , \end{aligned}$$
    (4.3)
  2. (b)

    \(n\) odd the second and third terms on the right-hand side of (4.3) are to be replaced by

    $$\begin{aligned} \ \frac{(-1)^{p+1}}{2^{2p-8}}\;\left( \Delta _{1}\ -\ \Delta _{2}\right) \;\frac{1}{n^{5}}\ +\ O\left( \frac{1}{n^{6}}\right) , \end{aligned}$$
    (4.4)

    where

    $$\begin{aligned} \Delta _{1} = \sum _{j=0}^{p-1}{'}\left( \sum _{k=0}^{j}(j-k+1)^{3}\;(-1)^{k}\;C_{k}^{2p} \right) \;\left( \zeta ^{2p-2-2j}+\frac{1}{\zeta ^{2p-2-2j}}\right) , \end{aligned}$$

    and

    $$\begin{aligned} \Delta _{2} = \frac{\zeta ^{4}+4\zeta ^{2}+1}{(\zeta ^{2}-1)^{2}}\;\left( \zeta -\frac{1}{\zeta }\right) ^{2p-2}. \end{aligned}$$

Proof of Theorem 4.1a Since \(n\) is assumed to be even then by (3.5) and Lemma 4.1

$$\begin{aligned}&(-1)^{p}2^{2p}\left( Q_{n}^{(p+\frac{1}{2})}(z)-Q_{n-2}^{(p+\frac{1}{2})}(z)\right) \;=\;-\frac{\mu \pi i}{\zeta ^{n-1}}\left( \zeta -\frac{1}{\zeta }\right) ^{2p+1}\;\nonumber \\&\qquad +\, 4\sum _{j=0}^{p-1}\left[ \left( \sum _{k=0}^{j}\;\frac{(-1)^{k}\;C_{k}^{2p}}{\delta _{2j+1-2k}^{-1}} \right) \ \left( \frac{2\alpha _{p,j}-1}{n^{2}-(2\alpha _{p,j}-1)^{2}}- \frac{2\alpha _{p,j}-1}{(n-2)^{2}-(2\alpha _{p,j}-1)^{2}} \right) \right] \nonumber \\&\qquad + \left( \zeta -\frac{1}{\zeta }\right) ^{2p}\left( \;W_{n}(\zeta )\;-\;W_{n-2}(\zeta )\right) .\nonumber \\&\qquad \sim \ \frac{\mu \pi i}{\zeta ^{n-1}}\left( \zeta -\frac{1}{\zeta }\right) ^{2p+1}\;\nonumber \\&\qquad +\ \left[ \sum _{j=0}^{p-1}\left( 2\alpha _{p,j}-1 \right) \left( \sum _{k=0}^{j}\;(-1)^{k}\;C_{k}^{2p}\delta _{2j+1-2k}\right) \;\!-\!\;\left( \zeta -\frac{1}{\zeta }\right) ^{2p-2}\left( \zeta + \frac{1}{\zeta }\right) \right] \;\frac{16}{n^{3}} \nonumber \\&\qquad + \left[ \sum _{j=0}^{p-1}\left( 2\alpha _{p,j}-1 \right) \left( \sum _{k=0}^{j}\;(-1)^{k}\;C_{k}^{2p}\;\delta _{2j+1-2k}\right) \right] \frac{48}{n^{4}}\ +\ O\left( \frac{1}{n^{5}}\right) . \end{aligned}$$
(4.5)

The result now follows since by A7 the second term on the right-hand side of (4.5) is zero and the double summation in the third term may be replaced by the right-hand side of A7.

We shall now derive the following lemmas and then deduce Theorem 4.1b.

Lemma 4.2

Assuming \(n\) to be odd and \(\zeta \notin (-\infty ,-1]\cup [1,\infty )\) then, as \(n\rightarrow \infty \),

$$\begin{aligned} \frac{1}{2z}\left( \zeta -\frac{1}{\zeta }\right) ^{2}\;(W_{n+1}(\zeta )-W_{n-3}(\zeta ))\ =\ \frac{32}{n^{3}}+\frac{96}{n^{4}}+\frac{(\zeta ^{6}-1)}{(\zeta ^{2}-1)^{3}}\frac{512}{n^{5}} + O\left( \frac{1}{n^{6}}\right) . \end{aligned}$$

Proof

Since \(n\) is assumed to be odd, that is \(n+1\) and \(n-3\) are both even, and

$$\begin{aligned} \frac{1}{2z}\left( \zeta -\frac{1}{\zeta }\right) ^{2}\ =\ \frac{(\zeta ^{2}-1)^{2}}{\zeta (\zeta ^{2}+1)}, \end{aligned}$$

it follows from Lemma 4.1 that

$$\begin{aligned}&\frac{1}{2z}\left( \zeta -\frac{1}{\zeta }\right) ^{2}\;(W_{n+1}(\zeta )-W_{n-3}(\zeta )) = 4\left( \frac{1}{(n-3)^{2}}-\frac{1}{(n+1)^{2}}\right) \\&\qquad +\frac{4(\zeta ^{4}+22\zeta ^{2}+1)}{(\zeta ^{2}-1)^{2}}\left( \frac{1}{(n-3)^{4}}-\frac{1}{(n+1)^{4}}\right) + O\left( \frac{1}{n^{6}}\right) \\&\quad = \frac{32}{n^{3}}+\frac{96}{n^{4}}+\frac{(\zeta ^{6}-1)}{(\zeta ^{2}-1)^{3}}\frac{512}{n^{5}} + O\left( \frac{1}{n^{6}}\right) , \end{aligned}$$

as required. \(\square \)

Lemma 4.3

$$\begin{aligned} \sum _{j=0}^{p-1}\;\left( (p-j)\sum _{k=0}^{j}{'}\;(-1)^{k}\;C_{k}^{2p}\;\left( \zeta ^{2j-2k}+\frac{1}{\zeta ^{2j-2k}}\right) \right) \ =\ \left( \zeta -\frac{1}{\zeta }\right) ^{2p-2} \quad p\ge 1. \end{aligned}$$
(4.6)

\(\square \)

Proof

  1. (i)

    By mathematical induction it is easy to deduce that

    $$\begin{aligned} \sum _{k=0}^{r-1}\;(-1)^{k}(r-k)\;C_{k}^{2p}\ = \ (-1)^{r-1}\;C_{r-1}^{2p-2} \qquad 2p\ge r+1. \end{aligned}$$
  2. (ii)

    If the terms on the left-hand side of (4.6) are now rearranged it follows that

    $$\begin{aligned}&\sum _{j=0}^{p-1}\;\left( (p-j)\sum _{k=0}^{j}{'} \;(-1)^{k}\;C_{k}^{2p}\;\left( \zeta ^{2j-2k}+\frac{1}{\zeta ^{2j-2k}}\right) \right) \\&\quad = \sum _{i=1}^{p}{'}\;\left( \sum _{k=0}^{i-1}\;(-1)^{k}(i-k)\;C_{k}^{2p} \right) \;\left( \zeta ^{2p-2i}+\frac{1}{\zeta ^{2p-2i}}\right) \\&\quad =\ \left( \zeta -\frac{1}{\zeta }\right) ^{2p-2} \mathrm (by part(i)) . \end{aligned}$$

\(\square \)

Remark 4.1

By rearranging terms

$$\begin{aligned}&\sum _{j=0}^{p-1}\;\left( (p-j)^{3}\sum _{k=0}^{j}{'}\;(-1)^{k}\;C_{k}^{2p}\;\;\left( \zeta ^{2j-2k}+\frac{1}{\zeta ^{2j-2k}} \right) \right) \\&\quad = \sum _{j=0}^{p-1}{'}\;\left( \sum _{k=0}^{j}\;(-1)^{k}(j-k+1)^{3}\;C_{k}^{2p} \right) \;\left( \zeta ^{2p-2-2j}+\frac{1}{\zeta ^{2p-2-2j}} \right) . \end{aligned}$$

Remark 4.2

As \( n\rightarrow \infty \)

$$\begin{aligned} \frac{1}{n^{2}-4(p-j)^{2}}- \frac{1}{(n-2)^{2}-4(p-j)^{2}}&= -\frac{4}{n^{3}}-\frac{12}{n^{4}}-\frac{32[(p-j)^{2}+1]}{n^{5}}\\&\quad + O\left( \frac{1}{n^{6}}\right) . \end{aligned}$$

Proof of Theorem 4.1b. Since \(n\) is now assumed to be odd it follows from Theorem 3.2(ii) that

$$\begin{aligned}&(-1)^{p}2^{2p}\left( Q_{n}^{(p+\frac{1}{2})}(z)-Q_{n-2}^{(p+\frac{1}{2})}(z)\right) =-\frac{\mu \pi i}{\zeta ^{n-1}}\left( \zeta -\frac{1}{\zeta }\right) ^{2p+1}\; \\&\quad +\,\, 4\sum _{j=0}^{p-1}\left[ \sum _{k=0}^{j}{'}(-1)^{k}\;C_{k}^{2p}\left( \zeta ^{2j-2k}+\frac{1}{\zeta ^{2j-2k}} \right) \left( \frac{2\alpha _{p,j}}{n^{2}-(2\alpha _{p,j})^{2}}- \frac{2\alpha _{p,j}}{(n-2)^{2}-(2\alpha _{p,j})^{2}} \right) \right] \\&\quad +\,\, \frac{1}{2z}\left( \zeta -\frac{1}{\zeta }\right) ^{2p}\left( \;W_{n+1}(\zeta )\;-\;W_{n-3}(\zeta )\right) . \end{aligned}$$

After rearranging terms it follows from Remarks 4.1, 4.2 and Lemma 4.2 that

$$\begin{aligned}&(-1)^{p}2^{2p}\left( Q_{n}^{(p+\frac{1}{2})}(z)-Q_{n-2}^{(p+\frac{1}{2})}(z)\right) =\ -\frac{\mu \pi i}{\zeta ^{n-1}}\left( \zeta -\frac{1}{\zeta }\right) ^{2p+1}\;\\&\qquad - \left[ \sum _{j=0}^{p-1}\left( (p-j)\sum _{k=0}^{j}{'}\;(-1)^{k}\;C_{k}^{2p}\left( \zeta ^{2j-2k}+\frac{1}{\zeta ^{2j-2k}} \right) \right) -\left( \zeta -\frac{1}{\zeta }\right) ^{2p-2}\right] \left( \frac{32}{n^{3}}+\frac{96}{n^{4}}\right) \\&\qquad - \left[ 256\sum _{j=0}^{p-1}\left( (p-j)\left( (p-j)^{2}+1\right) \sum _{k=0}^{j}{'}\;(-1)^{k}\;C_{k}^{2p} \;\left( \zeta ^{2j-2k}+\frac{1}{\zeta ^{2j-2k}} \right) \right) \right] \frac{1}{n^{5}}\\&\qquad + \frac{512(\zeta ^{6}-1)}{(\zeta ^{2}-1)^{3}}\left( \zeta -\frac{1}{\zeta }\right) ^{2p-2}\frac{1}{n^{5}} + O\left( \frac{1}{n^{6}}\right) . \end{aligned}$$

By Lemma 4.3 the second term on the right-hand side is zero and, by Lemma 4.3 and Remark 1 the third term may be rewritten to give

$$\begin{aligned}&(-1)^{p}2^{2p}\left( Q_{n}^{(p+\frac{1}{2})}(z)-Q_{n-2}^{(p+\frac{1}{2})}(z)\right) =\ -\frac{\mu \pi i}{\zeta ^{n-1}}\left( \zeta -\frac{1}{\zeta }\right) ^{2p+1}\\&\qquad -\ 256\left[ \;\Delta _{1} \;+\;\frac{((\zeta ^{2}-1)^{3}-2(\zeta ^{6}-1))}{(\zeta ^{2}-1)^{3}}\left( \zeta -\frac{1}{\zeta }\right) ^{2p-2}\right] \frac{1}{n^{5}}+ O\left( \frac{1}{n^{6}}\right) \\&\quad = -\frac{\mu \pi i}{\zeta ^{n-1}}\left( \zeta -\frac{1}{\zeta }\right) ^{2p+1} -\ 256\left( \Delta _{1}\ -\ \Delta _{2}\right) \;\frac{1}{n^{5}}\ +\ + O\left( \frac{1}{n^{6}}\right) , \end{aligned}$$

as required.

As described in [15], for \(|\zeta |\) near 1 with \(n\) even and initially less than some critical value the first term on the right-hand side of (4.3) may dominate whereas for \(n\) greater than this critical value the second term dominates. A similar comment refers to when \(n\) is odd by taking account of  (4.4).

Finally, Theorems 2.1 and 4.1 together with expression  (4.1) lead to the following result where \(C^{(\lambda )}_{n}(f_{z})\) denotes the \(n\)-point generalised Clenshaw–Curtis approximation to \(I^{(\lambda )}(f_{z})\).

Theorem 4.2

For \(\zeta \notin (-\infty ,-1]\cup [1,\infty )\) and assuming

  1. (a)

    \(n\) to be even then the \(n\rightarrow \infty \) behaviour of the generalised Clenshaw–Curtis quadrature error is given by

    $$\begin{aligned} I^{(p+\frac{1}{2})}(f_{z})\ -\ C^{(p+\frac{1}{2})}_{n}(f_{z}) \sim \;\frac{(-1)^{p+1}3(\zeta -\frac{1}{\zeta })^{2p-3}(\zeta +\frac{1}{\zeta })}{2^{2p-5}\;\zeta ^{n-1}n^{4}}, \end{aligned}$$

    whereas for n less than the critical value

    $$\begin{aligned} I^{(p+\frac{1}{2})}(f_{z})\ -\ C^{(p+\frac{1}{2})}_{n}(f_{z}) \sim \ \frac{(-1)^{p+1}\mu \pi i}{2^{2p-1}\zeta ^{2n-2}}\;\left( \zeta -\frac{1}{\zeta }\right) ^{2p}. \end{aligned}$$
  2. (b)

    \(n\) to be odd then the \(n\rightarrow \infty \) behaviour of the generalised Clenshaw–Curtis quadrature error is given by

    $$\begin{aligned} I^{(p+\frac{1}{2})}(f_{z})-C^{(p+\frac{1}{2})}_{n}(f_{z}) \sim \ \ \frac{(-1)^{p+1}}{2^{2p-9}\zeta ^{n-1}\left( \zeta -\frac{1}{\zeta }\right) }\left[ \Delta _{1}- \Delta _{2} \right] \frac{1}{n^{5}}, \end{aligned}$$

whereas for \(n\) less than the critical value

$$\begin{aligned} I^{(p+\frac{1}{2})}(f_{z})\ -\ C^{(p+\frac{1}{2})}_{n}(f_{z}) \sim \ \frac{(-1)^{p+1}\mu \pi i}{2^{2p-1}\zeta ^{2n-2}}\;\left( \zeta -\frac{1}{\zeta }\right) ^{2p}. \end{aligned}$$

5 The approximate location of the critical value

In any numerical example the approximate value of \(n\) at which the location of the critical value occurs is characterised by the fact that for \(n\) even the modulus of the first term on the right-hand side of (4.3) is equal to the modulus of the second term. (For \(n\) odd the equivalent terms from Theorem 4.1b should be chosen).

To illustrate this point let us consider the following integral

$$\begin{aligned} \int _{-1}^1 \frac{(1-x^2)^{\lambda -\frac{1}{2}}}{1+16x^{2}}\ dx. \end{aligned}$$

In the case of Clenshaw–Curtis quadrature, that is for \(\lambda \;=\;\frac{1}{2}\), it was shown in [15] that for \(n\) even and

$$\begin{aligned} \zeta \ =\ \frac{1+\sqrt{17}}{4}i, \end{aligned}$$

the critical value is located at approximately \(n=54\).

If we now assume \(p\ =\ 2 \) for example, that is \(\lambda \ =\ \frac{5}{2}, \) and again using the same value for \(\zeta \) then by equating the modulus of the first term on the right-hand side of  (4.3) to the modulus of the second term we see that the critical value now occurs at approximately \(n\ =\ 70,\) see Fig. 1.

6 Integer values of \(\lambda \)

Little is known concerning the behaviour of the error term for integer values of \(\lambda .\) Only in the case of Lobatto-Chebyshev quadrature , for which \( \lambda \;=\; 0, \) can it be inferred that the error term does not decay to zero in two distinct stages since the rule is then known to be of Gaussian type. Indeed, when \(\lambda \;=\;0,\) it follows from (3.3) that

$$\begin{aligned} Z_{r}(0) = \left\{ \begin{array}{ll} 1 &{} \text{ if } r\ge 1 , \\ -1 &{} \text{ if } r\le 0 . \end{array} \right. \end{aligned}$$
(6.1)

By taking account of (3.6) and (6.1) expression (3.7) leads to

$$\begin{aligned} Q^{(0)}_{n}(z)\ =\ \pi \;\zeta ^{-n}(\;\zeta -\zeta ^{-1})^{-1}, \end{aligned}$$

from which it follows

$$\begin{aligned} Q^{(0)}_{n}(z)\ -\ Q^{(0)}_{n-2}(z)\ =\ -\frac{\pi }{\zeta ^{n-1}}. \end{aligned}$$
(6.2)

If we now recall the comments made in Sect. 5 concerning Theorem 4.1 then by (6.2) the error in Lobatto-Chebyshev quadrature does not decay to zero in two distinct stages but does so as follows.

Theorem 6.1

The \(n\;\rightarrow \;\infty \) behaviour of the Lobatto-Chebyshev quadrature error is given by

$$\begin{aligned} I^{(0)}(f_{z})\ -\ C^{(0)}_{n}(f_{z}) \sim \ \frac{-2\pi }{\zeta ^{2n-1}(1-\zeta ^{-2})}. \end{aligned}$$

Proof

The result follows from expressions (4.1),  (6.2) and (2.1) with \(\lambda \;=\;0.\)

Finally we prove the following theorem. \(\square \)

Theorem 6.2

If \(\lambda _{0}\) is a fixed, positive integer and

$$\begin{aligned} n\;+\;\sigma \ >\ 2\lambda _{0}+1, \end{aligned}$$

then the \(n\;\rightarrow \;\infty \) behaviour of the quadrature error is given by

$$\begin{aligned} I^{(\lambda _{0})}(f_{z})\ -\ C^{(\lambda _{0})}_{n}(f_{z}) \sim \ \frac{(-1)^{\lambda _{0}+1} \pi \;(\zeta -\zeta ^{-1})^{2\lambda _{0}-1}}{2^{2\lambda _{0}-1}\zeta ^{2n-2}}. \end{aligned}$$

Proof

In [4, Theorem3.2] it was shown that

$$\begin{aligned} Q^{(\lambda _{0})}_{n}\ -\ Q^{(\lambda _{0})}_{n-2}\ =\ \frac{(-1)^{\lambda _{0}+1} \pi \;(\zeta -\zeta ^{-1})^{2\lambda _{0}}}{2^{2\lambda _{0}}\zeta ^{n-1}}, \end{aligned}$$

from which the result follows. \(\square \)