1 Introduction

In this paper, we want to study adaptive Fourier expansions of real-valued functions f in \(L^{2}(0, 2\pi ])\) using a generalized Fourier basis. In different papers, see e.g. [9, 21, 29, 30], generalized Fourier bases have been considered with particular applications in signal processing and system identification, see [9, 14].

Before we can state the problem and our results in detail, we need to introduce some notations. Let \({\mathbb T}\) be the unit circle in the complex domain, \({\mathbb T}:= \{z \in {\mathbb C}: \, |z| =1 \}\). We identify \({\mathbb T}\) with the interval \([0, 2 \pi )\) using the map \(z={\mathrm e}^{it}\). Let \(L^{2}([0, 2\pi ))\) be the space of square integrable \(2 \pi \)-periodic functions. The Fourier expansion of \(f \in L^{2}([0, 2\pi ))\) reads

$$\begin{aligned} f(t) = \sum _{k=-\infty }^{\infty } c_{k}(f) \, {\mathrm e}^{ikt}, \end{aligned}$$

where \(c_{k}(f) := \frac{1}{2\pi } \int _{0}^{2\pi } f(t) {\mathrm e}^{-ikt} d t\) denote the Fourier coefficients of f. Further, let

$$\begin{aligned} \langle f, g \rangle _{L^{2}} : = \frac{1}{2\pi } \int _{0}^{2\pi } f(t) \, \overline{g(t)} d t \end{aligned}$$
(1.1)

be the inner product in \(L^{2}([0, 2\pi ))\), and \(\Vert \cdot \Vert _{L^{2}}\) denotes the corresponding norm. We assume that f is real-valued, then \(c_{-k}(f) = \overline{c_{k}(f)}\), and hence

$$\begin{aligned} f(t) = c_{0}(f) + \sum _{k=1}^{\infty } \Big (c_{k}(f) \, {\mathrm e}^{ikt} + \overline{c_{k}(f)} \, {\mathrm e}^{-ikt} \Big ), \end{aligned}$$

i.e., \(f(t) = 2 {\mathrm {Re}} \, f^{+}(t)\), where

$$\begin{aligned} f^{+}(t) : = \frac{c_{0}(f)}{2} + \sum _{k=1}^{\infty } c_{k}(f) \, {\mathrm e}^{ikt} = \sum _{k=0}^{\infty } c_{k}(f^{+}) \, {\mathrm e}^{ikt}. \end{aligned}$$
(1.2)

Let \(H^{2} \subset L^{2}([0, 2 \pi ))\) be the Hardy space of all functions f in \(L^{2}([0, 2\pi ))\) for which all negative Fourier coefficients vanish, i.e., \(c_{-k}(f) =0\) for \(k \in {\mathbb N}\). Obviously, \(f^{+} \in H^{2}\). We introduce the generalized Fourier system, the so-called Takenaka-Malmquist system,

$$\begin{aligned} B_{0} = \frac{\sqrt{1 - |z_{0}|^{2}}}{1 - {z}_{0} \, {\mathrm e}^{it}}, \quad B_{\ell }(t) = \frac{\sqrt{1 - |z_{\ell }|^{2}}}{1 - {z}_{\ell } \, {\mathrm e}^{it}} \prod _{k=0}^{\ell -1} \frac{{\mathrm e}^{it} - \overline{z}_{k}}{1 - {z}_{k} \, {\mathrm e}^{it}}, \quad \ell =1, 2, \ldots . \end{aligned}$$
(1.3)

The function system \(\{ B_{\ell }\}_{\ell =0}^{\infty }\) is completely determined by the sequence of “zeros” \(\{ z_{\ell } \}_{\ell =0}^{\infty }\) where we assume that \(|z_{\ell }| \le c < 1\) for all \(\ell \ge 0\), see e.g. [32, 33]. This function system is an orthonormal system with respect to the inner product in (1.1), i.e., we have \(\langle B_{\ell }, B_{k} \rangle _{L^{2}} = \delta _{\ell ,k}\) with \(\delta _{\ell ,k}\) being the Kronecker symbol. Moreover, this system is complete in \(H^{2}\) if and only if \(\sum _{\ell \ge 0} (1 - |z_{\ell }|) = \infty \). For a proof we refer to [2], p. 244. Note that for \(z_{\ell }=0\), \(\ell \ge 0\), we obtain the classical Fourier basis \(B_{\ell }(t) = {\mathrm e}^{i \ell t}\). The expansion of \(f^{+} \in H^{2}\) in this orthogonal system reads \( f^{+}(t) = \sum _{k=0}^{\infty } \langle f^{+}, B_{k} \rangle _{L^{2}} \, B_{k} \) with adaptive Fourier coefficients \(\langle f^{+}, B_{k} \rangle _{L^{2}}\). Further, let

$$\begin{aligned} f_{N}^{+} := \sum _{k=0}^{N} \langle f^{+}, B_{k} \rangle _{L^{2}} \, B_{k} \end{aligned}$$
(1.4)

denote the N-th adaptive partial Fourier sum. Bultheel and Carrette [9] have shown that similarly as for the classical Fourier basis, the generalized Fourier coefficients of a \(2\pi \)-periodic function with continuous q-th derivative with \(q >2\) in the Takenaka-Malmquist basis decay with at least rate \(N^{-q}\). In this case the approximation error \(e_{N}(f^{+}) = \Vert f^{+} - f_{N}^{+} \Vert _{\infty }\) decays with rate \(N^{2-q}\). This result involves only the assumption that \(z_{0}=0\) and \(|z_{\ell }| \le c <1\).

In this paper we want to study the question, how well a given function \(f^{+} \in H^{2}\) can be approximated by its generalized partial Fourier sum \(f_{N}^{+}\) if the zeros \(z_{\ell }\) determining the Takenaka-Malmquist system are taken in an (almost) optimal way. Our considerations are inspired by the study of adaptive Fourier series in [29] on the one hand and by our own results on approximation by exponential sums on the other hand, [23,24,25].

Our approach relies on the following idea. For a given classical Fourier expansion (1.2) of \(f^{+} \in H^{2}\) we try to approximate the sequence of Fourier coefficients \({\mathbf c}(f^{+}) = (c_{k}(f^{+}))_{k=0}^{\infty }\) by a sequence \(\widetilde{\mathbf c} = \widetilde{\mathbf c}^{(N)}= (\widetilde{c}_{k})_{k=0}^{\infty }\) being a finite linear combination of non-increasing exponentials, i.e.,

$$\begin{aligned} \widetilde{c}_{k} =\sum _{\ell =0}^{N} {a}_{\ell } {z}_{\ell }^{k}, \qquad k \in {\mathbb N}_{0}, \end{aligned}$$
(1.5)

with coefficients \({a}_{\ell } \in {\mathbb C}\) and \({z}_{\ell } \in {\mathbb D}_{0}\), where \({\mathbb D}_{0} : = \{z \in {\mathbb C}: \, |z| < 1 \}\) denotes the open unit disk. The goal is now to choose \({a}_{\ell }\) and \({z}_{\ell }\) such that \( \Vert {\mathbf c}(f^{+}) - \widetilde{\mathbf c} \Vert _{\ell ^{2}}^{2} := \sum _{k=0}^{\infty } |c_{k}(f^{+}) - \widetilde{c}_{k} |^{2} \le \epsilon \) with \(\epsilon \) as small as possible. Then

$$\begin{aligned} \widetilde{f}^{+} (t) := \sum _{k=0}^{\infty } \widetilde{c}_{k} \, {\mathrm e}^{ikt} \end{aligned}$$

satisfies \(\Vert f^{+} - \widetilde{f} \Vert _{L^{2}}^{2} \le \epsilon \) by Parseval identity.

Using the special representation (1.5) for \(\widetilde{c}_{k}\) we will show that \(\widetilde{f}^{+}\) can be written as an N-th adaptive partial Fourier sum

$$\begin{aligned} \widetilde{f}^{+}(t) = \sum _{\ell =0}^{N} b_{\ell } \, B_{\ell }(t) \end{aligned}$$

in the Takenaka-Malmquist basis, where the basis elements \(\{ B_{\ell } \}_{\ell =0}^{N}\) are determined by the zeros \({z}_{\ell }\) in (1.5) and the coefficients \(b_{\ell }\) can be obtained from \({a}_{\ell }\) in (1.5) by a bijective linear map. Therefore, the problem to find an appropriate sequence of zeros \(\{ z_{\ell } \}\) that determine the adaptive Fourier basis \(\{ B_{\ell } \}_{\ell =0}^{N}\) in (1.3) can be reformulated as a problem of sparse approximation with exponential sums:

For a given decaying sequence \({\mathbf c}(f^{+})\) we want to find a new sequence \( \widetilde{\mathbf c}^{(N)}:= (\widetilde{c}_{k})_{k=0}^{\infty }\) of the form (1.5) such that \(\Vert {\mathbf c}(f^{+})-\widetilde{{\mathbf c}}^{(N)} \Vert _{\ell ^{2}}^{2} \le \epsilon \).

Practically, we have to solve the following problems. For a given accuracy level \(\epsilon >0\), find the smallest \(N \in {\mathbb {N}}\) such that \(\widetilde{\mathbf c}^{(N)}\) in (1.5) satisfies \(\Vert {\mathbf c}(f^{+})- \widetilde{{\mathbf c}}^{(N)} \Vert _{\ell ^{2}}^{2} \le \epsilon \), and compute \({z}_{\ell } \in {\mathbb {D}}\) and \({a}_{\ell } \in \mathbb {C}\), \(\ell =0, \ldots , N\), determining \(\widetilde{\mathbf c}^{(N)}\). Vice versa, for a given “storage budget”, i.e., a given \(N \in {\mathbb {N}}\), find the parameters in (1.5) in order to achieve the smallest possible error \(\Vert {\mathbf c}(f^{+})- \widetilde{{\mathbf c}}^{(N)} \Vert _{\ell ^{2}}^{2}\).

Our paper has two goals. First, we want to study the following question. What is the asymptotic error behavior of \(\Vert f^{+} - f_{N}^{+} \Vert _{L^{2}}\) for \(N \rightarrow \infty \) compared to the decay of the classical Fourier sums that can be achieved? Second, we want to present a new computational method to explicitly compute the adaptive partial Fourier sum \(f_{N}^{+}\) with a presumed small error \(\epsilon \) such that N is as small as possible by employing a (suitably large) finite number of classical Fourier coefficients \((c_{k}(f^{+}))_{k=0}^{L}\). This algorithm particularly includes the computation of the zeros \(\{z_{\ell } \}_{\ell =0}^{N}\) needed to determine the Takenaka-Malmquist basis for the adaptive partial Fourier sum \(f_{N}^{+}\). We will also observe that optimal zeros \(z_{\ell }\) will depend on the considered length of the sum N.

We will apply the theory of Adamjan, Arov and Krein (AAK theory) [1] to solve the problem of sparse approximation of the sequence of classical Fourier coefficients by exponential sums. This theory is strongly related to the problem of rational approximation of functions in Hardy spaces and has been studied also with respect to its applications in signal processing and system identification, see e.g. [1, 6, 10, 17, 18, 20, 22, 35]. For earlier approaches on the application of the AAK theory in order to solve sparse approximation problems using exponential sums we refer to [7] and [3].

The AAK theory gives us a tool to relate the approximation error \(\Vert {\mathbf c}(f^{+}) - \widetilde{\mathbf c}^{(N)} \Vert _{\ell ^{2}}\) to singular values of special infinite Hankel matrices that are generated by the sequence \({\mathbf c}(f^{+})\). Using this relation, we will be able to estimate the decay of the error \( \Vert f^{+} - f_{N}^{+} \Vert _{L^{2}}\) by inspecting the decay of the singular values of these infinite Hankel matrices. At this point, we can use recent results by Pushnitski and Yafaev [27], who derived sharp estimates for singular values of Hankel operators. Roughly speaking, we can conclude that the decay \({\mathcal O}(N^{-1} (\log N)^{-\alpha })\) of the sequence \({\mathbf c}(f^{+})\) of classical Fourier coefficients can lead to the decay \({\mathcal O}(N^{-\alpha })\) for the error \(\Vert f^{+} - f_{N}^{+} \Vert _{L^{2}}\) of the N-th adaptive partial Fourier sum. Thus, under certain side conditions, we will show that one can even achieve exponential decay of the error for the adaptive Fourier sum while the classical Fourier sum may not even possess quadratic decay, see Theorem 3.5.

In the second part of the paper, we present a new algorithm for solving the sparse approximation problem (1.5). The procedure consists of two steps. In the first step we approximate the given vector \(({c}_{k}(f^{+}))_{k=0}^{L}\) by a vector \(\breve{\mathbf c}= ({\breve{c}}_{k} )_{k=0}^{L}\) of the form

$$\begin{aligned} \breve{c}_{k} := \sum _{\ell =0}^M \breve{a}_\ell \, \breve{z}_{\ell }^{k} \end{aligned}$$

