1 Introduction

Error estimates for Ritz projections play an important role in the theoretical analysis of the Ritz-Galerkin approximation of differential problems; see, e.g., [6]. In this paper we present an abstract framework for constructing a family of Ritz-type projectors with boundary interpolation properties in finite dimensional subspaces of the usual Sobolev space

$$\begin{aligned} H^r(a,b):=\{u\in L^2(a,b) : \partial ^\alpha u \in L^2(a,b),\, \alpha =1,\ldots ,r\}, \end{aligned}$$
(1)

and we provide a priori error estimates for them in \(L^2\) and standard Sobolev (semi-)norms.

Let \(\mathcal{P}_p\) be the space of polynomials of degree less than or equal to p. The framework requires that the considered finite dimensional subspace contains the polynomial space \(\mathcal{P}_{2q-1}\) to ensure interpolation of the function and its derivatives up to order \(q-1\le r-1\) at the two ends of the interval [ab]. These Hermite interpolation properties at the boundary enhance and complement the results recently obtained for the classical Ritz projectors in [17]. It turns out that the two kinds of projectors are deeply related. For a fixed q, the difference between the proposed and the corresponding classical Ritz projection belongs to \(\mathcal{P}_{q-1}\); actually, it equals the \(L^2\)-projection onto \(\mathcal{P}_{q-1}\) of the error of the new Ritz-type projection (see Proposition 2). We also provide bounds in Sobolev semi-norms for this difference.

The abstract construction and the related error estimates are elaborated and discussed for projectors onto spline spaces of arbitrary smoothness defined on arbitrary grids. In this case, explicit constants can be deduced for the error bounds. These constants agree with those obtained in [17] for the classical Ritz projectors, and so with the numerical evidence found in the literature that smoother spline spaces exhibit a better approximation behavior per degree of freedom, even for low smoothness of the functions to be approximated.

Projectors with Hermite interpolation properties at the boundary are of particular interest in practice, because they directly allow for building globally smooth approximants by simply gluing locally constructed ones. When locally working with polynomials, the most well known of such projectors is probably cubic Hermite interpolation as it results in a local construction of \(C^1\) cubic spline interpolants. This can be extended to higher smoothness, say \(q-1\), by locally considering polynomials of degree at least \(2q-1\); see [4] for an application in the context of isogeometric analysis. An interesting and powerful alternative is to replace polynomials by splines as local approximation spaces.

A common way to obtain projectors with boundary interpolation properties onto spline spaces (of odd degree) is based on (Hermite) interpolation at the knots, by extending the classical construction of \(C^2\) cubic spline interpolants. General error estimates with explicit constants for such projectors have been provided in [18]. Our projectors do not have any restriction on the spline degree and numerical evaluations reveal that our estimates improve upon those in [18], often involving much smaller constants (see Sect. 5.3). Better constants for the same interpolating projectors as in [18] can be found in [1] but they are not explicit in most cases. For maximally smooth spline spaces, the latter constants are explicit but remain larger than those in the present work. Projectors analogous to those in [1, 18] have also been investigated in [2] for periodic boundary conditions and for Lidstone interpolation at the boundary in the case of maximally smooth spline spaces; in those two cases the same explicit error bounds have been obtained as ours (cf. Remark 2).

The key ingredient to get our projectors and the corresponding error estimates is the representation of the considered Sobolev spaces and the approximating spline spaces in terms of integral operators described by suitable kernels, following the approach already exploited in [17] and earlier work (see, e.g., [10, 16]).

The remainder of this paper is organized as follows. In Sect. 2 we briefly summarize from [17] the abstract framework we are dealing with. Sect. 3 describes the general construction of the new family of projectors, analyses their boundary interpolation properties, and provides error estimates for them in \(L^2\) and standard Sobolev (semi-)norms. The relation between the proposed and the classical Ritz projector is discussed in Sect. 4, where bounds for standard Sobolev semi-norms of their difference are also provided. The relevant case of projectors onto spline spaces is elaborated in Sect. 5, and particular attention is devoted to error bounds with explicit constants. Finally, Sect. 6 collects some final remarks and highlights possible areas of applications of the presented results.

2 General error estimates

In this section we describe an abstract framework to obtain error estimates for the \(L^2\)-projection onto spaces defined in terms of integral operators. This section is based on [17, Section 2].

For real-valued functions f and g we denote the norm and inner product on \(L^2(a,b)\) by

$$\begin{aligned} \Vert f\Vert ^2 := (f,f), \quad (f,g) := \int _a^b f(x) g(x) dx, \end{aligned}$$

and we consider the Sobolev spaces (1). Let K be the integral operator defined by integrating from the left,

$$\begin{aligned} (Kf)(x):=\int _a^xf(y)dy. \end{aligned}$$

We denote by \(K^*\) the adjoint, or dual, of the operator K, defined by

$$\begin{aligned} (f,K^*g) = (Kf, g). \end{aligned}$$

One can check that \(K^*\) is integration from the right,

$$\begin{aligned} (K^*f)(x)=\int _x^bf(y)dy; \end{aligned}$$

see, e.g., [10, Section 7].

Given any finite dimensional subspace \(\mathcal {Z}_0\supseteq \mathcal {P}_0\) of \(L^2(a,b)\) and any integral operator K, we let \(\mathcal {Z}_t\) for \(t\ge 1\) be defined by \(\mathcal {Z}_t:=\mathcal {P}_0+K(\mathcal {Z}_{t-1})\). We further assume that they satisfy the equality

$$\begin{aligned} \mathcal {Z}_t:=\mathcal {P}_0+K(\mathcal {Z}_{t-1}) =\mathcal {P}_0+K^*(\mathcal {Z}_{t-1}), \end{aligned}$$
(2)

where the sums do not need to be orthogonal (or even direct). From the definition the following equivalence is easy to check,

$$\begin{aligned} \mathcal {P}_{k}\subseteq \mathcal {Z}_{t} \quad \Leftrightarrow \quad \mathcal {P}_{k-q}\subseteq \mathcal {Z}_{t-q}, \end{aligned}$$

for any \(q\le k,t\). Moreover, let \(Z_t\) be the \(L^2\)-projector onto \(\mathcal {Z}_t\), and define \({\mathfrak {C}}_{t,r}\in \mathbb {R}\) for \(t,r\ge 0\) to be

$$\begin{aligned} {\mathfrak {C}}_{t,r}:=\Vert (I-Z_t)K^r\Vert . \end{aligned}$$

Observe that \({\mathfrak {C}}_{t,0}=1\) and \({\mathfrak {C}}_{0,1}:=\Vert (I-Z_0)K\Vert =\Vert (I-Z_0)K^*\Vert \).

The space \(H^r(a,b)\) can be described as

$$\begin{aligned} H^r(a,b)=\mathcal {P}_{0} + K(H^{r-1}(a,b))&=\mathcal {P}_{0} + K^*(H^{r-1}(a,b)) \nonumber \\&=\mathcal {P}_{r-1}+K^r(H^0(a,b)), \end{aligned}$$
(3)

