1 Introduction

In Fourier spectral analysis it is well known, see [2], that once the coefficients of the Dirichlet sums of a function f are computed numerically by quadrature at equally spaced points the resulting function interpolates f at these points and approximates the continuous partial sums with a high accuracy. In the paper we study the problem of approximating the continuous Fejér sums by interpolating trigonometric polynomials and cubic splines. The main result is that the continuous Fejér sums can be approximated with a high accuracy by the average of two Fejér interpolants. One interpolates to f at the set of points with even indexes and the other interpolates at the set of points with odd indexes. Cubic spline interpolation is often used instead of trigonometric for its simplicity to construct. In Sect. 2 we consider an approximation to the Fejér sums by cubic splines. In Sect. 3 we relate in constructive way Hermite and Fejér interpolations and discuss applications to avoid the Gibbs phenomenon.

The results in the paper are for functions from the Lebesgue spaces of 2π-periodic functions L p [0,2π],p>0 with norm \(\|f\|_{p}= (\int_{0}^{2\pi}|f(x)|^{p}\; dx )^{1/p}\). In the case p=∞ we consider the space of the continuous 2π-periodic functions C[0,2π] with norm ∥f C =max x∈[0,2π]|f(x)|. Throughout the paper \(\bf{ i}^{2}=-1\) and δ j,k is the Kroneker’s symbol and equals 1 if j=k and equals 0 when jk. The Fourier series of a function f is defined as follows

$$ f(x)=\frac{1}{2}a_0+\sum _{j=1}^\infty(a_j\cos jx+b_j \sin jx), $$
(1.1)

where

The n-th Dirichlet sum is the convolution integral

where \(D_{n}(x)=1+2\sum_{k=1}^{n} \cos kx =\frac{\sin(n+\frac{1}{2})x}{\sin {\frac{x}{2}}}\) is the Dirichlet kernel. For functions with absolutely convergent Fourier coefficients series the estimate \(\|f-S_{n}(f) \| _{\infty}\le \sum_{j=n+1}^{\infty}(|a_{j}|+|b_{j}|)\) holds true.

The Fejér partial sums are defined as the arithmetic means of the Dirichlet sums

$$\sigma_{n-1}(f,x)=\frac{1}{2\pi}f*K_{n-1}(x)= \frac{1}{2}a_0+\sum_{j=1}^{n-1} \frac{n-j}{n}(a_j\cos jx+b_j\sin jx), $$

where the Fejér kernel \(K_{n-1}(x) =\frac{1}{n} ( D_{0}+D_{1}+\cdots+D_{n-1} )= \frac {1}{n} ( \frac{\sin\frac{nx}{2}}{\sin\frac{x}{2}} )^{2} \) is positive trigonometric polynomial of degree n−1. For details see [5].

The trapezoidal rule (TR) for 2π-periodic functions with nodes x k has the form

$$ \int_0^{2\pi} f(x)\; dx= \frac{2\pi}{N}\sum_{k=0}^{N-1}f \biggl( \frac{2\pi k}{N} \biggr)-2 \pi\sum_{m=1}^\infty a_{mN} $$
(1.2)

and is the Gaussian quadrature for the trigonometric polynomials in L 2[0,2π]. In [2] the following relations for computing a j and b j by TR are shown

(1.3)

In the next theorem we summarize some of the properties of the partial sums with coefficients A j,2n+1,B j,2n+1, all of the results can be found in [2].

Theorem A

The polynomial

$$ T_n(f,x)=\frac{1}{2} A_{0,2n+1}+\sum _{j=1}^n (A_{j,2n+1}\cos jx+B_{j,2n+1} \sin jx), $$
(1.4)

interpolates to f at the points \(x_{j}=\frac{2j}{2n+1}\pi\), j=0,1,…,2n and