with possibly large \(M<L\) where \(\breve{a}_{\ell } \in {\mathbb C} \setminus \{ 0 \}\) and with pairwise different \(\breve{z}_{\ell } \in \mathbb D:= \{z\in {\mathbb C}:\, 0< |z| < 1\}\). This can either be done by interpolation or by employing a stabilized Prony method, like APM [26] to the given data \(({c}_{k}(f^{+}))_{k=0}^{L}\) and taking \(M < L/2\). In a second step, we present our new algorithm to explicitly compute the non-zero singular values of the infinite Hankel matrix generated by \(\breve{\mathbf c}\). The decay of these singular values will give us a criteria, how to choose the number N such that a sequence \(\widetilde{\mathbf c}^{(N)}\) in (1.5) built by an exponential sum of length \(N+1\) provides an error \(\Vert \breve{\mathbf c} - \widetilde{\mathbf c} \Vert _{\ell ^{2}}^{2}\) being smaller than a predefined \(\epsilon \). Furthermore, our algorithm will provide the zeros \({z}_{\ell }\) and coefficients \({a}_{\ell }\) to compute \(\widetilde{\mathbf c}^{(N)}\) in (1.5).

We emphasize that the sequences \(\widetilde{\mathbf c}^{(N)}\) in (1.5) obtained by our algorithm lead to adaptive partial Fourier sums that are optimal in the sense of the AAK theory if the sequence \({\mathbf c}(f^{+})\) of classical Fourier coefficients of \(f^{+}\) coincides with \(\breve{\mathbf c}\) for some M. This is the case if \(f^{+}\) is a rational function.

For comparison, we also provide a greedy algorithm that searches for appropriate zeros \(z_{\ell }\) for the Takenaka-Malmquist basis step by step. Here we apply a simple adaption of Prony’s method for exponential sums of length 1.

Our numerical experiments impressively support our theoretical result that the appropriate choice of zeros \(z_{\ell }\) in the adaptive Fourier basis leads to a significantly faster decay of the adaptive partial Fourier sums. In contrast, the simple greedy approach leads to an error that decays only slightly faster than the error of the classical partial Fourier sums.

This paper is organized as follows. In Sect. 2 we present a further basis \(\{ P_{\ell } \}_{\ell =0}^{\infty }\) such that \(\{ B_{\ell } \}_{\ell =0}^{N}\) and \(\{ P_{\ell } \}_{\ell =0}^{N}\) span the same subspaces for each N, and we describe the corresponding basis transform. We prefer the basis \(\{ P_{\ell } \}_{\ell =0}^{\infty }\) in the theoretical observations since it simplifies our representations. Section 3 is devoted to the study of the decay of adaptive partial Fourier series that can be achieved. In Sect. 4 we derive an algorithm to compute (almost) optimal zeros \(z_{\ell }=z_{\ell }^{(N)}\), \(\ell =0, \ldots , N\), such that the corresponding N-th adaptive partial Fourier sum \(f_{N}^{+}\) satisfies a small predetermined error bound. In Sect. 5 we also present a much simpler greedy algorithm to compute the zeros \(z_{\ell }\) determining the Takenaka-Malmquist basis consecutively. Finally, in Sect. 6 we present numerical results for the decay of Fourier sums for three different examples. In the first example, we consider the Fourier expansion of a rational function, where our algorithm gives the optimal results according to AAK theory. in the second example we examine a non-rational smooth function. In the third example we study the adaptive Fourier sum of a piecewise smooth function with jumps such that the classical Fourier coefficients do not satisfy the assumption in Theorem 3.5. Our numerical results impressively show that a good choice of zeros in the adaptive Fourier basis leads to a significantly faster decay of adaptive partial Fourier sums compared to the classical Fourier sums. In the last example, the Gibbs phenomenon occurs however for the adaptive Fourier sum similarly as in the classical case.

2 Adaptive Fourier Bases

Preliminary, we want to present a different basis that is closely related to the Takenaka-Malmquist basis and simplifies our representations using approximations with exponential sums.

For a given vector of pairwise different values \((z_{0}, z_{1}, \ldots , z_{N})\) with \(0< |z_{\ell }| < 1\) let

$$\begin{aligned} P_{\ell }(t) := \frac{1}{(1 - {z}_{\ell } {\mathrm e}^{it})}, \quad \ell =0, \ldots , N. \end{aligned}$$
(2.1)

More generally, if 0 or multiple values occur in the vector \((z_{0}, \ldots , z_{N})\), let \(M_{\ell }+1\) be the number of different values in \((z_{0}, \ldots , z_{\ell })\) that are denoted by \(\widetilde{z}_{0}, \ldots , \widetilde{z}_{M_{\ell }}\). Let \(K_{j,\ell }\) be the multiplicity of \(\widetilde{z}_{j}\) in \((z_{0}, \ldots , z_{\ell })\) such that \(K_{0,\ell } + K_{1,\ell } + \ldots + K_{M_{\ell },\ell } = \ell +1\). Further, let \(\mu _{\ell }\) be the multiplicity of 0 in the vector \((z_{0}, \ldots , z_{\ell -1})\). If \(z_{\ell } = \widetilde{z}_{j}\), we define \(P_{\ell }\) by

$$\begin{aligned} P_{\ell }(t) := \frac{ {\mathrm e}^{it\mu _{\ell }}}{(1 - \widetilde{z}_{j} {\mathrm e}^{it})^{K_{j,\ell }}}. \end{aligned}$$
(2.2)

Theorem 2.1

The set of functions \(\{B_{\ell }: \ell =0, \ldots , N \}\) determined by (1.3) with the zeros \(z_{0}, z_{1}, \ldots z_{N}\) in \({\mathbb D}_{0}\) spans the same subspace as \(\{P_{\ell }: \ell =0, \ldots , N \}\) given in (2.1) and (2.2), respectively.

Proof

Let us first assume that \(z_{0}, \ldots ,z_{N}\) are pairwise different and nonzero. Then the functions \(B_{\ell }(t)\) in (1.3) can be written in the form

$$\begin{aligned} B_{\ell }(t) = \sqrt{1 - | z_{\ell }|^{2}} \, \sum _{j=0}^{\ell } \frac{p_{\ell ,j}}{1 - {z}_{j} {\mathrm e}^{it}}, \qquad \ell =0, \ldots , N, \end{aligned}$$
(2.3)

where the coefficients \(p_{\ell ,j}\) are uniquely determined by employing a partial fraction decomposition. More exactly, determining the functions

$$\begin{aligned} \varLambda _{\ell ,j} (t) := \frac{ \prod _{k=0}^{\ell }(1- {z}_{k} {\mathrm e}^{it})}{(1 - {z}_{j} {\mathrm e}^{it})} \quad j=0, \ldots , \ell , \end{aligned}$$

we find from (1.3) and (2.3) that

$$\begin{aligned} \sum _{j=0}^{\ell } p_{\ell ,j} \varLambda _{\ell ,j}(t) = \prod _{k=0}^{\ell -1} ({\mathrm e}^{it} - \overline{z}_{k}), \qquad \ell =0, \ldots , N, \end{aligned}$$

and \(p_{\ell ,j}\) are uniquely determined by comparing the coefficients of the trigonometric polynomials of degree \(\ell \) with respect to the powers \({\mathrm e}^{itk}\), \(k=0, \ldots , \ell \). In particular, it follows that \(p_{\ell ,\ell } \ne 0\). Thus, comparison with (2.1) yields

$$\begin{aligned} B_{\ell }(t) = \sqrt{1 - |z_{\ell }|^{2}} \, \sum _{j=0}^{\ell } p_{\ell ,j}\, P_{j}(t), \qquad \ell =0, \ldots , N. \end{aligned}$$
(2.4)

The system (2.4) implies

$$\begin{aligned} \left( \begin{array}{c} (1-|z_{0}|^{2})^{-1/2} B_{0}(t) \\ (1-|z_{1}|^{2})^{-1/2} B_{1}(t) \\ \vdots \\ (1-|z_{N}|^{2})^{-1/2} B_{N}(t) \end{array} \right) = \left( \begin{array}{cccc} p_{0,0} &{} 0 &{} \ldots &{} 0 \\ p_{1,0} &{} p_{1,1} &{} &{} \vdots \\ \vdots &{} &{} \ddots &{} 0 \\ p_{N,0} &{} \ldots &{} p_{N,N-1} &{} p_{N,N} \end{array} \right) \left( \begin{array}{c} P_{0}(t) \\ P_{1}(t) \\ \vdots \\ P_{N}(t) \end{array} \right) , \end{aligned}$$

showing that the transform is invertible.

If the vector \((z_{0}, \ldots , z_{N})\) contains the value \(z_{j}=0\) or multiple values, then we find with the same notations as for the general definition of \(P_{\ell }\) in (2.2) the generalized partial fraction decomposition of the form

$$\begin{aligned} B_{\ell }(t) = \sqrt{1 - | z_{\ell }|^{2}} \, {\mathrm e}^{\mu _{\ell }it} \, \sum _{j=0}^{M_{\ell }} \sum _{r=1}^{{K}_{j,\ell }}\frac{p_{\ell ,j,r}}{(1 - \widetilde{z}_{j}\, {\mathrm e}^{it})^{{K}_{j,\ell }}}. \end{aligned}$$

Now, similarly as before we observe that \(B_{\ell }(t)\) can be written as a linear combination of the functions \(P_{j}\), \(j=0, \ldots , \ell \) obtained from these \(\ell +1\) zeros, and in particular the coefficients \(p_{\ell ,j,K_{j,\ell }}\) do not vanish. Therefore we get again an invertible linear system relating \(P_{\ell }(t)\) and \(B_{\ell }(t)\). \(\square \)

Remark 2.2

Originally, the construction of the Takanaki-Malmquist basis is obtained the other way around. For a given sequence \(\{\widetilde{z}_{\ell } \}\) of pairwise different zeros in \({\mathbb D}\) and corresponding multiplicities \(K_{\ell }\) (where at most one multiplicity can be infinite), one can start with the functions \(\frac{1}{(1-\widetilde{z}_{\ell } {\mathrm e}^{{\mathrm i}t})^{\nu }}\), \(\ell \in {\mathbb N} \), \(1 \le \nu \le K_{\ell }\), and obtains the Takenaka-Malmquist basis by a Gram-Schmidt orthogonalization procedure with respect to the inner product (1.1), see [33].

3 Adaptive Fourier Sums and its Convergence

Let us assume that \(f(t) = 2 { Re } \, f^{+}(t)\) is a real-valued function in \(L^{2}({\mathbb R})\) with

$$\begin{aligned} f^{+}(t) = \sum _{k=0}^{\infty } c_{k}(f^{+}) \, { e }^{ikt}. \end{aligned}$$

Our main goal is to generate a new adaptive Fourier basis \(\{ B_{\ell } \}\) as given in (1.3) such that the adaptive N-th Fourier sums \(f_{N}^{+}\) of \(f^{+}\) in (1.4) have significantly faster decay for \(N \rightarrow \infty \) than the classical Fourier sums \(S_{N}(f) :=\sum _{k=0}^{N} c_{k}(f^{+}) {\mathrm e}^{ik \cdot }\). For this purpose we need to choose the sequence of zeros \(\{z_{\ell } \}_{\ell =0}^{N}\) defining the adaptive Fourier basis \(\{ B_{\ell } \}_{\ell =0}^{N}\) in an appropriate way. In this section we will show that indeed a strong decay of the adaptive Fourier sums can be achieved. The crucial idea to find the adaptive basis is the approach to approximate the sequence of classical Fourier coefficients by finite exponential sums.

For a given function \(f^{+} \in H^{2}\) we will approximate \({\mathbf c}(f^{+})= (c_{k}(f^{+}))_{k=0}^{\infty }\) by a new sequence \(\widetilde{\mathbf c}^{(N)} = \widetilde{\mathbf c} = (\widetilde{c}_{k})_{k=0}^{\infty }\) with coefficients being given by an exponential sum of length \(N+1\),

$$\begin{aligned} \widetilde{c}_{k} = \sum _{\ell =0}^{N} {a}_{\ell } {z}_{\ell }^{k}, \end{aligned}$$
(3.1)

where the parameters \({a}_{\ell }\in {\mathbb C}\) and \({z}_{\ell } \in {\mathbb D}\) have to be suitably chosen such that \(\Vert \widetilde{\mathbf c}^{(N)} - {\mathbf c}(f^{+}) \Vert _{\ell ^{2}}^{2} := \sum _{k=0}^{\infty } |\widetilde{c}_{k} - c_{k}(f^{+})|^{2} \le \epsilon \) for some small \(\epsilon \). Taking now the approximation \({f}^{+}_{N}(t) := \sum _{k=0}^{\infty } \widetilde{c}_{k} \, {\mathrm e}^{ikt}\) we immediately obtain the error estimate

$$\begin{aligned} \Vert f^{+} - {f}_{N}^{+} \Vert _{L^{2}}^{2} = \Vert {\mathbf c}(f^{+}) - \widetilde{\mathbf c}^{(N)} \Vert _{\ell ^{2}}^{2} \le \epsilon \end{aligned}$$

by Parseval identity. Approximating the sequence of Fourier coefficients of \(f^{+}\) as given in (3.1), we find