with \(H^0(a,b)=L^2(a,b)\) and \(\mathcal {P}_{-1}=\{0\}\). Thus, any \(u\in H^r(a,b)\) is of the form \(u=g+K^rf\) for \(g\in \mathcal {P}_{r-1}\) and \(f\in L^2(a,b)\). This leads to the following error estimate for the \(L^2\)-projection (see also [17, Theorem 1]).

Lemma 1

Let \(Z_t\) be the \(L^2\)-projector onto \(\mathcal {Z}_t\) and assume \(\mathcal {P}_{r-1}\subseteq \mathcal {Z}_t\). Then, for any \(u\in H^r(a,b)\) we have

$$\begin{aligned} \Vert u-Z_tu\Vert \le {\mathfrak {C}}_{t,r}\Vert \partial ^ru\Vert . \end{aligned}$$
(4)

Proof

Since \(\mathcal {P}_{r-1}\subseteq \mathcal {Z}_t\) and using (3), we have \(u=g+K^rf\) for \(g\in \mathcal {P}_{r-1}\) and \(f\in L^2(a,b)\). Thus,

$$\begin{aligned} \Vert u-Z_tu\Vert =\Vert g+K^rf-Z_t(g+K^rf)\Vert = \Vert (I-Z_t) K^rf\Vert \le {\mathfrak {C}}_{t,r}\Vert f\Vert , \end{aligned}$$
(5)

and the result follows from the identity \(\partial ^ru=f\). \(\square \)

By definition of the operator norm, the constant \({\mathfrak {C}}_{t,r}\) is the smallest possible constant such that the last inequality in (5) holds for all \(f\in L^2(a,b)\). We thus see from the above proof that whenever \(\mathcal {P}_{r-1}\subseteq \mathcal {Z}_t\), the constant \({\mathfrak {C}}_{t,r}\) is the smallest possible constant such that (4) holds for all \(u\in H^r(a,b)\).

3 A projection with boundary interpolation

Similarly to [16], we define a sequence of projection operators \(Q_t^q:H^q(a,b)\rightarrow \mathcal {Z}_{t}\), for \(q=0,\ldots ,t\), by \(Q_{t}^0:=Z_{t}\) and

$$\begin{aligned} Q_t^qu := u(a) + KQ_{t-1}^{q-1}\partial u. \end{aligned}$$
(6)

These projections, by definition, commute with the derivative: \(\partial Q_t^q=Q_{t-1}^{q-1}\partial \). Note that \(\partial ^q Q_t^q=Z_{t-q}\partial ^q\) can equivalently be stated as

$$\begin{aligned} (\partial ^{q}Q_t^q u,\partial ^qv) = (\partial ^q u, \partial ^q v), \quad \forall v\in \mathcal {Z}_t, \end{aligned}$$
(7)

since \(\partial ^q\mathcal {Z}_t=\mathcal {Z}_{t-q}\). It is also easy to see that these projections satisfy the interpolation property

$$\begin{aligned} (Q_t^qu)^{(\ell )}(a)= u^{(\ell )}(a),\quad \ell =0,\ldots ,q-1. \end{aligned}$$
(8)

In the following lemma we show under which conditions there is interpolation at the other end point of the domain.

Lemma 2

If \(\mathcal {P}_{2q-\ell -1}\subseteq \mathcal {Z}_t\) then the projector \(Q_t^q\) in (6) satisfies \((Q_t^qu)^{(\ell )}(b)= u^{(\ell )}(b)\) for \(\ell =0,\ldots ,q-1\).

Proof

We proceed by induction on \(\ell \). We first consider \(\ell =q-1\). If we pick \(v(x)=x^q/q!\) in (7) we find that

$$\begin{aligned} (Q^q_tu)^{(q-1)}(b)-(Q^q_tu)^{(q-1)}(a) = (\partial ^{q} Q^q_tu,1) = (\partial ^{q}u,1) = u^{(q-1)}(b)- u^{(q-1)}(a), \end{aligned}$$

and the result follows from (8). Next we assume that the result is true for \(\ell +1,\ell +2,\ldots , q-1\) and consider the case \(\ell \). Using integration by parts, \(q-\ell -1\) times, we find from (7) that

$$\begin{aligned} (\partial ^{\ell +1} Q^q_tu,\partial ^{2q-\ell -1}v) = (\partial ^{\ell +1}u,\partial ^{2q-\ell -1}v), \end{aligned}$$
(9)

where the boundary terms disappear due to (8) and the induction hypothesis. The result now follows by picking \(v(x)=x^{2q-\ell -1}/(2q-\ell -1)!\) in (9). \(\square \)

In the case \(q=1\), the projector \(Q^1_t\) was already defined in [20] and [17, Section 8]. Its interpolation property was exploited to build globally \(C^0\) functions in the context of multi-patch geometries and error estimates were provided for isogeometric multi-patch discretizations. In the case \(\mathcal {Z}_t=\mathcal {P}_{2q-1}\), the projector \(Q^q_t\) was used in [4] to obtain error estimates for spline spaces (with restrictions on the smoothness). We will generalize these results in Sect. 5.1; see in particular Example 6.

Using the classical Aubin–Nitsche duality argument we arrive at the following error estimates for \(Q^q_t\).

Lemma 3

Let \(Q_t^q\) be the projector defined in (6). Then,

$$\begin{aligned} \Vert u-Q^q_tu\Vert \le {\mathfrak {C}}_{t-q,q}\Vert (I-Z_{t-q})\partial ^q u\Vert , \end{aligned}$$

for all \(t\ge q\) such that \(\mathcal {P}_{q-1}\subseteq \mathcal {Z}_{t-q}\).

Proof

Let \(u\in H^q(a,b)\) be given and define w as the solution to the Dirichlet problem

$$\begin{aligned} \begin{aligned} (-1)^{q}\partial ^{2q}w&=u-Q_t^qu, \\ w(a)&=w(b)=\cdots =w^{(q-1)}(a)=w^{(q-1)}(b)=0. \end{aligned} \end{aligned}$$

Using integration by parts, q times, together with (8) and Lemma 2, we have

$$\begin{aligned} \Vert u-Q^q_tu\Vert ^2&=(u-Q^q_tu,u-Q^q_tu)=(u-Q^q_tu,(-1)^{q}\partial ^{2q}w)\\&=(\partial ^q(u-Q^q_tu),\partial ^{q} w)=((I-Z_{t-q})\partial ^q u,\partial ^{q} (w-v)), \end{aligned}$$

for any \(v\in \mathcal {Z}_t\), since \(((I-Z_{t-q})\partial ^q u,\partial ^qv)=0\). Next, using \(\Vert u-Q^q_tu\Vert =\Vert \partial ^{2q}w\Vert \) together with the Cauchy–Schwarz inequality we obtain