$$ \bigl\|f-T_n(f) \bigr\|_\infty\le2\sum_{j=n+1}^\infty\bigl(|a_j|+|b_j|\bigr), \qquad \bigl\|f-T_n(f) \bigr\|_2 \le2 \bigl\|f-S_n(f) \bigr\|_2. $$
(1.5)

Sketch of the Proof

The polynomial T n is obtained from S n by applying (1.2) with N=2n+1 to the coefficients a j ,b j for jn−1. From the convolution representation of S n it follows that

We have that \(T_{n}(f,x)=\frac{1}{2n+1}\sum_{k=0}^{2n}f(x_{k})D_{n}(x-x_{k})\) where D n (xx k ) is a trigonometric polynomial of degree n and D n (x j x k )=(2n+1)δ j,k . Clearly the sum equals f(x j ) at the points x j , and hence T n is the interpolating trigonometric polynomial to f at x j ,j=0,…,2n. From (1.2) the error term ρ n (f) has the form

The estimates (1.5) follow from ∥fT n (f)∥ p ≤∥fS n (f)∥ p +∥S n (f)−T n (f)∥ p ≤∥fS n (f)∥ p +∥E n (f)∥ p and the fact that all of the neglected coefficients a j , b j for jn+1 are present only once in E n . □

The above result plays important role in aliasing, see [2]. The trigonometric interpolating polynomial can be replaced by interpolating cubic spline and the error estimate will differ only by a constant factor. In the next section we study the properties of the polynomials obtained by replacing the Fourier coefficients a j ,b j in σ n−1(f,x) by A j,N , B j,N for N=n and N=2n as well as spline interpolation. Since the Fejér partial sums are positive for positive functions we use Fejér type interpolation to construct the interpolants with that property.

2 Fejér interpolation

A Fejér interpolating function G to f at z j ,j=0,…,N−1 is such that G(z j )=f(z j ) and G′(z j )=0. Our first lemma considers relation between Fejér partial sums σ n−1(f,x) and Fejér interpolation with trigonometric polynomials to f at the points \(x_{j}=\frac{2j\pi}{n}\), j=0,1,…,n−1. Let

$$ M_{n-1}(f,x,\alpha)=\frac{2\pi}{n}\sum _{j=0}^{n-1} f \biggl(\frac{2j+\alpha}{n}\pi \biggr)K_{n-1} \biggl(x-\frac{2j+\alpha}{n}\pi \biggr). $$

In the special case α=0 we will use also M n−1(f,x) for M n−1(f,x,0).

Lemma 1

The polynomial

$$ M_{n-1}(f,x)=\frac{1}{2}A_{0,n}+\sum _{j=1}^{n-1}\frac {n-j}{n}(A_{j,n}\cos jx + B_{j,n}\sin jx) $$
(2.1)

is the Fejér interpolant to f at the points x 2j and

$$\bigl\|\sigma_{n-1}(f)-M_{n-1}(f)\bigr\|_C \le\sum _{j=1}^{n-1}\frac {j}{n}\bigl(|a_j|+|b_j|\bigr)+ \sum_{j=n}^\infty\bigl(|a_j|+|b_j|\bigr). $$

Proof

The polynomial M n−1(f,x) is obtained from \(\frac {1}{2\pi}f*\sigma_{n}(f,x)\) by using (1.2) with N=n, and hence

$$ M_{n-1}(f,x)=\frac{1}{n}\sum_{j=0}^{n-1} f(x_j)K_{n-1}(x-x_j). $$

Direct computations, see [5], show that \(K_{n-1}(x_{k}-x_{j})=n \delta_{j,k}, K'_{n-1}(x_{k}-x_{j})=0\), and it follows that M n−1(x k )=f(x k ), \(M'_{n-1}(x_{k})=0\), k=0,…,n−1. By substituting the coefficients A j,n and B j,n from (1.3) into M n−1(f,x) we get that