$$\begin{aligned} {f}^{+}_{N}(t)= & {} \sum _{k=0}^{\infty } \widetilde{c}_{k} \, {\mathrm e}^{ikt} = \sum _{k=0}^{\infty } \Big ( \sum _{\ell =0}^{N} {a}_{\ell } {z}_{\ell }^{k} \Big ) \, {\mathrm e}^{ikt} \nonumber \\= & {} \sum _{\ell =0}^{N} {a}_{\ell } \sum _{k=0}^{\infty } ( {z}_{\ell } {\mathrm e}^{it} )^{k} = \sum _{\ell =0}^{N} {a}_{\ell } \frac{1}{(1 - {z}_{\ell } {\mathrm e}^{it})} = \sum _{\ell =0}^{N} {a}_{\ell }\, P_{\ell }(t), \end{aligned}$$
(3.2)

i.e., \(f_{N}^{+}\) can be written with only \(N+1\) terms in the basis \(\{P_{\ell } \}_{\ell =0}^{N}\). This observation justifies that we call this approximation \(f_{N}^{+}\). By Theorem 2.1, \({f}^{+}_{N}\) can also be written as an expansion of \(N+1\) terms in the orthogonal Takenaka-Malmquist basis determined by the zeros \(({z}_{0}, \ldots , {z}_{N})\) in (3.1).

In formulas (3.1) and (3.2) we have for simplicity assumed that the zeros \(z_{\ell }\) have multiplicity 1. In the general case we can replace (3.1) by

$$\begin{aligned} \widetilde{c}_{k} = \sum _{\ell =0}^{M} \sum _{\nu =0}^{K_{\ell }-1} a_{\ell ,\nu } \left( {\begin{array}{c}k\\ \nu \end{array}}\right) \widetilde{z}_{\ell }^{k}, \end{aligned}$$
(3.3)

where \(\widetilde{z}_{0}, \ldots , \widetilde{z}_{M}\) are nonzero pairwise different zeros with multiplicities \(K_{0}, \ldots , K_{M}\), respectively, and \(K_{0}+ \ldots + K_{M} = N+1\). Then Theorem 2.1 implies

$$\begin{aligned} f_{N}^{+}(t)= & {} \sum _{k=0}^{\infty } \widetilde{c}_{k} {\mathrm e}^{{\mathrm i}kt} = \sum _{k=0}^{\infty } \sum _{\ell =0}^{M} \sum _{\nu =0}^{K_{\ell }-1} a_{\ell ,\nu } \left( {\begin{array}{c}k\\ \nu \end{array}}\right) (\widetilde{z}_{\ell } \, {\mathrm e}^{{\mathrm i}t})^{k} \nonumber \\= & {} \sum _{\ell =0}^{M} \sum _{\nu =0}^{K_{\ell }-1} a_{\ell ,\nu } \, \widetilde{z}_{\ell }^{\nu } \Big ( \sum _{k=0}^{\infty } (\widetilde{z}_{\ell } \, {\mathrm e}^{{\mathrm i}t})^{k} \Big )^{\nu +1} = \sum _{\ell =0}^{M} \sum _{\nu =0}^{K_{\ell }-1} \frac{a_{\ell ,\nu } \, \widetilde{z}_{\ell }^{\nu }}{(1- \widetilde{z}_{\ell } {\mathrm e}^{{\mathrm i}t})^{\nu +1}}, \end{aligned}$$
(3.4)

which can also be written as a linear combination of basis functions \(P_{\ell }\), \(\ell =0, \ldots , N\). In the computation above we have used the identity

$$\begin{aligned} \sum _{k=0}^{\infty } \left( {\begin{array}{c}k\\ \nu \end{array}}\right) z^{k} = \frac{z^{\nu }}{\nu !} \Big ( \sum _{k=\nu }^{\infty } z^{k}\Big )^{(\nu )} = \frac{z^{\nu }}{\nu !} \Big ( \frac{1}{1-z} \Big )^{(\nu )} = \frac{z^{\nu }}{(1-z)^{\nu +1}} \end{aligned}$$

for \(|z|<1\), where the upper index \(^{(\nu )}\) means here the \(\nu \)-th derivative.

Using this approach we can reformulate the problem of finding an (almost) optimal adaptive Fourier basis as the problem to find an optimal approximation of the sequence of classical Fourier coefficients by a sequence obtained from a short exponential sum. Therefore, we consider now the question how to obtain for a fixed N a sequence \( \widetilde{\mathbf c}^{(N)} = (\widetilde{c}_{k})_{k=0}^{\infty }\) of the form (3.1) or (3.3) such that \(\Vert \widetilde{\mathbf c}^{(N)} - {\mathbf c}(f^+) \Vert _{\ell ^{2}} \) is as small as possible. In this section we first consider the theoretic problem. Using the Theorem of Adamjan, Arov and Krein and the properties of infinite Hankel matrices, we will be able to show that one can achieve very fast convergence rates for adaptive Fourier sums for a large class of functions.

3.1 Infinite Hankel Matrices and the AAK Theorem

In the following we denote by \(\ell ^p:=\ell ^p(\mathbb {N}_{0})\) the space of p-summable sequences \( {\mathbf v}=(v_k)_{k=0}^\infty \) with the norm \(\Vert {\mathbf v}\Vert _p:=\left( \sum _{k=0}^\infty |v_k|^p \right) ^{1/p}\), \(1 \le p < \infty \). Let \(\mathbb {D}\) be the open unit disc without zero, \( {\mathbb D} :=\{z\in \mathbb {C}:0<|z|<1\}\). For a sequence \({\mathbf v} = (v_{k})_{k=0}^{\infty } \in \ell ^{2}\) and \(z \in {\mathbb {D}}\) we call

$$\begin{aligned} P_{\mathbf v}(z) := \sum _{k=0}^{\infty } v_{k} z^{k} \end{aligned}$$

its corresponding Laurent polynomial and \(P_{\mathbf v}(e^{i t})\), \(t \in {\mathbb {R}}\), its Fourier series. Further, for \({\mathbf c}\in \ell ^2\) we define the infinite Hankel matrix

$$\begin{aligned} {\varvec{\Gamma }}_{\mathbf c}:=\left( \begin{array}{cccc} c_0 &{} c_1 &{} c_2 &{} \cdots \\ c_1 &{} c_2 &{} c_3 &{} \cdots \\ c_2 &{} c_3 &{} c_4 &{} \cdots \\ \vdots &{} \vdots &{} \vdots &{} \ddots \\ \end{array} \right) = \left( c_{k+j}\right) _{k,j=0}^\infty . \end{aligned}$$
(3.5)

If the sequence \({\mathbf c}\) can be obtained as the (sub)sequence of Fourier coefficients, i.e., \({\mathbf c} = (c_{k}(f))_{k=0}^{\infty }\) for a function \(f \in L^{\infty }([0, 2\pi ))\), then \({\varvec{\Gamma }}_{\mathbf c}\) is a bounded operator on \(\ell ^{2}\), see the Theorem of Nehari [19] or [35], Theorem 15.18. Moreover, \({\varvec{\Gamma }}_{\mathbf c}\) is compact on \(\ell ^{2}\) if \({\mathbf c} = (c_{k}(f))_{k=0}^{\infty }\) for a continuous function \(f \in C([0, 2\pi ))\), see [12].

We assume that \({\mathbf c}\) is contained in the weighted Hilbert space

$$\begin{aligned} \ell _{w}^{2}:= \left\{ {\mathbf c} \in \ell ^{2}: \, \sum _{k=0}^{\infty } (k+1) |c_{k}|^{2} < \infty \right\} \subset \ell ^{2}. \end{aligned}$$

Then \({\varvec{\Gamma }}_{\mathbf c}\) maps a sequence \({\mathbf v} = (v_{j})_{j=0}^{\infty } \in \ell ^{2}\) into \(\ell ^{2}\), and with

$$\begin{aligned} {\varvec{\Gamma }}_{\mathbf c} \, {\mathbf v} = \Big ( \sum _{j=0}^\infty c_{k+j} \, v_j \Big )_{k=0}^\infty \quad for ~ {\mathbf v}:=(v_k)_{k=0}^\infty \end{aligned}$$

it follows by Cauchy Schwarz inequality that

$$\begin{aligned} \Vert {\varvec{\Gamma }}_{\mathbf c} {\mathbf v} \Vert _{\ell ^{2}}^{2}= & {} \sum _{k=0}^{\infty } \big | \sum _{j=0}^{\infty } c_{j+k}\, v_{j} \Big |^{2} \le \sum _{k=0}^{\infty } \Vert (c_{k+j})_{j=0}^{\infty } \Vert _{\ell _{2}}^{2} \, \Vert {\mathbf v} \Vert _{\ell ^{2}}^{2} \\= & {} \Big ( \sum _{k=0}^{\infty } (k+1) \, |c_{k}|^{2} \Big ) \, \Vert {\mathbf v} \Vert _{\ell ^{2}}^{2} = \Vert {\mathbf c} \Vert _{\ell _{w}^{2}}^{2} \, \Vert {\mathbf v} \Vert _{\ell ^{2}}^{2}. \end{aligned}$$

Observe that \(\ell ^{1} \subset \ell _{w}^{2}\) since \( {\mathbf c} \in \ell ^{1}\) implies that

$$\begin{aligned} \sum _{k=0}^{\infty } (k+1) |c_{k}|^{2} \le \sup _{k \in {\mathbb N}_{0}} | (k+1) c_{k} | \, \Vert {\mathbf c} \Vert _{\ell ^{1}} < \infty . \end{aligned}$$

We want to apply now the Theorem of Adamjan, Arov and Krein [1] together with some new results on the decay of singular values of Hankel operators by Pushnitski and Yafarev [27] in order to show the strong convergence properties of adaptive N-th Fourier sums in (1.4) if we take appropriate zeros \(\{z_{\ell } \}_{\ell =0}^{N}\) to determine \(B_{\ell }(t)\).

Theorem 3.1

(Adamjan, Arov and Krein). Let \({\mathbf c} \in \ell _{w}^{2}\) be a given sequence and let \({\varvec{\Gamma }}_{\mathbf c}\) be the corresponding infinite Hankel matrix on \(\ell ^{2}\). Further, let \(\sigma _{0}({\varvec{\Gamma }}_{\mathbf c}) \ge \sigma _{1}({\varvec{\Gamma }}_{\mathbf c}) \ge \sigma _{2}({\varvec{\Gamma }}_{\mathbf c}) \ge \ldots \) denote the singular values of \({\varvec{\Gamma }}_{{\mathbf c}}\) in decreasing order. Then, for each \(N \in {\mathbb N}_{0}\) there exists an infinite Hankel matrix \({\varvec{\Gamma }}_{\widetilde{\mathbf c}}\) of rank \(N+1\) such that

$$\begin{aligned} \Vert {\varvec{\Gamma }}_{\mathbf c} - {\varvec{\Gamma }}_{\widetilde{\mathbf c}} \Vert _{\ell ^{2} \rightarrow \ell ^{2}} = \sigma _{N+1}({\varvec{\Gamma }}_{\mathbf c}). \end{aligned}$$

For the proof of this theorem we refer to [1] or to [22].

We consider now Hankel operators with finite rank \(N+1\) in more detail. Let \(\widetilde{\mathbf c}= (\widetilde{c}_{k})_{k=0}^{\infty }\) be a special sequence of the form (3.1) or (3.3). Then \(\widetilde{\mathbf c} \in \ell ^{1}\) and thus in \(\ell _{w}^{2}\) since (3.1) implies

$$\begin{aligned} \Vert \widetilde{\mathbf c} \Vert _{\ell ^{1}}= \sum _{k=0}^{\infty } | \widetilde{c}_{k}| = \sum _{k=0}^{\infty } \left| \sum _{j=0}^{N} a_{j} z_{j}^{k} \right| \le \sum _{j=0}^{N} \left( \sum _{k=0}^{\infty } |a_{j} z_{j}^{k} | \right) = \sum _{j=0}^{N} \frac{|a_{j}|}{1-|z_{j}|} < \infty . \end{aligned}$$

The estimate follows similarly for (3.3). We recall the following property of the corresponding infinite Hankel matrix \({\varvec{\Gamma }}_{\widetilde{\mathbf c}}\), see e.g. [35], Theorem 16.13.

Theorem 3.2

(Kronecker). The Hankel operator \({\varvec{\Gamma }}_{\widetilde{\mathbf c}}: \ell ^{2} \rightarrow \ell ^{2}\) generated by \(\widetilde{\mathbf c} = (\widetilde{c}_{k})_{k=0}^{\infty } \in \ell ^{1}\) has finite rank \(N+1\), if and only if \( \widetilde{\mathbf c}\) is of the form (3.1) or (3.3).

Proof