$$\begin{aligned} \Vert u-Q^q_tu\Vert \,\Vert \partial ^{2q}w\Vert \le \Vert (I-Z_{t-q})\partial ^q u\Vert \,\Vert \partial ^q (w-v)\Vert . \end{aligned}$$
(10)

If we let \(v=Q_t^qw\), then Lemma 1 implies that

$$\begin{aligned} \Vert \partial ^q(w-Q^q_tw)\Vert =\Vert (I-Z_{t-q})\partial ^qw\Vert \le {\mathfrak {C}}_{t-q,q} \Vert \partial ^{2q}w\Vert , \end{aligned}$$
(11)

since \(\mathcal {P}_{q-1}\subseteq \mathcal {Z}_{t-q}\). Combining (10) and (11) completes the proof. \(\square \)

Theorem 1

Let \(u\in H^r(a,b)\) be given. For any \(q=0,\ldots ,r\), let \(Q_t^q\) be the projector onto \(\mathcal {Z}_t\) defined in (6). Then, for any \(\ell =0,\ldots ,q\) we have

$$\begin{aligned} \Vert \partial ^{\ell }(u-Q^q_tu)\Vert \le {\mathfrak {C}}_{t-q,q-\ell } {\mathfrak {C}}_{t-q,r-q}\Vert \partial ^ru\Vert , \end{aligned}$$

for all \(t\ge q\) such that \(\mathcal {P}_{r-q-1}\subseteq \mathcal {Z}_{t-q}\) and \(\mathcal {P}_{q-\ell -1}\subseteq \mathcal {Z}_{t-q}\).

Proof

Using the commuting property \(\partial ^{\ell }Q^q_t=Q^{q-\ell }_{t-\ell }\partial ^{\ell }\) together with Lemma 3 we obtain

$$\begin{aligned} \Vert \partial ^{\ell }(u-Q^q_tu)\Vert&=\Vert (I-Q^{q-\ell }_{t-\ell })\partial ^{\ell }u\Vert \le {\mathfrak {C}}_{t-q,q-\ell }\Vert (I-Z_{t-q})\partial ^q u\Vert , \end{aligned}$$

since \(\mathcal {P}_{q-\ell -1}\subseteq \mathcal {Z}_{t-q}\). The result now follows from Lemma 1 since \(\mathcal {P}_{r-q-1}\subseteq \mathcal {Z}_{t-q}\). \(\square \)

In [16, Section 3.1] a closely related sequence of projection operators were studied. Let \(\widetilde{Q}_t^q:H^q(a,b)\rightarrow \mathcal {Z}_{t}\), for \(q=0,\ldots ,t\), be defined by \(\widetilde{Q}_t^0:=Z_{t}\) and

$$\begin{aligned} \widetilde{Q}_t^qu := c(u) + KQ_{t-1}^{q-1}\partial u, \end{aligned}$$

where \(c(u)\in \mathbb {R}\) is chosen such that \((\widetilde{Q}_t^q u,1)=(u,1)\). In the case of \(\mathcal {Z}_{t}\) being a spline space, the projector \(\widetilde{Q}_t^1\) was also studied in [21]. In both works [16, 21], only maximally smooth splines were considered; here we consider a more general context that allows for splines of any smoothness.

Proposition 1

If \(\mathcal {P}_{2q-\ell }\subseteq \mathcal {Z}_t\) then the projector \(Q_t^q\) in (6) satisfies \((\partial ^{\ell }Q^q_tu,1) = (\partial ^{\ell }u,1)\) for \(\ell =0,\ldots ,q\). Consequently, if \(\mathcal {P}_{2q}\subseteq \mathcal {Z}_t\) then \(Q_t^q=\widetilde{Q}_t^q\).

Proof

We first consider the case \(\ell >0\). Since \(\mathcal {P}_{2q-\ell }\subseteq \mathcal {Z}_t\) it follows from (8) and Lemma 2 that

$$\begin{aligned} (\partial ^{\ell }Q^q_tu,1) =(Q^q_tu)^{(\ell -1)}(b)-(Q^q_tu)^{(\ell -1)}(a) = u^{(\ell -1)}(b)- u^{(\ell -1)}(a) = (\partial ^{\ell }u,1). \end{aligned}$$

If \(\ell =0\) then, using integration by parts together with (8) and Lemma 2, we have

$$\begin{aligned} (u-Q^q_tu,1) = \frac{(-1)^q}{q!}(\partial ^q(u-Q^q_tu),x^q) = 0, \end{aligned}$$

since \(x^{2q}\in \mathcal {Z}_t\) and \(Q^q_t\) satisfies (7). \(\square \)

The degree of the polynomial inclusion in Proposition 1 is sharp as illustrated in the following example.

Example 1

Let \(q=1\) and \([a,b]=[0,1]\). Then, for \(\mathcal {Z}_1=\mathcal {P}_1\) (\(t=1\)) we have

$$\begin{aligned} Q^1_1u(x) = u(0) + \int _0^x Z_0\partial u(y)dy = u(0)+x(u(1)-u(0)). \end{aligned}$$

It is clear that in general \((Q^1_1u,1)\ne (u,1)\) and thus \(Q^1_1\) is different from \(\widetilde{Q}^1_1\). On the other hand, for \(\mathcal {Z}_2=\mathcal {P}_2\) (\(t=2\)) we have

$$\begin{aligned} Q^1_2u(x)&= u(0) + \int _0^x Z_1\partial u(y)dy\\&=u(0) -2x \left[ u(1)+2u(0)-3(u,1)\right] +3x^2 \left[ u(1)+u(0)-2(u,1)\right] , \end{aligned}$$

which satisfies \((Q^1_2u,1)=(u,1)\) and thus \(Q^1_2\) equals \(\widetilde{Q}^1_2\).

We observe that the polynomial condition \(\mathcal {P}_{2q-\ell }\subseteq \mathcal {Z}_t\) in Proposition 1 is slightly more restrictive than the polynomial condition \(\mathcal {P}_{2q-\ell -1}\subseteq \mathcal {Z}_{t}\) (which is equivalent to \(\mathcal {P}_{q-\ell -1}\subseteq \mathcal {Z}_{t-q}\)) required in Theorem 1. Hence, when \(\mathcal {P}_{2q}\subseteq \mathcal {Z}_t\), the explicit error estimates in the theorem are also valid for the projector \(\widetilde{Q}_t^q\) for all \(\ell =0,\ldots ,q\). This extends the results in [16] that only provides error estimates for \(\ell =q-1,q\), and only covers maximally smooth spline spaces.

4 Relation to the Ritz projection

In this section we focus on the Ritz projector \(R^q_t\) considered in [17], and investigate the relation with our projector \(Q^q_t\). We recall from [17, Eq. (13)] that \(R_t^q: H^q(a,b)\rightarrow \mathcal {Z}_t\), for \(q=0,\ldots ,t\), is defined by