$$ M_{n-1}(f,x)=\frac{a_0}{2}+\sum_{m=1}^\infty a_{mn}+ \frac{1}{n}\sum_{m=0}^\infty \sum_{j=1}^{n-1}\bigl(h_j(x)a_{j+mn}+w_j(x)b_{j+mn} \bigr), $$
(2.2)

where h j (x)=(nj)cosjx+jcos(nj)x, w j (x)=(nj)sinjxjsin(nj)x. Since |h j |≤n and |w j |≤n, by taking the absolute value of

we get that

(2.3)

The right-hand side does not depend on x, and hence we obtain the error estimate. □

The rather weak estimate (2.3) is due to the fact that M n−1(f) is a polynomial of degree n−1 but we used only n interpolating points. Before proceeding to the case of N=2n we add a technical corollary.

Corollary 1

The following inequality holds true

$$ \frac{1}{n^4}\bigl\|M_{n-1}^{(4)}\bigr\|_{C}\le \frac{\sum_{j=1}^{\sqrt {n}}(|a_j|+|b_j|)}{\sqrt{n}}+\frac{1}{12}\sum_{j=\sqrt{n}+1}^\infty \bigl(|a_j|+|b_j|\bigr). $$
(2.4)

Proof

From (2.1) we have that

$$\frac{1}{n^4}M_{n-1}^{(4)}(x)=\sum _{j=1}^{n-1}\frac {(n-j)j^4}{n^5}(A_{j,n}\cos jx+B_{j,n}\sin jx), $$

and from (2.2) M (4)(f) can be estimated in the following way

$$\frac{1}{n^4}\bigl\|M_{n-1}^{(4)}\bigr\|_{C}\le\sum _{j=1}^{n-1}g \biggl(\frac {j}{n} \biggr) \Biggl(\sum_{m=0}^\infty|a_{j+mn}|+|b_{j+mn}| \Biggr), $$

where g(x)=(1−x)x 4+(1−x)4 x. It is easy to check that \(\|g\| _{C[0,1]}=g (\frac{1}{2}-\frac{\sqrt{3}}{6} )=\frac{1}{12}\) and that g(x)<x for x∈[0,1]. Splitting the sum from 1 to \(\sqrt {n}\) and from \(\sqrt{n}+1\) to ∞ we get (2.4). If \(\sqrt{n}\) is not integer we consider the largest integer less than it. □

Next we consider the case N=2n and obtain error estimate similar to (1.5) i.e the error term contains only the neglected Fourier coefficients.

Theorem 1

Let \(x_{j}=\frac{j\pi}{n}\), j=0,…,2n−1 and

$$ Q_{n-1}(f,x)=\frac{1}{2}A_{0,2n}+\sum _{j=1}^{n-1}\frac {n-j}{n}(A_{j,2n}\cos jx + B_{j,2n}\sin jx). $$
(2.5)

Then M n−1(f,x,1) is the Fejér interpolant to f at the points x 1,x 3,…,x 2n−1 and

Proof

Since Q n−1(f,x) is obtained by applying (1.2) with N=2n to \(\frac{1}{2\pi}f*\sigma_{n-1}(f)\) as in the proof of Theorem A we get that

From Lemma 1 it follows that the first term is \(\frac{1}{2}M_{n-1}(f,x,0)\) and the second term, \(\frac{1}{2n}\sum_{j=0}^{n-1} f(x_{2j}+\frac{\pi}{n})K_{n-1}(x-x_{2j}-\frac{\pi }{n})=\frac{1}{2}M_{n-1}(f,x,1)\), is the Fejér interpolant at x 2k+1. This completes the proof of (i).

To prove (ii), we use (1.3) with N=2n in order to estimate the difference

Since each of the neglected terms with an index jn participates only once in the above sum it follows that \(\|\sigma _{n-1}(f)-Q_{n-1}(f)\|_{\infty}\le\sum_{j=n}^{\infty}(|a_{j}|+|b_{j}|)\). In L 2 the trigonometric series is orthogonal and since σ n−1(f) is a polynomial of degree n−1 we have that