For reader’s convenience we provide a short proof that also gives some insight into the connection to difference equations. Let \(z_{0}, \ldots , z_{N}\) be the zeros in (3.1) and (3.3), respectively, where in the second case the multiplicities are taken into account.

  1. 1.

    We define the characteristic polynomial P(z) by the values \(z_{0}, \ldots , z_{N}\),

    $$\begin{aligned} P(z):= \prod _{j=0}^{N} (z-z_{j}) = \sum _{\ell =0}^{N+1} b_{\ell } z^{\ell }, \end{aligned}$$
    (3.6)

    where the \(b_{\ell }\) are the coefficients in the monomial representation of P(z). Then (3.1) yields

    $$\begin{aligned} \sum _{\ell =0}^{N+1} b_{\ell } \widetilde{c}_{k+\ell } = \sum _{\ell =0}^{N+1} b_{\ell } \, \sum _{j=0}^{N} a_{j} z_{j}^{k+\ell } = \sum _{j=0}^{N} a_{j} z_{j}^{k} \, (\sum _{\ell =0}^{N} b_{\ell } \, z_{j}^{\ell }) = \sum _{j=0}^{N} a_{j} z_{j}^{k} \, P(z_{j})=0 \end{aligned}$$
    (3.7)

    for all \(k \in \mathbb {N}_{0}\), i.e., \((\widetilde{c}_{k})_{k=0}^{\infty }\) satisfies a difference equation of order \(N+1\). Similarly, from (3.3) it follows for the pairwise different zeros \(\widetilde{z}_{0}, \ldots , \widetilde{z}_{M}\) with multiplicities \(K_{j}\), \(j=0, \ldots , M\), that

    $$\begin{aligned} \sum _{\ell =0}^{N+1} b_{\ell } \widetilde{c}_{k+\ell }= & {} \sum _{\ell =0}^{N+1} b_{\ell } \sum _{j=0}^{M} \sum _{\nu =0}^{K_{j}-1} a_{j,\nu } \left( {\begin{array}{c}k+\ell \\ \nu \end{array}}\right) \widetilde{z}_{j}^{k+\ell } \\= & {} \sum _{j=0}^{M} \sum _{\nu =0}^{K_{j}-1} a_{j,\nu } \frac{\widetilde{z}_{j}^{\nu }}{\nu !} \sum _{\ell =0}^{N+1} b_{\ell } (k+\ell )(k+\ell +1) \ldots (k+\ell -\nu +1) \widetilde{z}_{j}^{\ell +k-\nu } \\= & {} \sum _{j=0}^{M} \sum _{\nu =0}^{K_{j}-1} a_{j,\nu } \frac{\widetilde{z}_{j}^{\nu }}{\nu !} \Big [ z^{k} \, P(z)\Big ]^{(\nu )}_{z=\widetilde{z}_{j}} =0, \end{aligned}$$

    where \(\Big [ z^{k} \, P(z)\Big ]^{(\nu )}_{z=\widetilde{z}_{j}}\) denotes the \(\nu \)-th derivative of \(z^{k} \, P(z) = \sum _{\ell =0}^{N+1} b_{\ell } z^{\ell +k}\) at \(z=\widetilde{z}_{j}\), which vanishes for \(\nu =0, \ldots , K_{j}-1\) since \(z=\widetilde{z}_{j}\) is a zero of multiplicity \(K_{j}\) in P(z). Thus, the \((N+1+k)\)-th column of \({\varvec{\Gamma }}_{\widetilde{\mathbf c}}\) is a linear combination of the \(N+1\) preceding columns for all k, and we conclude \({{\mathrm{rank}}}~{\varvec{\Gamma }}_{\widetilde{\mathbf c}} \le N+1\). Since P(z) has exact degree \(N+1\) it follows that \( {{\mathrm{rank}}}{\varvec{\Gamma }}_{\widetilde{\mathbf c}} = N+1\).

  2. 2.

    Conversely, if an infinite Hankel matrix \({\varvec{\Gamma }}_{\widetilde{\mathbf c}}\) generated by \(\widetilde{\mathbf c}\) possesses rank \(N+1\), then \(\widetilde{\mathbf c}\) satisfies a difference equation of order \(N+1\). Thus, there exist coefficients \(b_{0}, \ldots , b_{N+1}\) such that

    $$\begin{aligned} \sum _{l=0}^{N+1} b_{l} \widetilde{c}_{k+l} =0 \quad \forall k \in \mathbb {N}_{0}, \end{aligned}$$

    and \(b_{0} \ne 0, \, b_{N+1} \ne 0\). The theory of difference equations then implies that \(\widetilde{\mathbf c}\) can be written in the form (3.1) or (3.3), see e.g. [5]. \(\square \)

3.2 Decay of Adaptive Fourier Sums

Let us assume now that for a given decaying sequence \({\mathbf c} = {\mathbf c}(f^{+}) \in \ell _{w}^{2}\) of classical Fourier coefficients of \(f^{+} \in H^{2}\) we have found the sequence \(\widetilde{\mathbf c}\) of the form (3.1) (or (3.3)) that generates an infinite Hankel matrix of rank \(N+1\) as given in Theorem 3.2 satisfying the relation \( \Vert {\varvec{\Gamma }}_{\mathbf c} - {\varvec{\Gamma }}_{\widetilde{\mathbf c}} \Vert _{\ell ^{2} \rightarrow \ell ^{2}} = \sigma _{N+1}({\varvec{\Gamma }}_{\mathbf c})\) in Theorem 3.1. Then we can conclude that

$$\begin{aligned} \Vert {\mathbf c} - \widetilde{\mathbf c} \Vert _{\ell ^{2}} \le \sigma _{N+1}({\varvec{\Gamma }}_{\mathbf c}). \end{aligned}$$
(3.8)

This follows easily from the observation

$$\begin{aligned} \Vert {\mathbf c} - \widetilde{\mathbf c} \Vert _{\ell ^{2}} = \Vert {\varvec{\Gamma }}_{{\mathbf c} - \widetilde{\mathbf c}} \, {\mathbf e}_{0} \Vert _{\ell ^{2}} \le \sup _{\Vert {\mathbf v} \Vert _{\ell ^{2}} = 1} \Vert {\varvec{\Gamma }}_{{\mathbf c} - \widetilde{\mathbf c}} \, {\mathbf v} \Vert _{\ell ^{2}} = \Vert {\varvec{\Gamma }}_{\mathbf c} - {\varvec{\Gamma }}_{\widetilde{\mathbf c}} \Vert _{\ell ^{2} \rightarrow \ell ^{2}} , \end{aligned}$$

where \({\mathbf e}_{0} :=(1,0,0,\ldots ) \in \ell ^{2}\).

Now the question remains, how the singular values of the infinite Hankel matrix \({\varvec{\Gamma }}_{\mathbf c}\) decay compared to the decay of the generating sequence \({\mathbf c}\). Here, the following recent theorem about the decay of singular values of Hankel operators comes to our help, see [27].

Theorem 3.3

(Pushnitski and Yafaev). Let \({\mathbf c} = (c_{k})_{k=0}^{\infty } \in \ell _{w}^{2}\) satisfy the decay condition

$$\begin{aligned} c_{k} = {\mathcal O} (k^{-1} (\log k)^{-\alpha } ) , \quad k \rightarrow \infty \end{aligned}$$
(3.9)

for some \(\alpha >0\).

  1. 1.

    If \(0< \alpha < 1/2\), then the singular values of \({\varvec{\Gamma }}_{\mathbf c}\) satisfy the estimate

    $$\begin{aligned} \sigma _{N}({\varvec{\Gamma }}_{\mathbf c}) = C_{\alpha } N^{-\alpha } + o (N^{-\alpha }) \end{aligned}$$

    with \(C_{\alpha } = 2^{-\alpha } \pi ^{1-\alpha } (B( \frac{1}{2\alpha }, \frac{1}{2}))^{\alpha }\), where \(B(\cdot , \cdot )\) denotes the Beta function.

  2. 2.

    Let \(\Delta \) denote the forward difference operator with \(\Delta c_{k} := c_{k+1} - c_{k}\), and let recursively \(\Delta ^{m} c_{k} := \Delta ^{m-1}c_{k+1} - \Delta ^{m-1}c_{k}\) for \(m>1\). If \(\alpha >1/2\) and \({\mathbf c}\) satisfies (3.9) and

    $$\begin{aligned} \Delta ^{m} c_{k} = {\mathcal O}(k^{-1-m} (\log k)^{-\alpha }), \qquad k \rightarrow \infty \end{aligned}$$
    (3.10)

    for \(m=0, \ldots , \lfloor \alpha \rfloor +1\), then

    $$\begin{aligned} \sigma _{N} ({\varvec{\Gamma }}_{\mathbf c}) = C_{\alpha } N^{-\alpha } + o (N^{-\alpha }), \end{aligned}$$

    where the constant \(C_{\alpha }\) only depends on \(\alpha \).

For a proof we refer to [27] and [28].

Remark 3.4

  1. 1.

    If we even have the estimates

    $$\begin{aligned} c_{k} = o (k^{-1} (\log k)^{-\alpha } ) , \quad {\text {and}} \quad \Delta ^{m} c_{k} = o(k^{-1-m} (\log k)^{-\alpha }), \qquad k \rightarrow \infty , \end{aligned}$$

    then it follows that \( \sigma _{N}({\varvec{\Gamma }}_{\mathbf c}) = o(N^{-\alpha })\) for \(N \rightarrow \infty \), see [27, 28].

  2. 2.

    The estimates in Theorem 3.3 on the decay of the singular values of the operator \( {\varvec{\Gamma }}_{\mathbf c}\) imply that \({\varvec{\Gamma }}_{\mathbf c}\) is in the Schatten class \(S_{p, \infty }\) with the norm

    $$\begin{aligned} \Vert {\varvec{\Gamma }}_{\mathbf c} \Vert _{S_{p,\infty }} := \sup _{N \in {\mathbb N}} N^{1/p} \sigma _{N}({\varvec{\Gamma }}_{\mathbf c}) < \infty \end{aligned}$$

    for \(p = 1/\alpha \). It has been already shown by Peller [22] that \({\varvec{\Gamma }}_{\mathbf c} \in S_{p,p}\) with

    $$\begin{aligned} \Vert {\varvec{\Gamma }}_{\mathbf c} \Vert _{S_{p,p}}^{p} := \sum _{n=1}^{\infty } \sigma _{n}({\varvec{\Gamma }}_{\mathbf c})^{p} < \infty , \end{aligned}$$

    if and only if \({\mathbf c}\) is a sequence of Fourier coefficients for a function f in the Besov space \(B_{p}^{1/p}\). The above theorem also implies that we can even have a decay of singular values of \({\varvec{\Gamma }}_{\mathbf c}\) being faster than any polynomial.

  3. 3.

    In [34] it has been shown that for \(c_{k}= (1+k)^{-\gamma } \), \(\gamma >1\), the singular values of \({\varvec{\Gamma }}_{\mathbf c}\) satisfy

    $$\begin{aligned} \sigma _{N}({\varvec{\Gamma }}_{\mathbf c}) = \exp \Big (-\pi \sqrt{2 \gamma N} + {o}(\sqrt{N}) \Big ), \quad N \rightarrow \infty . \end{aligned}$$

The results by Pushnitsky and Yafaev fill the gap between having decay \((1+k)^{-1}\) and \((1+k)^{-\gamma }\) with \(\gamma > 1\). Observe however that for \(c_{k}= (k+1)^{-1}\) we obtain the Hilbert matrix \({\varvec{\Gamma }}_{{\mathbf c}}\), and this operator is not compact, see [22], Chapter 10.

Using the considerations above, we arrive at the following result.

Theorem 3.5

Let \(f^{+}(t)= \sum _{k=0}^{\infty } c_{k}(f^{+}) \, {\mathrm e}^{ikt}\) be a function in \(H^{2}\). If \(\,{\mathbf c}= (c_{k}(f^{+}))_{k=0}^{\infty }\) satisfies the decay conditions (3.9) and (3.10) for \(\alpha > 1/2\) then for each \(N \in {\mathbb N}\), there exists a vector of zeros \(z_{0}^{(N)}, \ldots , z_{N}^{(N)}\) determining a Takenaka-Malmquist system \(\{ B_{k} \}_{k=0}^{N}\) such that the N-th adaptive partial Fourier sum \(f_{N}^{+} = \sum _{k=0}^{N} \langle f, B_{k} \rangle _{L^{2}} B_{k}\) satisfies the asymptotic estimate

$$\begin{aligned} \Vert f^{+} - f_{N}^{+} \Vert _{L^{2}} \le C_{\alpha } N^{-\alpha } \end{aligned}$$

where \(C_{\alpha }\) only depends on \(\alpha \).

Proof

From Theorem 2.1 as well as (3.2) and (3.4) it follows that \(f_{N}^{+}\) can be written in the basis using \(\{P_{k}: \, k=0, \ldots , N \}\), such that \(f_{N}^{+}(t) = \sum _{k=0}^{\infty } \widetilde{c}_{k}^{(N)} {\mathrm e}^{itk}\), where the coefficients \(\widetilde{c}_{k}^{(N)}\) are of the form

$$\begin{aligned} \widetilde{c}_{k}^{(N)} = \sum _{j=0}^{N} a_{j}^{(N)} (z_{j}^{(N)})^{k} \quad \text {or} \quad \widetilde{c}_{k}^{(N)} = \sum _{\ell =0}^{M} \sum _{\nu =0}^{K_{\ell }-1} a_{\ell ,\nu }^{(N)} \left( {\begin{array}{c}k\\ \nu \end{array}}\right) (\widetilde{z}_{\ell }^{(N)})^{k}. \end{aligned}$$