$$\begin{aligned} \begin{aligned}&(\partial ^{q}R_t^q u,\partial ^qv)= (\partial ^q u, \partial ^q v), \quad \forall v\in \mathcal {Z}_t,\\&(R_t^qu,g)=(u,g), \,\,\,\,\qquad \qquad \forall g\in \mathcal {P}_{q-1}. \end{aligned} \end{aligned}$$
(12)

We first show that the difference between \(Q^q_tu\) and \(R^q_tu\) is a polynomial of at most degree \(q-1\).

Proposition 2

Let \(Q^q_t\) and \(R^q_t\) be the projectors defined in (6) and (12), respectively. Let \(P_{q-1}\) be the \(L^2\)-projector onto \(\mathcal {P}_{q-1}\). Then,

$$\begin{aligned} E_{q-1}u := R^q_tu - Q^q_tu = P_{q-1}(u - Q^q_tu)\in \mathcal {P}_{q-1}. \end{aligned}$$

Proof

Let \(g_e:=P_{q-1}(u - Q^q_tu)\) and \(r_e:=g_e+Q^q_tu\). Then, from (7) we obtain

$$\begin{aligned} (\partial ^{q}r_e,\partial ^qv) = (\partial ^{q}g_e+\partial ^{q}Q^q_tu,\partial ^qv)=(\partial ^q u, \partial ^q v), \quad \forall v\in \mathcal {Z}_t, \end{aligned}$$

and by the definition of \(g_e\) we have

$$\begin{aligned} (r_e,g)=(g_e+Q^q_tu-u+u,g)=(u,g), \quad \forall g\in \mathcal {P}_{q-1}. \end{aligned}$$

Hence, we conclude that \(R^q_tu=r_e\) and \(E_{q-1}u=g_e\). \(\square \)

Observe that Proposition 2 implies that

$$\begin{aligned} \Vert u - R^q_tu\Vert ^2=\Vert u - Q^q_tu\Vert ^2-\Vert E_{q-1} u\Vert ^2, \end{aligned}$$

and hence

$$\begin{aligned} \Vert u - R^q_tu\Vert \le \Vert u - Q^q_tu\Vert . \end{aligned}$$
(13)

It is also clear that

$$\begin{aligned} \Vert \partial ^{q}(u - R^q_tu)\Vert =\Vert \partial ^{q}(u - Q^q_tu)\Vert . \end{aligned}$$
(14)

Example 2

Let \(q=1\) and \(r\ge 1\). Then, for \(u\in H^r(a,b)\) and \(\ell =0,1\) we have

$$\begin{aligned} \Vert \partial ^{\ell }(u-R^1_tu)\Vert \le \Vert \partial ^{\ell }(u-Q^1_tu)\Vert \le {\mathfrak {C}}_{t-1,1-\ell } {\mathfrak {C}}_{t-1,r-1}\Vert \partial ^ru\Vert , \end{aligned}$$

for all \(t\ge 1\) such that \(\mathcal {P}_{r-2}\subseteq \mathcal {Z}_{t-1}\). This follows immediately from (13)–(14) and Theorem 1.

In general, the projectors \(Q^q_t\) and \(R^q_t\) are different, but they coincide when polynomials of high enough degree are in the space \(\mathcal {Z}_t\).

Proposition 3

Let \(Q^q_t\) and \(R^q_t\) be the projectors defined in (6) and (12), respectively. If \(\mathcal {P}_{2q+i}\subseteq \mathcal {Z}_t\) then \((u-Q^q_tu,x^{i})=0\) for \(i=0,\ldots ,q-1\). Consequently, if \(\mathcal {P}_{3q-1}\subseteq \mathcal {Z}_t\) then \(Q^q_t=R^q_t\).

Proof

Using integration by parts together with (8) and Lemma 2, we have

$$\begin{aligned} (u-Q^q_tu,x^i) =\frac{(-1)^q i!}{(q+i)!}(\partial ^q(u-Q^q_tu), x^{q+i}) = 0, \end{aligned}$$

since \(Q^q_t\) satisfies (7) and \(x^{2q+i}\in \mathcal {Z}_t\) for all \(i\in \{0,\ldots ,q-1\}\). \(\square \)

The degree of the polynomial inclusion in Proposition 3 is sharp as illustrated in the following example.

Example 3

Let \(q=2\) and \([a,b]=[0,1]\). We choose \(u(x)=x^6\). Then, for \(\mathcal {Z}_2=\mathcal {P}_2\) (\(t=2\)) we have

$$\begin{aligned} Q^2_2 u(x) = 3x^2, \quad R^2_2 u(x) = Q^2_2 u(x) - \frac{33}{14}x + \frac{9}{28}; \end{aligned}$$

for \(\mathcal {Z}_3=\mathcal {P}_3\) (\(t=3\)) we have

$$\begin{aligned} Q^2_3 u(x) = 4x^3 - 3x^2, \quad R^2_3 u(x) = Q^2_3 u(x) + \frac{3}{70}x + \frac{17}{140}; \end{aligned}$$

for \(\mathcal {Z}_4=\mathcal {P}_4\) (\(t=4\)) we have

$$\begin{aligned} Q^2_4 u(x) = \frac{30}{7}x^4 - \frac{32}{7}x^3 + \frac{9}{7}x^2, \quad R^2_4 u(x) = Q^2_4 u(x) + \frac{3}{70}x - \frac{3}{140}; \end{aligned}$$

and for \(\mathcal {Z}_5=\mathcal {P}_5\) (\(t=5\)) we have

$$\begin{aligned} Q^2_5 u(x) = R^2_5 u(x) = 3x^5 - \frac{45}{14}x^4 + \frac{10}{7}x^3 - \frac{3}{14}x^2. \end{aligned}$$

Note that \(Q^2_tu\) is interpolating u at \(b=1\) only for \(t\ge 3\), in accordance with Lemma 2.

One can ask the question of whether the Ritz projector \(R^q_t\) satisfies other boundary conditions given a polynomial inclusion \(\mathcal {P}_{p}\subseteq \mathcal {Z}_t\) of degree \(p<3q-1\). We consider this problem in the next example.

Example 4

Let \(q=2\) and define \(f(x) := u(x) - R^2_tu(x)\). Using integration by parts twice we have

$$\begin{aligned} 0=(\partial ^2f,\partial ^2v) =(f,\partial ^4v) + \left[ \partial f \partial ^2 v\right] _a^b - \left[ f \partial ^3 v\right] _a^b, \quad v\in \mathcal {Z}_t. \end{aligned}$$

We now pick \(v(x)=x^s/s!\) for \(s=2,3,4\) to obtain