Finally, K n−1(f,xx j )≥0 and if f(x)>0, then Q n−1(f,x)>0 and we have (iii). □

The polynomial Q n−1(f) inherits most of the properties of the Fejér partial sums. The coefficients A j,N ,B j,N can be computed by using the discrete Fourier transform for example. In practice often cubic spline interpolation is preferred for its simplicity to handle. In Theorem 2 we study the effect of replacing the interpolating polynomials in Theorem 1 by cubic spline Fejér interpolants.

Let \(x_{-1}=-\frac{\pi}{n}, f(x_{-1})=f(x_{2n-1})\), \(x_{2n+1}=2\pi+\frac {\pi}{n}, f(x_{2n+1})=f(x_{1})\). Since f is a fixed function we drop the dependence on it in the notations to the end of the section. The piece-wise cubic polynomial functions U 0 and U 1 such that U 0(x 2j )=f(x 2j ), \(U'_{0}(x_{2j})=0\), U 1(x 2j+1)=f(x 2j+1), and \(U'_{1}(x_{2j+1})=0\) are positive for positive f and have continuous first derivatives on [0,2π]. They are Fejér interpolants to f but on the other hand they are Hermite-spline interpolants to M n−1(x,0) and M n−1(x,1), respectively and hence, see [3],

(2.6)

Theorem 2

The spline \(SQ_{n}=\frac{1}{2}U_{0}+\frac{1}{2}U_{1}\) is positive on [0,2π] for any positive f and

$$ \|f-SQ_n\|_C\le \biggl(1+ \frac{(2\pi)^4}{197} \biggr)\frac{1}{\sqrt {n}}\sum_{j=0}^{\sqrt{n}}\bigl(|a_j|+|b_j|\bigr)+ \biggl(2+ \frac{\pi^4}{144} \biggr) \sum_{\sqrt{n}+1}^\infty\bigl(|a_j|+|b_j|\bigr). $$
(2.7)

Proof

From the definition of σ n−1(f) and (i) from Theorem 1 we get that

From (2.4) and (2.6), it follows that

$$ \bigl\|M_{n-1}(x,0)-U_0\bigr\|_{C}\le\frac{(2\pi)^4}{384\sqrt{n}} \sum_{j=1}^{\sqrt{n}}\bigl(|a_j|+|b_j|\bigr)+ \frac{(2\pi)^4}{4608}\sum_{j=\sqrt {n}+1}^{\infty}\bigl(|a_j|+|b_j|\bigr). $$

On the other hand

where \(C_{j,n}=2A_{j,2n}-A_{j,n}=\sum_{m=1}^{\infty}(-1)^{m}(a_{j+mn}+a_{-j+mn})\) and \(D_{j,n}=2B_{j,2n}-B_{j,n}=\sum_{m=1}^{\infty}(-1)^{m}(b_{j+mn}-b_{-j+mn})\). Similarly we get that

$$ \bigl\|M_{n-1}(x,1)-U_1\bigr\|_{C}\le\frac{(2\pi)^4}{384\sqrt{n}} \sum_{j=1}^{\sqrt{n}}\bigl(|a_j|+|b_j|\bigr)+ \frac{(2\pi)^4}{4608}\sum_{j=\sqrt {n}+1}^{\infty}\bigl(|a_j|+|b_j|\bigr) $$

the proof is completed by combining the error terms. □

We conclude the section with few remarks regarding the spline interpolation to σ n−1(f). The main difference from the spline interpolation of the Dirichlet partial sums is the lack of spectral accuracy i.e. the error estimate involves all of the Fourier coefficients of f. In the case when the series of the Fourier coefficients of f is absolutely convergent then from Theorem 2 it follows that SQ n−1(f)→f uniformly as n→∞. Finally, U and L can be interpolated by cubic splines at the corresponding points without any conditions on the derivatives of the interpolants. The resulting interpolants have continuous second derivatives. If not-a-knot end conditions are used then we have similar to (2.6) estimates, see [3], and Theorem 2 holds with the positiveness removed and the right-hand side in (2.7) multiplied by 5.