The sequence \(\widetilde{\mathbf c}^{(N)} = (\widetilde{c}_{k}^{(N)})_{k=0}^{\infty }\) determines a Hankel operator of rank \(N+1\). Thus, if \(\widetilde{\mathbf c}^{(N)}\), i.e., the zeros \(z_{j}^{(N)}\) (resp. \(\widetilde{z}_{j}^{(N)}\)) and the coefficients \(a_{j}^{(N)}\) (resp. \(a_{j,\nu }^{(N)}\)) are taken such that

$$\begin{aligned} \Vert {\varvec{\Gamma }}_{\mathbf c} - {\varvec{\Gamma }}_{\widetilde{\mathbf c}^{(N)}} \Vert _{\ell ^{2} \rightarrow \ell ^{2}} = \sigma _{N+1}({\varvec{\Gamma }}_{{\mathbf c}}), \end{aligned}$$

then it follows from (3.8) that \(\Vert {\mathbf c} - \widetilde{\mathbf c}^{(N)} \Vert _{\ell ^{2}} \le \sigma _{N+1} ({\varvec{\Gamma }}_{\mathbf c})\). By Theorem 3.1, this sequence \(\widetilde{\mathbf c}^{(N)}\) can always be found, and by Theorem 3.3 we have \(\sigma _{N+1}({\varvec{\Gamma }}_{\mathbf c}) \le {\mathcal O}(N^{-\alpha })\). The assertion finally follows from Parseval identity,

$$\begin{aligned} \Vert f^{+} - f_{N}^{+} \Vert _{L^{2}} = \Vert {\mathbf c} - \widetilde{\mathbf c}^{(N)} \Vert _{\ell ^{2}}\le \Vert {\varvec{\Gamma }}_{\mathbf c} - {\varvec{\Gamma }}_{\widetilde{\mathbf c}^{(N)}} \Vert _{\ell ^{2} \rightarrow \ell ^{2}} = \sigma _{N+1} ({\varvec{\Gamma }}_{\mathbf c}) \le C_{\alpha } \, N^{-\alpha } \end{aligned}$$

with the constant \(C_{\alpha }\) from Theorem 3.3. \(\square \)

Remark 3.6

For continuous functions f, the decay condition (3.9) with some \(\alpha >0\) ensures that f has bounded variation and the corresponding Fourier series converges uniformly, see e.g. [8]. Piecewise continuously differentiable functions with jump discontinuities suffer from Gibbs phenomenon and do not satisfy the decay assumptions (3.9). For example, \(c_{k}= (k+1)^{-1}\) leads to a Hankel operator which is bounded but not compact, see [35]. On the other hand, it has been shown in [4] that the singular values of the finite Hilbert matrix \({\mathbf H}_{n}= ((k+j+1)^{-1})_{j,k=0}^{{n-1}}\) decay exponentially with

$$\begin{aligned} \sigma _{k+1}({\mathbf H}_{n}) \le 4 \left[ \exp \left( \frac{\pi ^{2}}{2 \log (8n-4)} \right) \right] ^{-2k} \sigma _{1}({\mathbf H}_{n}). \end{aligned}$$

Our numerical experiments show this behavior of faster convergence, but we do not get rid of the Gibbs phenomenon in this case.

For piecewise continuously differentiable functions f with finite jump discontinuities we propose to apply a splitting method that decomposes the function f into a simple discontinuous step function and a smooth function with an exponentially decaying adaptive Fourier series, see e.g. [16] or [25], Remark 6.2.

4 Computation of Adaptive Fourier Sums

In this section we derive an algorithm to compute the partial adaptive Fourier sums of \(f^{+}\) in \(H^{2}\). For this purpose , we suppose that we know the vector of Fourier coefficients \((c_{k}(f^{+}) )_{k=0}^{L}\) in the classical Fourier expansion for a sufficiently large L.

We assume that the sequence of Fourier coefficients \({\mathbf c}(f) = {\mathbf c}=(c_{k})_{k=0}^{\infty }\) of some \(f^{+} \in H^{2}\) possesses the form or can be very well approximated by

$$\begin{aligned} {c}_{k}= {c}_{k}(f^{+}) = \sum _{j=0}^{M} \breve{a}_{j} \, \breve{z}_{j}^{k}, \qquad k \in {\mathbb N}_{0}, \end{aligned}$$
(4.1)

with possibly large M and with pairwise different zeros \(\breve{z}_{j} \in {\mathbb D}\), and \(\breve{a}_{j} \in {\mathbb C}\).

If \(f^{+}\) is a rational function in \(H^{2}\) of the form \(q({ e }^{-it})/p({ e }^{-it})\) with \( deg \, q \le deg \, p = M\), and if p possesses pairwise different zeros, then the representation (4.1) is exact for all k and can be obtained by Prony’s method using \(L+1\) Fourier coefficients, where \(L+1 \ge 2M+2\), see [25]. If \(f^{+}\) is not rational, we employ an approximation procedure to find \(\breve{a}_{j}\) and \(\breve{z}_{j}\) such that (4.1) is correct for the given \(c_{0}, \ldots , c_{L}\) with high precision. We can proceed as follows. For the given Fourier coefficients \((c_{k}(f^{+}))_{k=0}^{L}\) we determine \(\tau := \Big | \frac{c_{L}(f^{+})}{c_{0}(f^{+})}\Big |^{1/L} < 1\). Let now

$$\begin{aligned} \breve{z}_{j}:= \tau \, \omega _{L+1}^{j}= \tau \, {\mathrm e}^{-2 \pi {\mathrm i} j/(L+1)}, \qquad j=0, \ldots , L, \end{aligned}$$
(4.2)

being equidistantly placed on the circle with radius \(\tau \). Further, let

$$\begin{aligned} \breve{a}_{j} := \frac{1}{L+1} \sum _{k=0}^{L} c_{k}(f^{+})\, \tau ^{-k} \, \omega _{L+1}^{jk}, \end{aligned}$$
(4.3)

which can be simply computed from \((c_{k}(f^{+}) \, \tau ^{-k})_{k=0}^{L}\) by an FFT of length \(L+1\). Then we have

$$\begin{aligned} \sum _{j=0}^{L} \breve{a}_{j} \breve{z}_{j}^{k}= & {} \sum _{j=0}^{L} \left( \frac{1}{L+1} \sum _{\ell =0}^{L} c_{\ell }(f^{+})\, \tau ^{-\ell } \omega _{L+1}^{-\ell j}\right) \, \tau ^{k} \omega _{L+1}^{jk} \\= & {} \frac{1}{L+1} \sum _{\ell =0}^{L} c_{\ell }(f^{+})\, \tau ^{k-\ell } \sum _{j=0}^{L} \omega _{L+1}^{j(k-\ell )} = c_{k}(f^{+}) \end{aligned}$$

for \(k=0, \ldots , L\).

We can also apply a Prony like method as e.g. ESPRIT [31] or the APM method in [25, 26] to obtain a high precision approximation of the given Fourier coefficients \(c_{k}\) in the form (4.1) for some M with \(2M+1 \le L\). In our practical experiments it has been usually sufficient to take e.g. M between 10 and 20 to get approximations for the given Fourier coefficients of the form (4.1) with accuracy \(10^{-8}\) or better.

In this section, we present an algorithm to solve the problem of finding an optimal sequence \(\widetilde{\mathbf c}= \widetilde{\mathbf c}^{(N)}= (\widetilde{c}_{k})_{k=0}^{\infty }\) of the form

$$\begin{aligned} \widetilde{c}_{k}^{(N)} = \sum _{j=0}^{N} {a}_{j}^{(N)} \, ({z}_{j}^{(N)})^{k} \end{aligned}$$
(4.4)

for a pre-defined \(N<M\) such that

$$\begin{aligned} \Vert {\mathbf c} - \widetilde{\mathbf c}^{(N)}\Vert _{\ell ^{2}} \le \Vert {\varvec{\Gamma }}_{{\mathbf c}} - {\varvec{\Gamma }}_{{\widetilde{\mathbf c}}^{(N)}} \Vert _{\ell ^{2} \rightarrow \ell ^{2}} = \sigma _{N+1}({\varvec{\Gamma }}_{\mathbf c}) \end{aligned}$$

holds for a given sequence \({\mathbf c}\) in (4.1), i.e., \(\widetilde{\mathbf c}^{(N)}\) is the optimal sequence for approximation by Theorem 3.1. Our method includes a numerical procedure to compute all nonzero singular values of \({\varvec{\Gamma }}_{{\mathbf c}}\). Knowing these singular values we will be able to give an a priori estimate of the error \(\Vert {\mathbf c} - \widetilde{\mathbf c}^{(N)} \Vert _{\ell ^{2}}\) that can be achieved using the new sequence \(\widetilde{\mathbf c}^{(N)}\) built by the shorter exponential sum in (4.4) and thus of the \(L^{2}\)-error \(\Vert f^{+} - f_{N}^{+} \Vert _{L^{2}}\) achieved by the N-th adaptive Fourier sum \(f_{N}^{+}\).

Once we have computed the sequence \(\widetilde{\mathbf c}^{(N)}\) in (4.4) by determining the appropriate parameters \(a_{j}^{(N)}\), \(z_{j}^{(N)}\), \(j=0, \ldots , N\), we can find according to (3.2) the adaptive N-th Fourier sum

$$\begin{aligned} f_{N}^{+} = \sum _{j=0}^{N} a_{j}^{(N)} P_{j} \end{aligned}$$

where the coefficients \(a_{j}^{(N)}\), \(j=0, \ldots , N\) appear in (4.4) and where the \(P_{j}\) are defined by the \({z}_{j}^{(N)}\) in (4.4). If we are interested in representing the approximation \(f_{N}^{+}\) of \(f^{+}\) in terms of the Takenaka-Malmquist basis, then we need to use \(z_{0}^{(N)}, \ldots , z_{N}^{(N)}\) from (4.4) to define the basis \(\{ B_{\ell } \}_{\ell =0}^{N}\), and the corresponding coefficients \(b_{\ell }^{(N)}\) in the representation \( f_{N}^{+} = \sum _{\ell =0}^{N} b_{\ell }^{(N)} B_{\ell } \) can be obtained by employing the basis transform as given in (2.4).

4.1 New Algorithm to Compute the Approximating Sequence \(\widetilde{\mathbf c}\) in (4.4)

In order to compute an optimal approximation \(\widetilde{\mathbf c}^{(N)}\) of \({\mathbf c}\) we want to apply a result for infinite Hankel matrices with finite rank given in [1]. To formulate this result, we first recall the notation of con-eigenvalues and con-eigenvectors and its correspondence to singular pairs of matrices.

Observe that \({\varvec{\Gamma }}_{\mathbf c}\) is symmetric. Generalizing the idea of unitary diagonalization of Hermitian matrices resp. compact selfadjoint operators, we will apply the concept of con-similarity and con-diagonalization, see e.g. [15] for the finite-dimensional case.

For an infinite Hankel matrix \({\varvec{\Gamma }}_{\mathbf c}\) we call \(\lambda \in \mathbb {C}\) a con-eigenvalue with the corresponding con-eigenvector\( {\mathbf v} \in \ell ^2\) if it satisfies

$$\begin{aligned} {\varvec{\Gamma }}_{\mathbf c} \overline{\mathbf v} = \lambda \, {\mathbf v}. \end{aligned}$$

Observe that for \({\varvec{\Gamma }}_{\mathbf c} \overline{\mathbf v} = \lambda \, {\mathbf v}\) we also have

$$\begin{aligned} {\varvec{\Gamma }}_{\mathbf c} ( \overline{{\mathrm e}^{{\mathrm i} \alpha } {\mathbf v}}) = {\mathrm e}^{-{\mathrm i} \alpha } {\varvec{\Gamma }}_{\mathbf c} \overline{\mathbf v} = ({\mathrm e}^{-{\mathrm i} \alpha } \lambda ) {\mathbf v} = ({\mathrm e}^{-2{\mathrm i} \alpha } \lambda ) ({\mathrm e}^{{\mathrm i} \alpha } {\mathbf v}) \end{aligned}$$

for all \(\alpha \in {\mathbb {R}}\). Thus, for each con-eigenvalue \(\lambda \) of \({\varvec{\Gamma }}_{\mathbf c}\) we can find a corresponding real non-negative con-eigenvalue \(\sigma = |\lambda |\) by this rotation trick. In the following, we will restrict the con-eigenvalues to their unique nonnegative representatives.

The symmetric infinite Hankel matrix \({\varvec{\Gamma }}_{\mathbf c}\) with finite rank is compact and unitarily con-diagonalizable, see [15]. Since \({\varvec{\Gamma }}_{\mathbf c} \overline{\mathbf v} = \lambda \, {\mathbf v}\) implies

$$\begin{aligned} ( {\varvec{\Gamma }}_{\mathbf c}^{*} {\varvec{\Gamma }}_{\mathbf c}) {\mathbf v} = {\varvec{\Gamma }}_{\mathbf c}^{*} \lambda \overline{\mathbf v} = \lambda \overline{{\varvec{\Gamma }}}_{\mathbf c} \overline{\mathbf v}= \lambda \overline{ {\varvec{\Gamma }}_{\mathbf c} {\mathbf v}} = |\lambda |^{2} {\mathbf v}, \end{aligned}$$