$$\begin{aligned} \left[ f'(x) \right] _a^b&= 0, \\ \left[ f'(x) x\right] _a^b - \left[ f(x) \right] _a^b&= 0, \\ \left[ f'(x) x^2/2\right] _a^b - \left[ f(x) x\right] _a^b&= 0, \end{aligned}$$

where we have used that \((f,1)=0\) in the last equation. This implies that

$$\begin{aligned} f'(b)&= f'(a), \quad&\mathcal {P}_{2}\subseteq \mathcal {Z}_t, \\ f'(b) b-f'(a)a&= f(b)-f(a), \quad&\mathcal {P}_{3}\subseteq \mathcal {Z}_t, \\ f'(b)b^2-f'(a)a^2&=2\left( f(b)b-f(a)a\right) , \quad&\mathcal {P}_{4}\subseteq \mathcal {Z}_t. \end{aligned}$$

By combining the above conditions we also deduce

$$\begin{aligned} f'(b)&= \frac{f(b)-f(a)}{b-a}, \quad&\mathcal {P}_{3}\subseteq \mathcal {Z}_t, \\ f(b)&= -f(a), \quad&\mathcal {P}_{4}\subseteq \mathcal {Z}_t. \end{aligned}$$

Thus, if \(\mathcal {P}_{2}\subseteq \mathcal {Z}_t\), then we have

$$\begin{aligned} (R^2_tu)'(b)-(R^2_tu)'(a) = u'(b)-u'(a). \end{aligned}$$

If \(\mathcal {P}_{3}\subseteq \mathcal {Z}_t\), then we also have

$$\begin{aligned} (R^2_tu)'(b) - \frac{R^2_tu(b)-R^2_tu(a)}{b-a} = u'(b) - \frac{u(b)-u(a)}{b-a}. \end{aligned}$$

Finally, if \(\mathcal {P}_{4}\subseteq \mathcal {Z}_t\), then we also have

$$\begin{aligned} R^2_tu(b) + R^2_tu(a) = u(b) + u(a). \end{aligned}$$

These conditions can be verified with the function and the Ritz projectors considered in Example 3. We may conclude that the Ritz projector \(R^2_t\) satisfies some type of boundary relations for various polynomial inclusions, but they do not seem very useful in practice unless the polynomial degree is high enough to be covered by Proposition 3.

To complement the result in Proposition 3, we also provide estimates for the difference between \(Q^q_t\) and \(R^q_t\) in general. We start with the following inverse inequality (see [11] for details and other similar results).

Lemma 4

If \(g\in \mathcal {P}_{p}\) then we have

$$\begin{aligned} \Vert \partial g\Vert \le \frac{d_p}{b-a}\Vert g\Vert , \quad d_p:=\sqrt{\frac{p(p+1)(p+2)(p+3)}{2}}. \end{aligned}$$

Proposition 4

Let \(Q^q_t\) and \(R^q_t\) be the projectors defined in (6) and (12), respectively. We have

$$\begin{aligned} \Vert R^q_tu - Q^q_tu\Vert \le \Vert u - Q^q_tu\Vert . \end{aligned}$$

Furthermore, for \(\ell =1,\ldots ,q-1\), we have

$$\begin{aligned} \Vert \partial ^\ell (R^q_tu - Q^q_tu)\Vert \le \left( \frac{1}{b-a}\right) ^{\ell }\left( \prod _{i=q-\ell }^{q-1} d_i\right) \Vert R^q_tu - Q^q_tu\Vert . \end{aligned}$$

Finally, for any \(\ell \ge q\), we have

$$\begin{aligned} \Vert \partial ^\ell (R^q_tu - Q^q_tu)\Vert =0. \end{aligned}$$

Proof

This follows immediately from Proposition 2, \(\Vert P_{q-1}(u - Q^q_tu)\Vert \le \Vert u - Q^q_tu\Vert \), and a repeated application of Lemma 4. \(\square \)

Let \(u\in H^r(a,b)\) be given. The results in Propositions 3 and 4 can be combined with Theorem 1 to achieve an estimate for (derivatives of) the difference between \(R_t^q u\) and \(Q^q_tu\). In particular, we have

$$\begin{aligned} \Vert R^q_tu - Q^q_tu\Vert \le {\mathfrak {C}}_{t-q,q}{\mathfrak {C}}_{t-q,r-q} \Vert \partial ^ru\Vert , \end{aligned}$$
(15)

and

$$\begin{aligned} \Vert \partial ^\ell (R^q_tu - Q^q_tu)\Vert \le {\mathfrak {C}}_{t-q,q}{\mathfrak {C}}_{t-q,r-q}\left( \frac{1}{b-a}\right) ^{\ell }\left( \prod _{i=q-\ell }^{q-1} d_i\right) \Vert \partial ^ru\Vert , \quad 1\le \ell < q,\nonumber \\ \end{aligned}$$
(16)

for all \(t\ge q\) such that \(\mathcal {P}_{r-q-1}\subseteq \mathcal {Z}_{t-q}\) and \(\mathcal {P}_{q-1}\subseteq \mathcal {Z}_{t-q}\).

5 Spline spaces

For \(k\ge 0\), let \(C^k[a,b]\) be the classical space of functions with continuous derivatives of order \(0,1,\ldots ,k\) on the interval [ab]. We further let \(C^{-1}[a,b]\) denote the space of bounded, piecewise continuous functions on [ab] that are discontinuous only at a finite number of points.

Suppose \(\Xi := (\xi _0,\ldots ,\xi _{N+1})\) is a sequence of (break) points such that

$$\begin{aligned} a=:\xi _0< \xi _1< \cdots< \xi _{N} < \xi _{N+1}:= b, \end{aligned}$$

and let

$$\begin{aligned} h:=\max _{j=0,\ldots ,N} (\xi _{j+1}-\xi _j). \end{aligned}$$

Moreover, set \(I_j := [\xi _j,\xi _{j+1})\), \(j=0,1,\ldots ,N-1\), and \(I_N:= [\xi _N,\xi _{N+1}]\). Then, for \(-1\le k\le p-1\), we define the space \(\mathcal {S}^k_{p,\Xi }\) of splines of degree p and smoothness k by

$$\begin{aligned} \mathcal {S}^k_{p,\Xi } := \{s \in C^{k}[a,b] : s|_{I_j} \in \mathcal{P}_p,\, j=0,1,\ldots ,N\}. \end{aligned}$$

With a slight misuse of terminology, we will refer to \(\Xi \) as knot sequence and to its elements as knots. We use the notation \(S_p^k: L^2(a,b)\rightarrow \mathcal {S}_{p,\Xi }^k\) for the \(L^2\)-projector onto spline spaces.

Define now the constant \(c_{p,k,r}\) for \(p\ge r-1\) as follows. If \(k=p-1\), we let

$$\begin{aligned} c_{p,p-1,r}:=\left( \frac{1}{\pi }\right) ^r, \end{aligned}$$

and if \(k\le p-2\), we let

$$\begin{aligned} c_{p,k,r}:=\left( \frac{1}{2}\right) ^{r}{\left\{ \begin{array}{ll} \left( \dfrac{1}{\sqrt{(p-k)(p-k+1)}}\right) ^r, &{}k\ge r-2,\\ [0.5cm] \left( \dfrac{1}{\sqrt{(p-k)(p-k+1)}}\right) ^{k+1}\sqrt{\dfrac{(p+1-r)!}{(p-1+r-2k)!}}, &{} k<r-2. \end{array}\right. } \end{aligned}$$

The next result was then shown in [17, Theorem 3].

Theorem 2

Let \(u\in H^r(a,b)\) be given. For any knot sequence \(\Xi \), let \(S^k_p\) be the \(L^2\)-projector onto \(\mathcal {S}^k_{p,\Xi }\) for \(-1\le k\le p-1\). Then,

$$\begin{aligned} \Vert u-S^k_pu\Vert \le c_{p,k,r}h^r\Vert \partial ^ru\Vert , \end{aligned}$$

for all \(p\ge r-1\).

Remark 1

In [17, Remark 3] it was observed that for \(k\le p-2\) the constant \(c_{p,k,r}\) can be bounded by a simpler expression using the Stirling formula. For \(k\ge r-2\), we have

$$\begin{aligned} c_{p,k,r}\le \left( \frac{1}{2(p-k)}\right) ^r, \end{aligned}$$

while for \(k<r-2\) we get

$$\begin{aligned} c_{p,k,r}\le \left( \frac{e}{4(p-k)}\right) ^r. \end{aligned}$$

In the following subsections we detail the construction and properties of the projector in (6) when the approximation space is the spline space \(\mathcal {S}^k_{p,\Xi }\).

5.1 The Q projector for spline spaces

If \(\mathcal {Z}_0=\mathcal {S}^{-1}_{p-k-1,\Xi }\) then we have \(\mathcal {Z}_{k+1}=\mathcal {S}^k_{p,\Xi }\) for the sequence of spaces in (2). Specifically,

$$\begin{aligned} \mathcal {S}^k_{p,\Xi } = \mathcal {P}_0+K(\mathcal {S}^{k-1}_{p-1,\Xi }) = \mathcal {P}_0+K^*(\mathcal {S}^{k-1}_{p-1,\Xi }), \quad k\ge 0. \end{aligned}$$

As a special case of the projector in (6) we define the sequence of projector operators \(Q_p^{q,k}:H^q(a,b)\rightarrow \mathcal {S}^k_{p,\Xi }\), for \(q=0,\ldots ,k+1\), by \(Q_{p}^{0,k}:=S^k_p\) and

$$\begin{aligned} Q_p^{q,k}u := u(a) + KQ_{p-1}^{q-1,k-1}\partial u. \end{aligned}$$
(17)

By combining Theorem 2 with Theorem 1 we obtain the following error estimate for \(Q_p^{q,k}\).

Theorem 3

Let \(u\in H^r(a,b)\) be given. For any degree p, knot sequence \(\Xi \) and smoothness \(-1\le k\le p-1\), let \(Q_p^{q,k}\) be the projector onto \(\mathcal {S}^{k}_{p,\Xi }\) defined in (17) for \(q=0,\ldots ,\min \{k+1,r\}\). Then, for any \(\ell =0,\ldots ,q\), we have

$$\begin{aligned} \Vert \partial ^{\ell }(u-Q^{q,k}_pu)\Vert \le c_{p-q,k-q,q-\ell } c_{p-q,k-q,r-q} h^{r-\ell }\Vert \partial ^ru\Vert , \end{aligned}$$

for all \(p\ge \max \{r-1,2q-\ell -1\}\).

Remark 2

In the case of maximal smoothness, \(k=p-1\), the estimate in the above theorem becomes

$$\begin{aligned} \Vert \partial ^{\ell }(u-Q^{q,p-1}_pu)\Vert \le \left( \frac{h}{\pi }\right) ^{r-\ell }\Vert \partial ^ru\Vert . \end{aligned}$$
(18)

If, on the other hand, \(k\le p-2\), we can use the simplified estimates in Remark 1 to obtain

$$\begin{aligned} \Vert \partial ^{\ell }(u-Q^{q,k}_pu)\Vert \le \left( \frac{e\,h}{4(p-k)}\right) ^{r-\ell }\Vert \partial ^ru\Vert . \end{aligned}$$

Remark 3

The error bound in Theorem 3 relies on the constant \(c_{p,k,r}\) used in Theorem 2 for the \(L^2\)-projector. It is clear from the general result in Theorem 1 and [17, Remark 1] that the same procedure can be followed to convert any constant derived for the \(L^2\)-projector into a constant for the projector \(Q^{q,k}_p\). For example, the constant \(C_{h,p,k,r}\) for the \(L^2\)-projector in [17, Corollary 1] immediately leads to an alternative error bound for \(Q^{q,k}_p\): under the assumptions of Theorem 3, we have

$$\begin{aligned} \Vert \partial ^{\ell }(u-Q^{q,k}_pu)\Vert \le C_{h,p-q,k-q,q-\ell } C_{h,p-q,k-q,r-q}\Vert \partial ^ru\Vert . \end{aligned}$$

Example 5

Let \(q=2\) and \([a,b]=[0,1]\). We choose \(u(x)=\sin (4x)\). Figure 1 shows the convergence behavior of \(\Vert \partial ^{\ell }(u-Q^{2,p-1}_pu)\Vert \) for \(p=2,3,4\) and \(\ell =0,1\). We observe the optimal convergence order in h (namely \(p+1-\ell \)) when \(p\ge 3-\ell \), which agrees with the theoretical prediction in Theorem 3 (\(r=p+1\)). Contrarily, the case \(p=2\) and \(\ell =0\) presents a suboptimal convergence order in h of 2 (instead of 3), but this case is not covered by Theorem 3.

Fig. 1
figure 1

The convergence of the error \(\Vert \partial ^{\ell }(u-Q^{2,p-1}_pu)\Vert \) for the problem specified in Example 5, taking a uniform knot sequence with \(h=2^{-i}\), \(i=1,\ldots ,5\), and the different choices \(p=2,3,4\) and \(\ell =0,1\). The reference convergence order in h is indicated by black triangles

Example 6

If we choose \(q=k+1\) in Theorem 3, and consider all \(\ell =0,\ldots ,k+1\), then the condition on the degree becomes \(p\ge \max \{r-1,2k+1\}\). This is the same condition on the degree as in [4, Theorem 2] and so their theorem is very similar to the special case \(q=k+1\) of Theorem 3. This is not surprising since the projector considered in [4] is defined by using the polynomial projector \(Q^{k+1}_p:H^{k+1}(I_j)\rightarrow \mathcal {P}_p\) on each knot interval \(I_j\), \(j=0,\ldots ,N\), and then gluing them together with smoothness k by means of the boundary interpolation of \(Q^{k+1}_p\).

Remark 4

Similar to what was done in [15, Section 3] for the Laplacian, the error estimate in (18) can be used to predict the number of outlier modes [8, 12] in the numerical approximation of eigenvalues of higher order Laplacians with (full) Dirichlet boundary conditions, when using smooth spline spaces. As an example, consider the following eigenvalue problem: find \(u_i\in H^2(0,1)\) and \(\lambda _i\in \mathbb {R}\), for \(i=1,2,\ldots \), such that

$$\begin{aligned} u_i^{(4)}(x)&= \lambda _i u_i(x), \\ u_i(0)&=u_i(1)=u_i'(0)=u_i'(1)=0. \end{aligned}$$

If we define the spline space \(\mathcal {S}_{p,\Xi ,00}:=\{s\in \mathcal {S}^{p-1}_{p,\Xi }: s(0)=s(1)=s'(0)=s'(1)=0\}\) and let \(n:=\dim \mathcal {S}_{p,\Xi ,00}\), then the above eigenvalue problem can be numerically approximated with the discrete weak formulation: find \(u_{h,i}\in \mathcal {S}_{p,\Xi ,00}\) and \(\lambda _{h,i}\in \mathbb {R}\), for \(i=1,\ldots ,n\), such that

$$\begin{aligned} (\partial ^2 u_{h,i},\partial ^2 v_h) = \lambda _{h,i} (u_{h,i},v_h), \quad \forall v_h\in \mathcal {S}_{p,\Xi ,00}. \end{aligned}$$
(19)

The explicit error estimate in (18) can now be used to estimate the number of outlier modes, i.e., the number of eigenvalues which are badly approximated by (19). Using the same strategy as in [15, Section 3], we find that for fixed h, the discrete eigenvalue \(\lambda _{h,i}\) is not an outlier if \(h\lambda _i^{1/4}<\pi \). The main difference compared to the simpler case of the Laplacian in [15, Section 3] is that \(\lambda _i\) must now also be estimated; however, this can be done either analytically or numerically. Analytically, it is known that \(\lambda _i\) is very close to \(((2i+1)\pi /2)^4\) for \(i=1,2,\ldots \); see, e.g., [9, Section 5.5]. Finally, we note that, using the techniques in [15], this outlier discussion can also be extended to the higher dimensional tensor-product case.

5.2 Estimates for higher derivatives

The \(\ell \) in Theorem 3 only goes up to q, while the function u is assumed to be in \(H^r(a,b)\) for \(r\ge q\). If \(r>q\) then we can use an argument from [18, Section 4] to obtain error estimates in the cases \(q<\ell \le r\). This argument provides an optimal rate of convergence in the maximum knot distance h, whenever the knot sequence is quasi-uniform, but convergence in the degree p appears less than optimal. For any knot sequence \(\Xi \), let \(h_\mathrm {min}\) denote its minimum knot distance. Since \(\partial ^{\ell }Q^{q,k}_pu\) is not in \(L^2(a,b)\) for \(\ell >k+1\) we define the broken norm \(\Vert \cdot \Vert _{\Xi }\) by

$$\begin{aligned} \Vert \cdot \Vert _{\Xi }^2 := \sum _{j=0}^{N}\Vert \cdot \Vert _{L^2(I_j)}^2. \end{aligned}$$

Proposition 5

Let \(u\in H^r(a,b)\) be given. For any degree p, knot sequence \(\Xi \) and smoothness \(-1\le k\le p-1\), let \(Q_p^{q,k}\) be the projector onto \(\mathcal {S}^{k}_{p,\Xi }\) defined in (17) for \(q=0,\ldots ,\min \{k+1,r-1\}\). Moreover, we set \(m:=\max \{2r-q-1,p\}\). Then, for any \(\ell =q+1,\ldots ,r\), we have

$$\begin{aligned}&\Vert \partial ^{\ell }(u-Q^{q,k}_pu)\Vert _{\Xi } \\&\quad \le \left[ c_{m-r,-1,r-\ell } + (c_{m-r,-1,r-q} + c_{p-q,k-q,r-q})\left( \frac{h}{h_{\min }}\right) ^{\ell -q}\Biggl (\prod _{i=m-\ell +1}^{m-q} d_i\Biggr ) \right] h^{r-\ell }\Vert \partial ^ru\Vert , \end{aligned}$$

for all \(p\ge r-1\).

Proof

First, from Theorem 3 we deduce

$$\begin{aligned} \Vert \partial ^{q}(Q^{r,r-1}_mu-Q^{q,k}_pu)\Vert&\le \Vert \partial ^{q}(Q^{r,r-1}_mu-u)\Vert + \Vert \partial ^{q}(u-Q^{q,k}_pu)\Vert \\&\le (c_{m-r,-1,r-q} + c_{p-q,k-q,r-q}) h^{r-q}\Vert \partial ^ru\Vert , \end{aligned}$$

for \(p\ge \max \{r-1,q-1\}=r-1\) and \(m\ge \max \{r-1,2r-q-1\}=2r-q-1\). Next, using the inverse inequality in Lemma 4 on each knot interval, we obtain

$$\begin{aligned} \Vert \partial ^{\ell }(Q^{r,r-1}_mu-Q^{q,k}_pu)\Vert _{\Xi } \le \left( \frac{1}{h_{\min }}\right) ^{\ell -q}\left( \prod _{i=m-\ell +1}^{m-q} d_i\right) \Vert \partial ^{q}(Q^{r,r-1}_mu-Q^{q,k}_pu)\Vert . \end{aligned}$$

The result now follows from

$$\begin{aligned} \Vert \partial ^{\ell }(u-Q^{q,k}_pu)\Vert _{\Xi } \le \Vert \partial ^{\ell }(u-Q^{r,r-1}_mu)\Vert + \Vert \partial ^{\ell }(Q^{r,r-1}_mu-Q^{q,k}_pu)\Vert _{\Xi }, \end{aligned}$$

together with another application of Theorem 3. \(\square \)

We remark that the case \(q=0\) and \(\ell =1\) of the above proposition is a standard argument for showing error estimates (and stability) of the \(L^2\)-projection in the \(H^1\)-(semi)norm for quasi-uniform grids; see, e.g., the proof of [3, Lemma 1] or [5, Corollary 7.8].

5.3 Comparison with other projectors

Explicit error estimates for certain spline projectors with boundary interpolation have also been considered in [18]. We denote the sequence of projection operators onto \(\mathcal {S}^{k}_{p,\Xi }\) studied in [18, Theorem 3.5] by \(I_p^{q,k}\) for \(q=1,\ldots ,k+1\) and \(p=2q-1\). Then, for any \(\ell =0,\ldots ,q\) and \(r=2q\), it has been proved that

$$\begin{aligned} \Vert \partial ^{\ell }(u-I^{q,k}_pu)\Vert \le K_{q,q,k,\ell } K_{q,q,k,0} h^{r-\ell }\Vert \partial ^ru\Vert , \end{aligned}$$

where

$$\begin{aligned} K_{q,q,k,\ell } := {\left\{ \begin{array}{ll} 1, &{}\ell =q,\\ [0.25cm] \dfrac{(k+2-q)!}{(k+\ell +2-2q)!\,\pi ^{q-\ell }}, &{} 2q-k-2< \ell < q,\\ [0.5cm] \dfrac{(k+2-q)!}{\pi ^{q-\ell }}, &{}\ell \le 2q-k-2. \end{array}\right. } \end{aligned}$$

Numerical experiments reveal that the constants in Theorem 3 are never larger (and often much smaller) for the same values of \(q,p,k,\ell ,r\); see Example 7 for a visual illustration. Better constants for the projector \(I_p^{q,k}\) can be found in [1], but they are not explicit in most cases. We note that the latter constants are explicit for maximal smoothness \(k=p-1\) but these are still worse than \(\left( \frac{1}{\pi }\right) ^{r-\ell }\), the corresponding values attained in Theorem 3.

Example 7

In the case \(\ell =0\), the constant in the error estimate of [18] is \((K_{q,q,k,0})^2\), while the one of Theorem 3 is \((c_{q-1,k-q,q})^2\) taking into account \(r=2q\) and \(p=2q-1\). To understand how these two expressions relate, we look at the quantity

$$\begin{aligned} \log (K_{q,q,k,0})-\log (c_{q-1,k-q,q}). \end{aligned}$$
(20)

Several values are depicted in Figure 2. They are clearly nonnegative, implying that \(K_{q,q,k,0} \ge c_{q-1,k-q,q}\).

Fig. 2
figure 2

The quantity in (20) for different choices of \(q\ge 1\) and \(q-1\le k\le 2q-2\)

Let us now define the Ritz projector \(R_p^{q,k}: H^q(a,b)\rightarrow \mathcal {S}^k_{p,\Xi }\), for any \(q=0,\ldots ,k+1\), by

$$\begin{aligned} \begin{aligned} (\partial ^{q}R_p^{q,k} u,\partial ^qv)&= (\partial ^q u, \partial ^q v), \quad&\forall v\in \mathcal {S}^k_{p,\Xi }, \\ (R_p^{q,k}u,g)&=(u,g),&\forall g\in \mathcal {P}_{q-1}. \end{aligned} \end{aligned}$$
(21)

This projector is a special case of (12). From Proposition 3 we know that \(R_p^{q,k}=Q_p^{q,k}\) whenever \(p\ge 3q-1\). For degrees \(2q-1\le p < 3q-1\) the projectors \(R_p^{q,k}\) and \(Q_p^{q,k}\) are in general different, however, we can use Proposition 4 (see (15) and (16)) to achieve an estimate for derivatives of the difference between them.

Proposition 6

Let \(u\in H^r(a,b)\) be given. For any degree p, knot sequence \(\Xi \) and smoothness \(-1\le k\le p-1\), let \(Q_p^{q,k}\) and \(R_p^{q,k}\) be the projectors onto \(\mathcal {S}^{k}_{p,\Xi }\) defined, respectively, in (17) and (21) for \(q=0,\ldots ,\min \{k+1,r\}\). Then, we have

$$\begin{aligned} \Vert R_p^{q,k}u-Q_p^{q,k}u\Vert \le c_{p-q,k-q,q}c_{p-q,k-q,r-q}h^r \Vert \partial ^ru\Vert , \end{aligned}$$

for all \(p\ge \max \{r-1,2q-1\}\). Furthermore, for \(\ell =1,\ldots ,q-1\), we have

$$\begin{aligned} \Vert \partial ^\ell (R_p^{q,k}u-Q_p^{q,k}u)\Vert \le c_{p-q,k-q,q}c_{p-q,k-q,r-q}h^r \left( \frac{1}{b-a}\right) ^{\ell }\left( \prod _{i=q-\ell }^{q-1} d_i\right) \Vert \partial ^ru\Vert ,\nonumber \\ \end{aligned}$$
(22)

for all \(p\ge \max \{r-1,2q-1\}\). Finally, for \(\ell \ge q\), we have

$$\begin{aligned} \Vert \partial ^\ell (R_p^{q,k}u-Q_p^{q,k}u)\Vert =0. \end{aligned}$$

We see that the estimate in (22) converges in h with order r, independently of \(\ell \). This is more than the general convergence order \(r-\ell \) of the spline space for \(\ell >0\); see Theorem 3. Actually, Example 8 indicates that there is even a higher order of convergence for high p than predicted by the proposition.

Fig. 3
figure 3

The convergence of the error \(\Vert \partial ^{\ell }(R^{2,p-1}_pu-Q^{2,p-1}_pu)\Vert \) for the problem specified in Example 8, taking a uniform knot sequence with \(h=2^{-i}\), \(i=1,\ldots ,5\), and the different choices \(p=2,3,4\) and \(\ell =0,1\). The reference convergence order in h is indicated by black triangles

Example 8

Let \(q=2\) and \([a,b]=[0,1]\). We choose again \(u(x)=\sin (4x)\) as a continuation of Example 5. Figure 3 shows the convergence behavior of \(\Vert \partial ^{\ell }(R^{2,p-1}_pu-Q^{2,p-1}_pu)\Vert \) for \(p=2,3,4\) and \(\ell =0,1\). As expected from Proposition 6, we notice that the convergence order in h does not depend on \(\ell \) for a given p. However, the order seems to be equal to \(2(p-q+1)\), which is better for \(p>2q-1\) than the predicted order \(r=p+1\).

6 Conclusions

In an abstract framework, Ritz-type projectors with boundary interpolation properties have been presented and equipped with a priori error estimates. Their relation with the classical Ritz projectors has also been investigated.

In the important case of projectors onto spline spaces, the provided error bounds are fully explicit in all the parameters defining the approximation space — degree, smoothness, knot spacing — and in the Sobolev regularity of the approximated function. They agree with those derived in [17] for the classical Ritz projectors and improve upon the error estimates known for typical spline projectors with Hermite interpolation properties at the boundary [1, 18]. In this perspective, the presented results enhance and complement those recently obtained for the classical Ritz projectors in [17] by enriching explicit spline error estimates with matching of the boundary data.

For the sake of brevity, the presentation has been confined to the onedimensional case. The multivariate extension of the proposed projectors (and of the corresponding error estimates) towards tensor-product structures is straightforward by following the same line of arguments already detailed in [17].

The Hermite interpolation properties at the boundary make the presented projectors of interest in several applications as they directly allow for a local construction of globally smooth approximants by simply gluing local ones. Among the others, we mention their possible use in the context of isogeometric analysis for investigating the approximation properties in the frame of multi-degree spline spaces [19, 23] and smooth spline spaces on multi-patch geometries [7, 17, 24].

Moreover, as mentioned in Remark 4, for smooth spline spaces the Ritz-type projector with boundary interpolation and its corresponding error estimates can be used to predict the number of outlier modes in the numerical approximation of eigenvalues of higher order Laplacians with (full) Dirichlet boundary conditions.

Finally, we remark that both (6) and (12) are global projectors. As future line of research, it might be interesting to quantify the difference between them and local projectors such as Bézier projection [22] and the classical ones in [13, 14].