3 Discussion and applications

The Fejér interpolation although convergent has a low rate of O(1/n). In Theorem 2 the direct substitution by splines decreases the rate. In the current section we discuss two extensions regarding the trigonometric case to improve the rate of convergence. The first extension relates Hermite and Fejér interpolations and no longer requires positiveness. The second extension aims to increase the rate of convergence and in the same time to preserve the positiveness of the interpolant by considering the Jackson kernel in lieu of the Fejér’s. To observe a gain in the rate of convergence in both cases f has to be sufficiently smooth.

The rate of convergence can be increased by using information about the derivative of the function. In [1] the coefficients of the trigonometric Hermite interpolant E n (f,t) with interpolating conditions \(E_{n}(f,x_{j})=f(x_{j}), E_{n}'(f,x_{j})=f'(x_{j})\) at the points \(x_{j}=\frac{j\pi}{n}\), j=0,1,…,n−1 are explicitly given as functions of the Fourier coefficients of f and it is shown that the error of interpolation depends only on the coefficients with indexes larger than n. The results from Sect. 1 can be extended to provide a different constructive way for establishing most of the results in [1]. Since our goal is to illustrate a relation between Fejér and Hermite interpolations and is not to study them in details in the next proposition we consider only 2π-periodic functions from C 2[0,2π], i.e. with continuous second derivatives. From the Fourier series of \(f'(x)=\sum_{j=1}^{\infty}(jb_{j}\cos jx - ja_{j}\sin jx)\), and by applying (1.3) to f′ with N=n we obtain the discrete coefficients of f

(3.1)

To represent the Hermite interpolant as a convolution integral we use the harmonic conjugate function \(Hf(t)=\sum_{j=1}^{\infty}-b_{j}\cos jt + a_{j}\sin jt\). The conjugate function to D n is

$$ HD_n(x)=2\sum_{j=1}^n\sin jx= \frac{\cos\frac{x}{2}-\cos(n+\frac{1}{2})x}{\sin\frac{x}{2}}, $$
(3.2)

and the identity

$$ D_{n-1}(x)=K_{n-1}(x)+\frac{HD'_{n-1}}{n}(x), $$
(3.3)

can be justified by taking the Fourier transform of both sides, indeed

$$\hat{f}(\xi)\chi_{[-n+1,n-1]}(\xi)=\hat{f}(\xi)\chi_{[-n+1,n-1]}(\xi ) \biggl(\frac{n-|\xi|}{n}+\frac{i\xi(-i\mbox{\rm sgn}(\xi)}{n} \biggr). $$

From H(f′∗g)=f′∗H(g)=fH(g′) and (3.3) we obtain the relation

$$f*D_{n-1}=f*K_{n-1}+\frac{1}{n}H\bigl(f'*D_{n-1}\bigr) $$

that is similar to \(f*K_{n-1}= f*K_{n-1}*K_{n-1}+\frac{1}{n}H(f'*K_{n-1})\) used in [4].

In the next proposition the coefficients of E n (f) are expressed in terms of the Fourier coefficients of f.

Proposition 1

For a 2π-periodic function fC 2[0,2π] the polynomial

(3.4)

interpolates f, \(E_{n}'(f)\) interpolates fat the points \(x_{j}=\frac {2j\pi}{n}\), j=0,…,n−1, and the error of interpolation depends only on a k ,b k for kn.

Proof

The proof is based on different representations of the Hermite interpolating polynomial. A convolution form of E n (f) is considered in [1] and given in [6]

$$ E_n(f,x)=\frac{2}{n^2}\sin^2\frac{nt}{2}\sum _{j=0}^{n-1} \biggl( f'(x_j) \cot\frac{t-x_j}{2}-f(x_j)\frac{d}{dx}\cot\frac{x-x_j}{2} \biggr). $$

Direct computations and (3.2) lead to

As in the proof of Theorem A E n (f,t) can be considered as obtained by applying (1.2) with N=n to the two convolution integrals

(3.5)

From (3.3), it follows that

The discrete coefficients of f and f′ substituted in (3.5) lead to

(3.6)

More careful analysis of the interpolation conditions and (3.6) can provide the rest of the equivalent forms from [1]. We conclude the proof by estimating E n (f)−e n (f). From (1.3) and (3.1) we have that

where RA j (n+1) and RB j (n+1) contain a k and b k for k>n. Thus the error depends only on the Fourier coefficients of f with indexes greater than or equal (for A 0,n a 0) to n. □

The convergence of the Hermite interpolation in C 2[0,2π] is of order O(1/n 2), see [1], but the interpolation is not positive definite. The continuous Fejér partial sums are monotone for monotone function and that property makes them useful in avoiding the Gibbs phenomenon. The interpolating Fejér polynomials no longer preserve the monotonicity of the function (\(K'_{n-1}\) changes sign) but K n−1 is a reasonable concentration kernel, considered in [7], for dealing with the Gibbs phenomenon. Unfortunately, the rate of convergence fσ n−1 is \(O(\frac{1}{n})\) and in order to increase it we consider the Jackson kernel defined as

$$J_{n-1}(x) =\frac{1}{n^3} \biggl( \frac{\sin\frac{nx}{2}}{\sin\frac {x}{2}} \biggr)^{4}=\frac{1}{n}K_{n-1}^2(x). $$

It is a positive trigonometric polynomial of degree 2(n−1) and for 2π-periodic functions fC 2[0,2π] the estimate ∥ffJ n−1[0,2π)≤C(f)/n 2 holds true with a constant C(f) depending only on f, for details see [5]. Since J n−1 is also a concentration kernel, see [7], the localization principle of the Fourier series provides better approximation on the smooth parts of the function f by avoiding the Gibbs phenomenon. The degree of the polynomial fJ n−1 is 2n−2 and in order to preserve the spectral accuracy and avoid aliasing when by applying (1.2) we need N≥4n−1.

The Fourier transform of nJ n−1 is the cardinal cubic spline

$$S_{3,n}(\xi)=\frac{n-|\xi|}{n}\chi_{[-n,n]}(\xi)* \frac{n-|\xi|}{n}\chi _{[-n,n]}(\xi). $$

Let

$$I_{n-1}(f,x,\alpha)=\frac{2\pi}{n}\sum _{j=0}^{n-1} f \biggl(\frac {4j+\alpha}{2n}\pi \biggr)J_{n-1} \biggl(x-\frac{4j+\alpha}{2n}\pi \biggr). $$

In the next theorem we summarize several results about the discrete fJ n−1 similar to the results in Sects. 1, 2 for the discrete fD n−1 and fσ n−1.

Theorem 3

Let \(x_{j}=\frac{2j\pi}{n}\), j=0,…,n−1 then the polynomial I n−1(f,x,0) interpolates f at the points x j , \(I'_{n-1}(x_{j})=I''_{n-1}(x_{j})=I'''_{n-1}(x_{j})=0\), j=0,…,n−1 and

$$I_{n-1}(f,x,0)=\frac{1}{2}A_{0,n}+\sum _{j=1}^{2n-2}\frac {S_{3,n}(j)}{n}(A_{j,n}\cos jx + B_{j,n}\sin jx). $$

Furthermore, the polynomial

is positive for positive f and \(\|f*J_{n-1}-R_{2n-2}(f)\|_{\infty}\le\sum_{j=2n}^{\infty}(|a_{j}|+|b_{j}|)\).

Proof

The proof is repetition of the proof of Theorem 2 by considering interpolation at 4n points and grouping the indexes modulo 4. Since N=4n the error of interpolation depends on the Fourier coefficients with indexes greater than or equal to 2n. □