we directly observe that the nonnegative con-eigenvalues and con-eigenvectors of \({\varvec{\Gamma }}_{\mathbf c}\) are also singular values and corresponding singular vectors of \({\varvec{\Gamma }}_{\mathbf c}\). Conversely, for symmetric matrices a singular pair \((\sigma , {\mathbf v})\) is also a con-eigenpair of \({\varvec{\Gamma }}_{\mathbf f}\) if the geometric multiplicity of \(\sigma \) is 1.

Theorem 4.1

Let the Hankel matrix \({\varvec{\Gamma }}_{\mathbf c}\) of rank \(M+1\) be generated by the sequence \({\mathbf c}\) of the form (4.1) with \(1> |\breve{z}_{0}| \ge \cdots \ge |\breve{z}_{M}| >0\). Let the \(M+1\) nonzero singular values of \({\varvec{\Gamma }}_{\mathbf c}\) be ordered by size \(\sigma _{0} \ge \sigma _{1} \ldots \ge \sigma _{M} >0\). Then, for each \(N \in \{0, \ldots , M-1 \}\) satisfying \(\sigma _{N+1} \ne \sigma _{k}\) for \(N+1 \ne k\) the Laurent polynomial of the con-eigenvector \({\mathbf v}^{(N+1)} = (v^{(N+1)}_{l})_{l=0}^{\infty }\) corresponding to \(\sigma _{N+1}\),

$$\begin{aligned} P_{{\mathbf v}^{(N+1)}}(z) := \sum _{l=0}^\infty v^{(N+1)}_{l} \, z^l, \end{aligned}$$

has exactly \({N+1}\) zeros \({z}^{(N)}_0,\ldots ,{z}^{(N)}_N\) in \(\mathbb {D}\), repeated according to their multiplicity. Furthermore, if \({z}^{(N)}_0,\ldots ,{z}^{(N)}_N\) are pairwise different, then there exist coefficients \({a}_0^{(N)}, \ldots , {a}_{N}^{(N)} \in \mathbb {C}\) such that for

$$\begin{aligned} \widetilde{{\mathbf c}}^{(N)} = \left( \widetilde{c}_l^{(N)} \right) _{l=0}^{\infty } = \left( \sum _{j=0}^{{N}} {a}_j^{(N)} (z^{(N)}_j)^l\right) _{l=0}^\infty \end{aligned}$$
(4.5)

we have

$$\begin{aligned} \Vert {\mathbf c} - {\widetilde{\mathbf c}^{(N)}} \Vert _{\ell ^{2}} \le \sigma _{{N+1}}. \end{aligned}$$

For a proof of this theorem we refer to [1] and to [3].

To compute the parameters \(a_{j}^{(N)}\) and \( z_{j}^{(N)}\), \(j=0, \ldots , N\) of \(\widetilde{\mathbf c}^{(N)}\) in (4.5) explicitly, we need to perform the following steps.

Step (i):

We have to find a numerical procedure to compute the singular pairs \((\sigma _{{n}}, {\mathbf v}^{(n)})\) of the infinite Hankel matrix \({\varvec{\Gamma }}_{\mathbf c}\) for \(n=0, \ldots , M\).

Step (ii):

We have to find all zeros \(z_{j}^{(N)}\) of the expansion \(P_{{\mathbf v}^{(N+1)}}(z)\) lying inside \(\mathbb D\).

Step (iii):

In a final step we have to compute the optimal coefficients \({a}_j^{(N)}\) in (4.5).

We describe each of these steps in detail.

Step (i): To compute the singular pairs of \({\varvec{\Gamma }}_{\mathbf c}\), we investigate the special structure of the con-eigenvectors of \({\varvec{\Gamma }}_{\mathbf c}\) corresponding to the non-zero con-eigenvalues (resp. singular values). We can show the following result that provides us with an algorithm to compute all non-zero singular values of \({\varvec{\Gamma }}_{\mathbf c}\) and the corresponding con-eigenvectors exactly by solving a con-eigenvalue problem of size \(M+1\).

Theorem 4.2

Let \({ {\mathbf c}}\) be of the form (4.1). Then the con-eigenvector \({\mathbf v}^{(l)} = (v_{k}^{(l)})_{k=0}^{\infty }\) of \({\varvec{\Gamma }}_{\mathbf c}\) corresponding to a single nonzero singular value \(\sigma _{l}\) of \({\varvec{\Gamma }}_{\mathbf c}\), \(l \in \{0, 1, \ldots , M\}\) is given by

$$\begin{aligned} \overline{v}_{k}^{(l)} = \frac{1}{\sigma _{l}} \sum _{j=0}^{M} \breve{a}_{j} b_{j}^{(l)} \breve{z}_{j}^{k}, \qquad k\in {\mathbb N}_{0}, \end{aligned}$$
(4.6)

where the vector \({\mathbf b}^{(l)} =(b_{0}^{(l)}, \ldots , b_{M}^{(l)})^{T}\) is the con-eigenvector of the finite con-eigenvalue problem

$$\begin{aligned} {\mathbf A}_{M+1} {\mathbf Z}_{M+1} {\mathbf b} = \sigma _{l} \overline{\mathbf b} \end{aligned}$$
(4.7)

with

$$\begin{aligned} {\mathbf A}_{M+1} := \left( \begin{array}{cccc} \breve{a}_0 &{} &{} &{} 0 \\ &{} \breve{a}_1 &{} &{} \\ &{} &{} \ddots &{} \\ 0 &{} &{} &{} \breve{a}_M \end{array}\right) , \quad {\mathbf Z}_{M+1}:=\left( \begin{array}{cccc} \frac{1}{1-|\breve{z}_0|^2} &{} \frac{1}{1-\breve{z}_0\overline{\breve{z}}_1} &{} \cdots &{} \frac{1}{1-\breve{z}_0\overline{\breve{z}}_M} \\ \frac{1}{1- \breve{z}_1 \overline{\breve{z}}_0 } &{} \frac{1}{1-|\breve{z}_1|^2} &{} \cdots &{} \frac{1}{1-\breve{z}_1\overline{\breve{z}}_M} \\ \vdots &{} \vdots &{} \ddots &{} \vdots \\ \frac{1}{1- \breve{z}_M \overline{\breve{z}}_0 } &{} \frac{1}{1-\breve{z}_M \overline{\breve{z}}_1 } &{} \cdots &{} \frac{1}{1-|\breve{z}_M|^2} \\ \end{array}\right) . \end{aligned}$$

Proof

Let \((\sigma _{l}, {\mathbf v}^{(l)})\) with \(\sigma _{l} \ne 0\) be a con-eigenpair of \({\varvec{\Gamma }}_{\mathbf c}\), i.e., \({\varvec{\Gamma }}_{\mathbf c} \overline{\mathbf v}^{(l)} = \sigma \, {\mathbf v}^{(l)}\). We fix \(b_{j}^{(l)} := \sum _{r=0}^{\infty } v_{r}^{(l)} \breve{z}_{j}^{r} = P_{{\mathbf v}^{(l)}}(\breve{z}_{j})\) for \(j=0, \ldots , M\). Then it follows by (4.1) that

$$\begin{aligned} \sigma _{l} \overline{v}_{k}^{(l)}= & {} ({\varvec{\Gamma }}_{\mathbf c} {\mathbf v}^{(l)})_{k} = \sum _{r=0}^{\infty } c_{k+r} {v}^{(l)}_{r} = \sum _{r=0}^{\infty } \sum _{j=0}^M \breve{a}_j\, \breve{z}_{j}^{k+r} {v}^{(l)}_{r} \\= & {} \sum _{j=0}^{M} \breve{a}_{j} ( \sum _{r=0}^{\infty } v_{r}^{(l)} \breve{z}_{j}^{r}) \breve{z}_{j}^{k} = \sum _{j=0}^{M} \breve{a}_{j} \, b_{j}^{(l)} \, \breve{z}_{j}^{k} \end{aligned}$$

for all \(k \in {\mathbb {N}}_{0}\), and hence (4.6) is true. Relation (4.7) is now a consequence of (4.6) observing that

$$\begin{aligned} \sigma _{l} \, \overline{b}_{k}^{(l)} = \sigma _l\sum _{r=0}^{\infty } \overline{v}_r^{(l)} \, (\overline{\breve{z}}_{k})^{r} = \sum _{r=0}^{\infty } \Big (\sum _{j=0}^{M} \breve{a}_{j} \, b_{j}^{(l)} \, \breve{z}_{j}^{r} \Big ) \, (\overline{\breve{z}}_{k})^{r} = \sum _{j=0}^{M} \frac{\breve{a}_{j}\, b_{j}^{(l)}}{1- \breve{z}_{j}\, \overline{\breve{z}}_{k}} \end{aligned}$$

for \(k=1, \ldots , M\). \(\square \)

Step (ii): In particular, it follows from Theorem 4.2 for all \(N=0, \ldots , M\) that the Laurent polynomial

$$\begin{aligned} P_{{\mathbf v}^{(N+1)}}(z) := \sum _{k=0}^{\infty } v_{k}^{(N+1)} z^{k} = \frac{1}{\sigma _{N+1}} \sum _{k=0}^{\infty } \Big (\sum _{j=0}^{M} \overline{\breve{a}}_{j} \, \overline{b}_{j}^{(N+1)}\, \overline{\breve{z}}_{j}^{k} \big ) z^{k} = \frac{1}{\sigma _{N+1}} \sum _{j=0}^{M} \frac{\overline{\breve{a}}_{j} \, \overline{b}_{j}^{(N+1)}}{1- \overline{\breve{z}}_{j}z} \end{aligned}$$
(4.8)

is a rational function with numerator being a polynomial of degree at most M. Thus, in order to find the zeros of \(P_{{\mathbf v}^{(N+1)}}(z)\) we only need to compute the M zeros of the numerator in this rational representation. By Theorem 4.1 we will find exactly \(N+1\) zeros \(z_{0}^{(N)}, \ldots , z_{N}^{(N)}\) in \({\mathbb D}\).

Step (iii): Once we have computed the zeros \(z_{j}^{(N)}\), \(j=0, \ldots , N\), we can find the optimal coefficients \(a_{j}^{(N)}\) by solving a least squares problem.

We combine our observations with Theorem 4.1 and obtain the following algorithm to compute all parameters of the desired approximation \(\widetilde{\mathbf c}^{(N)}\).

Algorithm 4.3

figure a

Remarks 4.4

  1. 1.

    Note that a related idea of dimension reduction has been used by Beylkin and Monzón in [7]. But in contrast to the above approach, they considered the rank reduction of a finite Hankel matrix. We also refer to [24], where a similar algorithm has been prosed for reduction of exponential sums.

  2. 2.

    Since \({\mathbf A}_{M+1} {\mathbf Z}_{M+1}\) is con-diagonalizable by Theorem 4.2, it follows that

    $$\begin{aligned} {\mathbf A}_{M+1} \, {\mathbf Z}_{M+1} \, {\mathbf B} = \overline{\mathbf B} \, {\varvec{\Sigma }}, \quad and \quad \overline{{\mathbf A}_{M+1} \, {\mathbf Z}_{M+1}} \, \overline{\mathbf B} = {\mathbf B} \, {\varvec{\Sigma }} \end{aligned}$$

    with \({\mathbf B} = ({\mathbf b}^{(0)} \ldots {\mathbf b}^{(M)})\) containing the con-eigenvectors of \({\mathbf A}_{M+1} {\mathbf Z}_{M+1}\) and with \({\varvec{\Sigma }} = diag \, (\sigma _{0}, \ldots , \sigma _{M})\). Therefore

    $$\begin{aligned} \overline{{\mathbf A}_{M+1}{\mathbf Z}_{M+1}}{\mathbf A}_{M+1}{\mathbf Z}_{M+1} {\mathbf B} = \overline{{\mathbf A}_{M+1}{\mathbf Z}_{M+1}} \, \overline{\mathbf B} \, \overline{\mathbf B}^{-1} {\mathbf A}_{M+1}{\mathbf Z}_{M+1} {\mathbf B} = {\mathbf B} {\varvec{\Sigma }}^{2}, \end{aligned}$$

    i.e., \(\overline{{\mathbf A}_{M+1}{\mathbf Z}_{M+1}}{\mathbf A}_{M+1}{\mathbf Z}_{M+1}\) has only real nonnegative eigenvalues \(\lambda _{j} = \sigma _{j}^{2}\). Conversely, if \((\lambda _{j}, {\mathbf w}^{(j)})\) is an eigenpair of \(\overline{{\mathbf A}_{M+1}{\mathbf Z}_{M+1}}{\mathbf A}_{M+1}{\mathbf Z}_{M+1}\), then \({\mathbf b}^{(j)}:= {\mathbf A}_{M+1} {\mathbf Z}_{M+1} {\mathbf w}^{(j)} + \sigma _{j} \overline{\mathbf w}^{(j)}\) is a con-eigenvector of \({\mathbf A}_{M+1} {\mathbf Z}_{M+1}\) to the con-eigenvalue \(\sigma _{j} = \sqrt{\lambda _{j}}\), since

    $$\begin{aligned} {\mathbf A}_{M+1} {\mathbf Z}_{M+1} \overline{\mathbf b}^{(j)}= & {} {\mathbf A}_{M+1} {\mathbf Z}_{M+1} (\overline{\mathbf A}_{M+1} \overline{\mathbf Z}_{M+1} \overline{\mathbf w}^{(j)} + \sigma _{j} {\mathbf w}^{(j)}) \\= & {} \overline{ \overline{{\mathbf A}_{M+1}{\mathbf Z}_{M+1}}{\mathbf A}_{M+1}{\mathbf Z}_{M+1} {\mathbf w}^{(j)}} + \sigma _{j} {\mathbf A}_{M+1} {\mathbf Z}_{M+1} {\mathbf w}^{(j)} \\= & {} \sigma _{j}^{2} \overline{\mathbf w}^{(j)} + \sigma _{j} {\mathbf A}_{M+1} {\mathbf Z}_{M+1} {\mathbf w}^{(j)} = \sigma _{j} {\mathbf b}^{(j)}. \end{aligned}$$

    Thus, to solve the con-eigenvalue problem in step 2 of Algorithm 4.3, we can employ a usual eigenvalue-decomposition of \(\overline{{\mathbf A}_{M+1}{\mathbf Z}_{M+1}}{\mathbf A}_{M+1}{\mathbf Z}_{M+1}\).

  3. 3.

    Usually, the singular values of \({\mathbf A}_{M+1} {\mathbf Z}_{M+1}\) decay very fast. There are several possibilities to improve the numerical stability of the necessary SVD for this matrix product. Indeed, \({\mathbf A}_{M+1} {\mathbf Z}_{M+1}\) can be understood as a Cauchy matrix since

    $$\begin{aligned} ({\mathbf A}_{M+1} {\mathbf Z}_{M+1})_{jk} = \frac{\breve{a}_{j}/\breve{z}_{j}}{1/\breve{z}_{j} - \overline{\breve{z}}_{k}}, \qquad j,k=0, \ldots , M. \end{aligned}$$

    For accurate singular value decomposition we refer to the algorithm proposed by Demmel [11] that is based on a rank revealing decomposition with complexity \({\mathcal O}(M^{3})\). Further ideas to overcome instability issues can be found in [13] where the con-eigenvalue problem is explicitly solved. If we start with the approximation using (4.2) and (4.3), the matrix \({\mathbf Z}_{M}\) is circulant and can be simply diagonalized by the Fourier transform.

  4. 4.

    Observing that the components \(c_{k}\) have the form (4.1) and the \(\widetilde{c}_{k}\) have the form (4.4), the \(\ell ^{2}\)-minimization problem for infinite sequences in step 3 of Algorithm 4.3 can be reformulated as a finite-dimensional least squares problem,

    $$\begin{aligned} \min _{\widetilde{a}_{0}, \ldots , \widetilde{a}_{N}} \Vert {\mathbf c}-\widetilde{\mathbf c} \Vert _{\ell ^{2}}^{2} =&\min _{\widetilde{a}_{0}, \ldots , \widetilde{a}_{N}} \Big ( -2 Re \, \sum _{k=0}^{\infty } \widetilde{c}_{k} \overline{c}_{k} + \sum _{k=0}^{\infty } |\widetilde{c}_{k}|^{2} \Big ) \\ \qquad =&\min _{\widetilde{a}_{0}, \ldots , \widetilde{a}_{N}} \Big ( -2 Re \, \sum _{j=0}^{N} \sum _{i=0}^{M} \widetilde{a}_{j} \overline{\breve{a}}_{i} \sum _{k=0}^{\infty } (z_{j}^{(N)} \overline{\breve{z}}_{i})^{k} + \sum _{j=0}^{N} \sum _{i=0}^{N} \widetilde{a}_{j} \overline{\widetilde{a}}_{i} \sum _{k=0}^{\infty } (z_{j}^{(N)} \overline{z}_{i}^{(N)})^{k} \Big ) \\ \qquad =&\min _{\widetilde{a}_{0}, \ldots , \widetilde{a}_{N}} \Big ( -2 Re \, \sum _{j=0}^{N} \sum _{i=0}^{M} \frac{ \widetilde{a}_{j} \overline{\breve{a}}_{i} }{ 1- z_{j}^{(N)} \overline{\breve{z}}_{i}} + \sum _{j=0}^{N} \sum _{i=0}^{N} \frac{\widetilde{a}_{j} \overline{\widetilde{a}}_{i} }{1- z_{j}^{(N)} \overline{z}_{i}^{(N)}} \Big ), \end{aligned}$$

    where the values \(\overline{\breve{z}}_{i}, \, z_{j}^{(N)}\) and \(\overline{\breve{a}}_{i}\) are known. In practice, if only \(L+1\) sequence values \(c_{k}\), \(k=0, \ldots , L\) are given, then the minimization problem may be replaced by

    $$\begin{aligned} \min _{\widetilde{a}_{0}, \ldots , \widetilde{a}_{N}} \sum _{k=0}^{L} |c_{k}-\widetilde{c}_{k} |^{2} = \min _{\widetilde{a}_{0}, \ldots , \widetilde{a}_{K}} \sum _{k=0}^{L} |c_{k} - \sum _{j=0}^{N} \widetilde{a}_{j} ({z}_{j}^{(N)})^{k}|^{2}. \end{aligned}$$
  5. 5.

    The numerical complexity of Algorithm 4.3 is governed by the first step, where we need to solve a con-eigenvalue problem for matrices of size \((M+1) \times (M+1)\) with computational costs of \({ \mathcal O}(M^{3})\).

5 Greedy Approach for Adaptive Fourier Sums

We want to compare Algorithm 4.3 proposed in the last section with a greedy approach. This method is very simple to implement but does not provide similarly strong decay of the obtained adaptive Fourier sum, as we will show in the numerical experiments in Sect. 6. Again, we assume that we know a vector \((c_{k}(f))_{k=0}^{L}\) of Fourier coefficients of f with sufficiently large L.

The idea is now to approximate the vector \({\mathbf c}^{(0)} := (c_{k}(f))_{k=0}^{L}\) by a sequence of the form \((a_{0} z_{0}^{k})_{k=0}^{L}\) where we try to choose \(a_{0}\) and \(z_{0}\) in an optimal way. Then we consider the residual

$$\begin{aligned} {\mathbf c}^{(1)} := {\mathbf c}^{(0)} - (a_{0} z_{0}^{k})_{k=0}^{L} \end{aligned}$$

and repeat this process. The iteration stops once we have achieved

$$\begin{aligned} \Vert {\mathbf c}^{(N)} \Vert _{2}^{2} \le \epsilon \end{aligned}$$

for some \(N\le L\) and predefined tolerance \(\epsilon \).

At each iteration step we try to approximate the given data \({\mathbf c}^{(j)}\) by a vector that satisfies a difference equation of order 1. This idea corresponds to Prony’s method for just one exponential term. We consider a “characteristic” polynomial

$$\begin{aligned} P^{(j)}(z) := (z-z_{j}) = p_{1}^{(j)} z + p_{0}^{(j)}, \end{aligned}$$

i.e., \(p_{0}^{(j)}= -z_{j}\) and \(p_{1}^{(j)} = 1\). Now, we try to find \(p_{0}^{(j)}\) such that

$$\begin{aligned} c_{k}^{(j)} p_{0}^{(j)} + c_{k+1}^{(j)} p_{1}^{(j)} = 0 \end{aligned}$$

is satisfied for all \(k=0, \ldots , L-1\) as well as possible. To find \(p_{0}^{(j)}\) we form the Hankel matrix \({\mathbf H}_{{\mathbf c}^{(j)}}\)

$$\begin{aligned} {\mathbf H}_{{\mathbf c}^{(j)}} = \left( \begin{array}{cc} c_{0}^{(j)} &{} c_{1}^{(j)} \\ c_{1}^{(j)} &{} c_{2}^{(j)} \\ \vdots &{} \vdots \\ c_{L-1}^{(j)} &{} c_{L}^{(j)} \end{array} \right) . \end{aligned}$$
(5.1)

Then we have to compute \((p_{0}^{(j)}, p_{1}^{(j)})^{T}\) as the singular vector of \({\mathbf H}_{{\mathbf c}^{(j)}}\) to the smallest singular value with the normalization \(p_{1}^{(j)} = 1\). Observe that \(({\mathbf H}_{{\mathbf c}^{(j)}})^{*} {\mathbf H}_{{\mathbf c}^{(j)}}\) is only of size \(2 \times 2\). Having fixed \(z_{j} = -p_{0}^{(j)}\) in this way, we compute the constant \(a_{j}\) by solving the minimization problem

$$\begin{aligned} \min _{a_{j}} \sum _{k=0}^{L} | c_{k}^{(j)} - a_{j} z_{j}^{k}|^{2} \end{aligned}$$

with the result

$$\begin{aligned} a_{j} = \frac{({\mathbf c}^{(j)})^{T} {\mathbf c}^{(j)}}{({\mathbf c}^{(j)})^{T} (z_{j}^{k})_{k=0}^{L}}. \end{aligned}$$
(5.2)

Finally, we compute the residual \({\mathbf c}^{(j+1)} := {\mathbf c}^{(j)} - (a_{j} z_{j}^{k})_{k=0}^{L}\). The complete algorithm is summarized as follows.

Algorithm 5.1

figure b

Alternatively, the update of the coefficients \(a_{j}\) in iteration step 2b) can be done in a global way to obtain the best approximation that can be achieved with an adaptive basis with the zeros \(z_{0}, \ldots , z_{j}\) found so far. In this case, we replace the step 2b) by solving the least squares problem

$$\begin{aligned} \min _{{a}_{0}, \ldots , {a}_{j}} \sum _{k=0}^{L} |c_{k} - \sum _{\ell =0}^{j} {a}_{\ell } \, {z}_{\ell }^{k}|^{2}. \end{aligned}$$

The numerical complexity of Algorithm 5.1 is only \(\mathcal{O}(L)\) per iteration step if \(a_{j}\) is computed according to (5.2). The alternative way to improve the coefficients \(a_{0}, \ldots , a_{j}\) at each step increases the computational cost essentially to \(\mathcal{O}((j+1) L^{2})\). In our numerical experiments, we will compare this simple approach with the results of Algorithm 4.3 in Sect. 4.

6 Numerical Examples

In this section we present three numerical examples demonstrating the performance of our algorithms. In these examples we set a priori \(z_{0}^{(N)} = 0\) and take the Fourier coefficient \(c_{0}(f)\) independently. Then we approximate the Fourier coefficients \(c_{k}(f)\) as described in the previous subsections, but starting with \(k=1\).

Example 1

We approximate the rational function \(f(t) = \sum \limits _{\ell =1}^{10} \frac{\breve{a}_{\ell }}{(1- \breve{z}_{\ell } { e }^{it})}\) with the classical Fourier expansion \(f(t) = \sum _{k=0}^{\infty } c_{k}(f) { e }^{ikt}\) where

$$\begin{aligned} c_{k}(f) = \sum _{\ell =1}^{10} \breve{a}_\ell \, \breve{z}_{\ell }^{k}\,, \quad k \in {\mathbb N_0}. \end{aligned}$$
(6.1)

In this example, we have \(\breve{a}_{0}= 0\), \(\breve{z}_{0} =0\), and the further parameters \(\breve{z}_j\), \(\breve{a}_j,~j=1,\ldots ,10\), in the representation (6.1) have been obtained by applying a generator of random numbers in \(\mathbb {D}\) and are given as follows:

$$\begin{aligned} \begin{pmatrix} \breve{z}_1 \\ \breve{z}_2 \\ \breve{z}_3 \\ \breve{z}_4 \\ \breve{z}_5 \\ \breve{z}_6 \\ \breve{z}_7 \\ \breve{z}_8 \\ \breve{z}_9 \\ \breve{z}_{10} \end{pmatrix} = \left( \begin{array}{r} - 0.5609 + 0.1737i\\ 0.0734 - 0.1485i\\ 0.4582 - 0.3709i\\ 0.2030 - 0.0861i\\ - 0.3715 - 0.0216i\\ - 0.1573 - 0.4553i\\ - 0.0471 + 0.1074i\\ 0.5780 - 0.3286i\\ - 0.4123 - 0.1385i\\ 0.4266 + 0.0996i\\ \end{array}\right) , \qquad \begin{pmatrix} \breve{a}_1 \\ \breve{a}_2 \\ \breve{a}_3 \\ \breve{a}_4 \\ \breve{a}_5 \\ \breve{a}_6 \\ \breve{a}_7 \\ \breve{a}_8 \\ \breve{a}_9 \\ \breve{a}_{10} \end{pmatrix} = \left( \begin{array}{r} - 0.2978 + 0.4876i\\ - 0.2515 + 0.4556i\\ 0.1405 + 0.3813i\\ - 0.2817 - 0.2871i\\ 0.3893 + 0.1132i\\ 0.5792 - 0.5730i\\ 0.2763 - 0.0897i\\ - 0.1873 - 0.2247i\\ 0.1009 - 0.4062i\\ - 0.4707 - 0.3855i\\ \end{array}\right) . \end{aligned}$$
Fig. 1
figure 1

The original nodes \(z_1,\ldots ,z_{10}\) (stars) and the new nodes \(z_1^{(N)},\ldots ,z_{N}^{(N)}\) obtained by Algorithm 4.3 (circles)

We denote by \(S_{N}(f)\) the N-th classical Fourier sum

$$\begin{aligned} S_N(f)(t) = \sum _{k=0}^N c_k(f) e ^{ikt}, \end{aligned}$$

and by

$$\begin{aligned} f_{N}:= c_{0}(f) + \sum _{j=1}^{N} a_{j}^{(N)} \, P_{j} \end{aligned}$$

the N-th adaptive Fourier sum. Here we have taken \(z_{0}^{(N)} = 0\), \(a_{0}^{(N)} = c_{0}(f)\). The parameters \(a_{j}^{(N)}\) and the zeros \(z_{j}^{(N)}\), \(j=1, \ldots , N\), determining the adaptive Fourier basis \(\{ P_{j} \}_{j=1}^{N}\) have been computed by Algorithm 4.3 for \(N=1, \ldots , 9\). The obtained nodes \(z_j^{(N)}\) are displayed for \(N=1,~N=3\) and \(N=5\) in Fig. 1. Further, we denote the sequence of adaptive Fourier sums obtained by the greedy Algorithm 5.1 by

$$\begin{aligned} f_{N}^{(G)} := c_{0}(f) + \sum _{k=1}^{N} a_{k}^{(G)}\, P_{k}, \end{aligned}$$

where again \(z_{0}=0\), \(a_{0}^{(G)} = c_{0}(f)\), and the consecutively obtained zeros \(z_{j}\), \(j=1, \ldots , N\) are taken to determine the adaptive Fourier basis \(\{ P_{k} \}_{k=0}^{N}\). In Figs. 2 and 3 we compare the function f with the N-th adaptive Fourier sum \(f_{N}\), the N-th adaptive Fourier sum \(F_{N}^{(G)}\) and the classical Fourier sum \(S_{N}(f)\). In Fig. 3 the corresponding error functions are displayed. Furthermore, in Fig. 4 we compare the errors of the computed adaptive Fourier sums \(\Vert { f} - {f}_{N} \Vert _{L^{2}}\) and \(\Vert { f} - { f}_{N}^{(G)} \Vert _{L^{2}}\) for \(N=1,\ldots ,9\) and the singular values \(\sigma _N\) of the matrix \(\mathbf {A}_{10}\mathbf {Z}_{10}\).

Fig. 2
figure 2

The real and imaginary parts of the original function f (blue solid line), the Fourier approximation \(S_N(f)\) (green dotted line), the greedy adaptive Fourier sum \(f_N^{(G)}\) (magenta dashed line) and adaptive Fourier sum \(f^N\) (red dash-dot line) for Example 1 (Color figure online)

Fig. 3
figure 3

The error \(|\text {Re}(f(t)-S_N(f)(t))|\) (green dotted line), \(|\text {Re} (f(t)-f_{N}^{G}(t))|\) (magenta dashed line) and \(|\text {Re}(f(t)-f_{N}(t))|\) (red solid line) and the corresponding errors for the imaginary part of the functions for \(t\in [-\pi ,\pi ]\) on the x-axis for Example 1 for \(N=3,6,9\) (Color figure online)

Observe that in this example the considered function f(t) is smooth and the classical Fourier coefficients possess already an exponential decay which is governed by the knot \(\breve{z}_{j}\) with largest modulus, i.e. by \(|\breve{z}_{8}| = 0.6649\). We have

$$\begin{aligned} | c_{k}(f) | = | \sum _{\ell =1}^{10} \breve{a}_{\ell } z_{\ell }^{k}| \le C |\breve{z}_{8}|^{k} \end{aligned}$$

with some constant C which does not depend on k. Compared to that, the rational representation and thus the adaptive Fourier series is finite and has only 10 nonzero adaptive Fourier coefficients. For \(N>3\), the adaptive Fourier sum already provides essentially smaller errors, see Fig. 3.

Fig. 4
figure 4

Decay of the error \(\Vert f-f_{N}\Vert _{L_{2}}\) (solid line) and error \(\Vert f-f_{N}^{(G)}\Vert _{L_{2}}\) (dashed line) for Example 1 for \(N=1, \ldots , 9\). The error \(\Vert f-f_{N}\Vert _{L_{2}}\) is of the same order as \(\sigma _{N}\). The small triangles represent the singular values \(\sigma _{N}\) of \({\mathbf A}_{N} {\mathbf Z}_{N}\) for \(N=1, \ldots , 9\)

Example 2

We approximate the real function \(f(t) = \sum _{k=1}^{\infty } c_{k}(f) \sin (kt)\) with \(c_{k}(f) = {1}/{k^2}, ~k \in {\mathbb N}\). First, using the samples \(c_k(f)\) for \(k=1,\ldots ,101\), we apply the APM method in [26] and obtain beside the a priori fixed \(\breve{z}_{0}=0\) and \(\breve{a}_{0}=0\) for \(M=11\) the zeros \(\breve{z}_j\) and coefficients \(\breve{a}_j,~j=1,\ldots ,11\),

$$\begin{aligned} \begin{pmatrix} \breve{z}_1 \\ \breve{z}_2 \\ \breve{z}_3 \\ \breve{z}_4 \\ \breve{z}_5 \\ \breve{z}_6 \\ \breve{z}_7 \\ \breve{z}_8 \\ \breve{z}_9 \\ \breve{z}_{10}\\ \breve{z}_{11} \end{pmatrix} = \left( \begin{array}{r} 0.9890\\ 0.9621\\ 0.9166\\ 0.8493\\ 0.7577\\ 0.6415\\ 0.5042\\ 0.3543\\ 0.2078\\ 0.0870\\ 0.0148\\ \end{array}\right) , \qquad \begin{pmatrix} \breve{a}_1 \\ \breve{a}_2 \\ \breve{a}_3 \\ \breve{a}_4 \\ \breve{a}_5 \\ \breve{a}_6 \\ \breve{a}_7 \\ \breve{a}_8 \\ \breve{a}_9 \\ \breve{a}_{10} \\ \breve{a}_{11} \end{pmatrix} = \left( \begin{array}{r} 0.0002\\ 0.0014\\ 0.0049\\ 0.0129\\ 0.0289\\ 0.0567\\ 0.0997\\ 0.1571\\ 0.2163\\ 0.2438\\ 0.1780\end{array}\right) , \end{aligned}$$
(6.2)

such that

$$\begin{aligned} \frac{1}{k^2} = c_k(f) \approx \widetilde{c}_k(f) = \sum _{j=1}^{11} \breve{a}_j \, \breve{z}_j^k. \end{aligned}$$
(6.3)

We compute the zeros \(z_{j}^{(N)}\) and the coefficients \(a_{j}^{(N)}\), \(j=1, \ldots , N\) of the shorter sums of the form (4.4) by applying Algorithm 4.3, again with \(z_{0}^{(N)}=0\), \(a_{0}^{(N)} = c_{0}(f) =0\). The computed parameters are illustrated in Fig. 5 (left). In this special example the obtained zeros \(z_{j}^{(N)}\) are real numbers in (0, 1). The position of the zeros \(z_{j}^{(N)}\), \(j=1, \ldots , N\) is given for each \(N=1,2, \ldots , 10\) by the position of the circles with respect to the vertical axis, and the diameter of the point balls represents the size of the corresponding coefficients \(a_{j}^{(N)}\). If the coefficients are smaller than 0.04 then we have rounded it up to 0.04 such that the corresponding knots can still be recognized. For \(N=11\) the illustration in Fig. 5 (left) shows the 11 zeros \(\breve{z}_{j}\) and the corresponding coefficients \(\breve{a}_{j}\), \(j=1, \ldots , 11\), given in (6.2). The decays of the errors \(\Vert f - f_{N} \Vert _{L_{2}}\) and \(\Vert f - f_{N}^{(G)} \Vert _{L_{2}}\) for the Fourier coefficients are presented in Fig. 5 (right).

Fig. 5
figure 5

Left: Illustration of the zeros \(z_{j}^{(N)}\) and the corresponding coefficients \(a_{j}^{(N)}\) for \(N=1, \ldots , 10\) for Example 2. The size of the zeros can be seen from their vertical position and the size of the corresponding coefficients from the thickness of the circles. Right: Decay of the error \(\Vert f-f_{N}\Vert _{L_{2}}\) (solid line) and error \(\Vert f-f_{N}^{(G)}\Vert _{L_{2}}\) (dashed line) for Example 2 for \(N=1, \ldots , 10\). The error \(\Vert f-f_{N}\Vert _{L_{2}}\) is of the same order as \(\sigma _{N}\)

The original function f together with the corresponding Fourier sums \(f_{N}\), \(f_{N}^{(G)}\) and \(S_N(f)\) are displayed in Fig. 6 for \(N=1,3\) and 5. The errors on the interval \([0,2\pi ]\) are displayed in Fig. 7. The singular values \(\sigma _{N+1}\) of the matrix \(\mathbf {A}_{11}\mathbf {Z}_{11}\) almost exactly coincide with the obtained errors \(\Vert f - f_{N} \Vert _{L_{2}}\) in Fig. 5 (right).

Fig. 6
figure 6

The original function f (blue solid line), the Fourier approximation \(S_N(f)\) (green dotted line), the greedy adaptive Fourier sum \(f_{N}^{(G)}\) (magenta dashed line) and the adaptive Fourier sum \(f_{N}\) (red dash-dot line) for Example 2 (Color figure online)

Fig. 7
figure 7

The error \(|f(t)-S_N(f)(t)|\) (green dotted line), \(|f(t)-f_{N}^{(G)}(t)|\) (magenta dashed line) and \(|f(t)-f_{N}(t)|\) (red solid line) for \(t\in [-\pi ,\pi ]\) on the x-axis for Example 2 for \(N=6\) and \(N=9\) (Color figure online)

We indeed obtain in this example the theoretically predicted exponential error for the adaptive Fourier sum, while the classical Fourier coefficients only possess a quadratic decay.

Example 3

Finally we consider the adaptive Fourier expansion for the piecewise smooth real function \(f(t) = \sum _{k=1}^{\infty } c_{k}(f) \sin (kt)\) with \(c_{k}(f) = {1}/{k}, ~k \in {\mathbb N}\). This time, the conditions of Theorem 3.5 are not longer satisfied. We start with \(L=99\) classical Fourier coefficients and apply Algorithms 4.3 and 5.1. As we can see in Fig. 8 (left), also in this case pointwise convergence of the adaptive Fourier sum is faster than for the classical Fourier sum, while we get not rid of the Gibbs phenomenon. In Fig. 8 (right), we illustrate again the error of the adaptive Fourier sum compared to the greedy adaptive Fourier sum and to the singular values of \({\mathbf A}_{N} {\mathbf Z}_{N}\) for \(N=1, \ldots , 9\). For a similar example, where the function 1 / x is approximated by short exponential sums we refer to [24].

Fig. 8
figure 8

Left: The original function f (blue solid line), the Fourier approximation \(S_N(f)\) (green dotted line), and the adaptive Fourier sum \(f_{N}\) (red dash-dot line) for \(N=3\) and \(N=9\). Right: Decay of the error \(\Vert f-f_{N}\Vert _{L_{2}}\) (solid line) and error \(\Vert f-f_{N}^{(G)}\Vert _{L_{2}}\) (dashed line) for Example 3 for \(N=1, \ldots , 9\). The error \(\Vert f-f_{N}\Vert _{L_{2}}\) is of the same order as the singular values \(\sigma _{N}\) of \({\mathbf A}_{N} {\mathbf Z}_{N}\) (Color figure online)

7 Conclusion

As we have shown in this paper, an adaptive Fourier sum using the Takenaka-Malmquist basis can converge essentially faster than the classical Fourier sum. For this purpose, one needs to choose the zeros determining the basis functions adaptively. The optimal zeros change for different N, i.e., the zeros \(z_{j}^{(N)}\) determining the optimal adaptive Fourier sum \(f_{N}^{+}\) are usually all different from the zeros \(z_{j}^{(N+1)}\) determining an optimal \(f_{N+1}^{+}\). This is also the reason, why greedy algorithms that choose zeros separately one by one (and stay with the zeros that have been fixed in earlier steps) cannot compete with our approach that chooses all N zeros at once.

Algorithm 4.3 to construct (almost) optimal zero vectors however includes the challenge to compute the singular value decomposition of a matrix whose singular values are exponentially decaying. If a suitable interpolation is employed in a preprocessing step, then this matrix is a product of a diagonal matrix \({\mathbf A}_{N}\) and a circulant matrix \({\mathbf Z}_{N}\) such that the eigenvalues of each of these matrix factors can be simply determined. But we are not aware of an efficient procedure to obtain the singular values and singular vectors of the matrix product \({\mathbf A}_{N} \, {\mathbf Z}_{N}\) in this case.

Another open problem relies to the problem, how to derive an efficient algorithm to compute an (almost) adaptive Fourier sum from the function f (or function samples) instead of the classical Fourier coefficients.