1 Introduction

In recent years, wavelet methods have been developed as a new powerful tool for the numerical solution of some boundary value problems.

Wavelets and multiresolution analysis (MRA) provide a robust and accurate alternative to traditional methods for solving differential equations. Their advantage is appreciated when they are applied to problems having localized singular behavior. The solution is approximated by an expansion of scaling functions and wavelets, with the convenience that multiscale and localization properties can be exploited. The choice of the wavelet basis is governed by several factors including the desired order of numerical accuracy and computational effort.

In some cases multiscale bases are combined with finite element methods, and adaptive refinement strategies are designed (Chen et al. [1] and Bindal et al. [2]). Other authors applied adaptive procedures in wavelet collocation methods, as the method introduced by Cai and Kumar et al. [3, 4]. Wavelet-Galerkin methods using variational equations is a good alternative, producing an efficient regularization action: in weak formulations for a given equation, the approximating functions can be relatively less regular and easier to construct [5].

To obtain high precision results, it is important that the associated system matrix, known as the stiffness matrix, be a sparse matrix with a small condition number. So, the choice of a wavelet basis satisfying some mathematical requirements is of great importance for the good performance of the method.

Wavelets on the real line are not suitable in applications which are defined on bounded domains, as the problem of solving differential equations numerically. Therefore it is necessary to adapt them. Wavelet bases on a bounded interval are usually constructed from wavelets on the real line. The main idea is to retain most of the inner functions, i.e., the scaling functions and wavelets whose support is contained in the interval, and to construct appropriate boundary scaling functions and wavelets separately. Properties such as smoothness, local support, and polynomial exactness of basis functions should be preserved.

Many constructions of cubic spline wavelets or multiwavelet bases on the interval have been proposed in recent years. Jia et al. [6] designed biorthogonal multiwavelets adapted to the interval [0, 1] based on Hermite cubic splines. They developed a pair of spline wavelets to solve the Sturm-Liouville equation with Dirichlet boundary conditions adapted to the interval [0, 1]. The wavelets at different levels are orthogonal with respect to the inner product \(\left \langle u',v'\right \rangle \) rather than \(\left \langle u,v\right \rangle \). The stiffness matrix is sparse, and its condition number is uniformly bounded.

On the other hand, Vampa et al. [7] have applied a spline-cubic-wavelet basis adapted to the interval with good results. In their work a modified wavelet-Galerkin method using B-spline scaling functions to solve boundary value problems is presented. This proposal combines variational equations with a collocation scheme and gives an approximation at an initial scale. Later, in [8] a refinement process using wavelets is developed, and the approximation is improved recursively with minimal computational effort. A disadvantage of this construction is the large condition number of the stiffness matrices.

Later, Cerna et al. [9] proposed several constructions of cubic spline-wavelet bases. They presented different constructions of stable cubic spline-wavelet bases on the interval. Quantitative properties of constructed cubic spline-wavelet and multiwavelet bases are studied.

Due to their desirable properties, such as sparse stiffness matrices and small condition numbers, constructions of wavelet bases, whose mth-order derivatives are orthogonal among different levels, are of particular interest and importance in computational mathematics. In a general context, a theoretical study over this construction can be found in [10].

In the present work, we propose the construction of a cubic spline-wavelet basis with compact support and first derivatives functions orthogonal between the different scales. This inner product leads to a sparse stiffness matrix with a condition number uniformly bounded. This is a very important advantage of the proposed method.

The structure of the paper is as follows: in Sect. 2 we introduced a brief description of a wavelet-Galerkin method to solve a second-order linear differential operator. The review of the concept of wavelet bases, multiresolution analysis (MRA) structure on the interval, basic properties of B-splines functions and cubic B-splines subspaces are presented in Sect. 3. Section 4 contains the technical details of a construction of wavelet B-splines bases. In Sect. 5 they are applied as testing for efficient solution of a differential equation. Finally, some concluding remarks are made in Sect. 6.

2 Wavelet-Galerkin Method

We consider the following one-dimensional linear boundary value problem on the interval I = [0, 1]:

$$\displaystyle \begin{aligned} \begin{array}{rcl} & {L}u (x) =-\dfrac{d}{dx} \left(p(x) \dfrac{du}{dx}\right )+q(x)u(x)=f(x) &\displaystyle {} \\ & u(0) =u(1)=0 , &\displaystyle \end{array} \end{aligned} $$
(1)

where p(x), q(x), and f(x) are continuous functions on I and u is a function in certain Hilbert space V . If Eq. (1) cannot be solved exactly, one has to rely on approximation methods. We seek an approximation \(\tilde {u}\) of u which lies in a certain finite-dimensional subspace \(\tilde {V}\subset V\).

Let \(~\left \langle \cdot ,\cdot \right \rangle \) be the inner product of the space V . Note that \(a(u,v)=\left \langle Lu,v\right \rangle \) defines a bilinear form on V × V , so that the variational or weak formulation corresponding to the problem Eq. (1) is to seek u ∈ V , such that

$$\displaystyle \begin{aligned} a(u,v)=\left\langle f,v\right\rangle ~~~\forall v\in V. {} \end{aligned} $$
(2)

The analogous finite-dimensional problem is to find \(\tilde {u} \in \tilde {V}\) such that

$$\displaystyle \begin{aligned} a(\tilde{u},\tilde{v})=\left\langle f,\tilde{v}\right\rangle \quad \forall \tilde{v}\in \tilde{V}. \end{aligned} $$
(3)

It is well known that if a(⋅, ⋅) is continuous, V -elliptic and \( \left \langle f,v\right \rangle \) is a continuous linear form in V , both problems Eqs. (2) and (3) have a unique solution (Lax-Milgram theorem [11]). From Céa’s lemma [11] the following error bounds are valid:

$$\displaystyle \begin{aligned} \Vert u - \tilde{u} \Vert^2_{V} \le \frac{C}{\gamma} inf _{v \in \tilde{V}} \Vert u - v \Vert^2_{V}, \end{aligned} $$
(4)

where C and γ are constants corresponding to continuity and coercivity of the bilinear form a(., .), and if h is a measure of the partition of I considered, then

$$\displaystyle \begin{aligned} \Vert u - \tilde{u} \Vert^2_V \le {C} h^{r} \vert u \vert^2_{H^{r+1}}, \end{aligned} $$
(5)

where r depends on the regularity of the solution.

Going back to Eq. (1), integrating by parts \(\left \langle Lu,v \right \rangle \), the associated bilinear form is

$$\displaystyle \begin{aligned} a(u,v) = \int_0^1 (p(x)u^{\prime}(x) v^{\prime}(x) + q(x) u(x) v(x)) ~dx , \end{aligned} $$
(6)

for u and v ∈ V 0 ⊂ L 2(I), the subspace of functions with homogeneous boundary conditions. Let { Φ1, Φ2, …, ΦN} a basis of \(\tilde {V}\) and the approximate solution of the given equation be \(\tilde {u}=\sum _{k=1}^{N}\alpha _{k}\Phi _{k}\). Replacing in Eq. (3) we have to determine α k in a way that \(\tilde {u}\) behaves as if it is a true solution in \(\tilde {V}\), i.e.,

$$\displaystyle \begin{aligned} \sum_{k=1}^{N}\alpha _{k}~a(\Phi _{k},\Phi _{n})=\left<f,\Phi _{n}\right>,\quad n=1,2,\ldots ,N.{} \end{aligned} $$
(7)

We then arrive at the problem of solving a matrix equation

$$\displaystyle \begin{aligned} A{\alpha }=b , {} \end{aligned} $$
(8)

where A(n, k) = a( Φk, Φn) , \( b_{n}=\left \langle f,\Phi _{n}\right \rangle \), and α = (α k).

Condition Number of a Matrix

It is known that a linear system AX = Y  has a unique solution X for every Y  if the square matrix A is invertible. It is often observed that for two close values of Y  and Y, X and X′ are far apart. Such a linear system is called badly conditioned. Thus data Y  is expected to be fairly accurate. Condition number of A is given by

$$\displaystyle \begin{aligned} cond (A)= \parallel A\parallel \parallel A^{-1}\parallel, \quad cond (A)\geq 1, \end{aligned} $$
(9)

(∥ . ∥ is a matrix norm) and when A is symmetric, in norm 2 is

$$\displaystyle \begin{aligned} cond(A)=\dfrac{\max_{i} \mid \lambda_{i}(A)\mid}{\min_{i} \mid \lambda_{i}(A)\mid}, \end{aligned} $$
(10)

where λ i(A) are matrix A eigenvalues. cond(A) is a measure of the stability of the linear system under perturbation of the data Y .

For computational aspects, it is convenient to have a sparse matrix A, i.e., with a high proportion of entries 0, with a low condition number, and basis functions with a small support, regularity, and orthogonality. It is also desirable that the basis functions should be simple to evaluate, differentiate, and integrate. Finally, one wants the scheme to be refinable to allow that the approximation \({\tilde u}\) can be improved, modifying recursively the subspace \(\tilde {V}\). If the basis functions Φk are generated from dilations and translations of a mother generating function, calculations become simpler. This suggests considering a MRA structure. Furthermore, if self-similarity given by scale relations is satisfied, a hierarchical approximation to the exact solution is obtained, and it is possible to refine and improve the accuracy of the approximate solution.

3 Wavelet Analysis on the Interval

MRA schemes [12] provide a powerful mathematical tool for function appro-ximation and multiscale representation of the solution of differential equations corresponding to the problem in Eq. (1). It is important to point out that, as these structures are generally defined on the whole real line, they must be adequately restricted to the interval I where the differential problem is formulated.

Many constructions of wavelet bases on the interval have been proposed. In [13] a family of orthonormal wavelets on a bounded interval by restricting Daubechies scaling functions and wavelets to [0, 1] was constructed by Meyer. Later, Chui and Quak [14] obtained spline-wavelet bases of L 2[0, 1].

When a MRA on an interval is proposed, the usual strategy is to start from a MRA on \( L_{2} (\mathbb {R})\) and then use a finite set of suitable translates φ j,k of the original scaling function and a finite set of specially constructed boundary scaling functions.

3.1 Multiresolution Analysis

As described by Chui [12], a MRA on \(\mathrm {L}_2(\mathbb {R})\) consists of a sequence of embedded closed subspaces \(V_j \subset \mathrm {L} _2( \mathbb {R})\), \(j \in {\mathbb {Z}}\),

$$\displaystyle \begin{aligned} \cdots \subset V_{-2}\subset V_{-1}\subset V_{0}\subset V_{1} \subset V_{2}\subset\cdots \end{aligned}$$

that satisfies several properties and typically is constructed by first identifying the subspace V 0 and the scaling function ϕ. Denoting by

$$\displaystyle \begin{aligned} \phi _{j,k}(x):=2^{j/2}\phi (2^{j}x-k) \ , \end{aligned} $$
(11)

for each \(j\in \mathbb {Z}\), the family \(\{\phi _{j,k}:k\in \mathbb {Z}\}\) is a basis of V j. Associated with the scaling function ϕ, there exists a function ψ called the mother wavelet such that the collection \(\{\psi (x-k), k \in \mathbb { Z}\}\) is a Riesz basis [12] of W 0, the orthogonal complement of V 0 in V 1. If we consider

$$\displaystyle \begin{aligned} \psi _{j,k}(x):=2^{j/2}\psi (2^{j}x-k) \ , \end{aligned} $$
(12)

for each \(j\in \mathbb {Z}\), the family \(\{\psi _{j,k}:k\in \mathbb {Z}\}\) is a basis of W j, the orthogonal complement of V j in V j+1. It is noteworthy that wavelets allow the refinement of the representation space taking into account that

$$\displaystyle \begin{aligned} V_{j+1}= V_j \oplus W_j. \end{aligned} $$
(13)

3.2 MRA on the Interval

As it was mentioned above, multiresolution structures in \(\mathrm {L} _2( \mathbb {R})\) have to be restricted to L2(I), to solve boundary value problems on I (see [15] and [16]). If Haar bases are considered for \(\mathrm {L} _2( \mathbb {R})\), it suffices to take the restrictions of these functions to I. Things are not so trivial when one starts from smoother wavelets on the line. It is not clear a priori how to adapt the functions in such a way that an orthogonal basis is obtained. Several solutions have been proposed for this problem. A first solution is to extend the functions supported on I to the whole line by making them vanish for xI. This approach may introduce a discontinuity at the edges, and consequently, large wavelet coefficients are obtained near the edges and too many wavelets are used. Another alternative consists in periodizing, but, unless the function itself is already periodic, it again introduces a discontinuity.

Consequently, restriction to I entails some changes in the concepts of a MRA. The aim is to produce Riesz bases for the spaces V j consisting of a finite family of translates of the original scaling function ϕ j,k and a finite family of special boundary scaling functions and to produce the bases of the complementary subspaces W j consisting of a finite set of translates of the wavelet function ψ j,k and a finite set of special boundary wavelets.

In this work, a MRA on the interval with B-splines as scaling functions is described, and it is constructed using orthogonality conditions in a way similar as a MRA in \(\mathrm {L}_2( \mathbb {R})\).

3.2.1 B-Spline Subspaces

Spline wavelets are extremely regular and usually symmetric or antisymmetric. They can be designed to have compact support, and they have explicit expressions which facilitate not only theoretical formulation but also numerical implementations with a computer, see [15] and [17].

Let us consider B-spline functions of order m + 1, that is, connected piecewise polynomials of degree m having m − 1 continuous derivatives. The joining points are called knots, and they are typically equally spaced and positioned at the integers.

These functions can be defined recursively by convolutions [12]:

$$\displaystyle \begin{aligned} \begin{array}{rcl} \varphi_{1} (x) & =&\displaystyle \chi_{[0,1]}(x), \\ \varphi_{m+1} (x) & =&\displaystyle \varphi_{m} \ast \varphi_{1}(x) \end{array} \end{aligned} $$
(14)

and constitute the scaling functions of the MRA structure.

Among many properties that B-splines have, the most important ones for our method are the following:

  • Two-scale relation

    $$\displaystyle \begin{aligned} \varphi _{m+1}(x)=2^{-m}\sum_{k=0}^{m+1}\binom{m+1}{k}\varphi _{m+1}(2x-k). {} \end{aligned} $$
    (15)
  • Differentiation

    $$\displaystyle \begin{aligned} \frac{d^{k}}{dx^{k}}\varphi _{m+1}(x)=\Delta ^{k}\varphi _{m+1-k}(x), \end{aligned} $$
    (16)

    where Δk is the k-order difference operator and 1 ≤ k ≤ m − 1, i.e., corresponds to a reduction of the spline degree by k.

  • Inner products

    $$\displaystyle \begin{aligned} \begin{array}{rcl} {} \int_{\mathbb{R}} \varphi_{m+1}(x-k) \, \varphi_{n+1}(x-l) \, dx & = &\displaystyle \varphi_{m+n+2}(n+1+l-k), \end{array} \end{aligned} $$
    (17)

    i.e., simple evaluations of higher-order splines at integer points.

    This property is obtained from the convolution product and is useful in weak formulations of differential problems.

In the B-spline MRA, V 0 is the subspace generated by the translates of the scaling function φ m+1 and for each \( j\in \mathbb {Z}\), the family \(\{\varphi _{m+1,j,k}:k\in \mathbb {Z}\}\) where

$$\displaystyle \begin{aligned} \varphi _{m+1,j,k}(x):=2^{j/2}\varphi_{m+1} (2^{j}x-k) \ , \end{aligned} $$
(18)

is a basis of V j [15, 16]. These subspaces V j constitute a MRA on \(\mathrm {L}_2( \mathbb {R})\).

3.2.2 Scaling Cubic B-Spline Subspaces

In this section, we introduce a cubic B-spline basis on the interval satisfying Dirichlet boundary conditions. This construction is based on the spline-wavelet bases defined by Chui and Quak in [14]. The adaptation of these bases to boundary conditions can be found in [19].

In this work, we use B-splines of order m = 3. As they are C 2 functions, a hierarchical approximation of the solution for the second-order problem Eq. (1) can be obtained, and accurate results can most likely be expected [18].

In the cubic B-spline MRA framework, the scaling function φ 4 has support on [0, 4] (Fig. 1), and \(\{ \varphi _{4,j,k}(x):=2^{j/2}\varphi _{4} (2^{j}x-k): \, k\in \mathbb {Z}\}\) is a basis of V j.

Fig. 1
figure 1

Scaling function φ 4

It can be written explicitly as

$$\displaystyle \begin{aligned} \varphi_{3+1}(x)= \left\lbrace \begin{array}{cc} \dfrac{x^3}{6}, & x \in [0,1] \\ -\dfrac{x^3}{2} + 2x^2 -2x+\dfrac{2}{3}, & x \in [1,2] \\ \dfrac{x^3}{2} - 4x^2 - 10x - \dfrac{22}{3}, & x \in [2,3] \\ \dfrac{(4-x)^3}{6}, & x \in [3,4] \end{array} \right. . {} \end{aligned} $$
(19)

To simplify the notation we call φ(x) = φ 4(x).

Consider two boundary functions presented by Cěrná et al. in the article [9]: \(\varphi _{b_{1}}\) y \(\varphi _{b_{2}}\). They are piecewise cubic polynomials:

$$\displaystyle \begin{aligned} \varphi_{b_{1}}(x)= \left\lbrace \begin{array}{cc} \dfrac{7x^3}{4}- \dfrac{9x^2}{2} +3x , & x \in [0,1] \\ \dfrac{(2-x)^3}{4}, & x \in [1,2] \end{array} \right. {} \end{aligned} $$
(20)

and

$$\displaystyle \begin{aligned} \varphi_{b_{2}}(x)= \left\lbrace \begin{array}{cc} -\dfrac{11x^3}{12} + \dfrac{3x^2}{2} , & x \in [0,1] \\ \dfrac{7x^3}{12}- 3x^2 + \dfrac{9x}{2} - \dfrac{3}{2} , & x \in [1,2] \\ \dfrac{(3-x)^3}{4}, & x \in [2,3] \end{array} \right. {}. \end{aligned} $$
(21)

If \(\varphi _{j,k}(x):= 2^{j/2} \varphi (2^{j}x-k), \, \text{for} \, j \in \mathbb {Z}\), the families

$$\displaystyle \begin{aligned} \Phi^{inn}_{j}= \left\lbrace\ \varphi_{j,k}(x):k=0,1,\ldots, 2^{j} -4 \right\rbrace , {} \end{aligned} $$
(22)

correspond to inner scaling functions and

$$\displaystyle \begin{aligned} \Phi_{j}^{bound}=\left\lbrace\, \varphi_{b_{1}}(2^j x),\, \varphi_{b_2}(2^j x),\, \varphi_{b_2}(2^j(1-x)),\, \varphi_{b_1}(2^j(1-x))\right\rbrace , {} \end{aligned} $$
(23)

are boundary scaling functions.

In Fig. 2 you can see inner and boundary scaling functions.

Fig. 2
figure 2

Basis Functions of V j, j = 3

Now, considering the families Eqs. (22) and (23), the scaling space V j is

$$\displaystyle \begin{aligned} V_{j}=\text{span} \, \Phi_{j}, \quad \text{where} \quad \Phi_{j} =\Phi_{j}^{inn} \cup \Phi_{j}^{bound}. {} \end{aligned} $$
(24)

(φ j,k are normalized so that \(\parallel \varphi ^{\prime }_{j,k}\parallel _{L^{2}[0,1]}=1\)).

The dimension of the spaces V j is 2j + 1, and they constitute a MRA on L 2[0, 1] [19].

In the next section, the construction of Wavelet spaces W j taking into account the decomposition Eq. (13) will be described.

4 Wavelet B-Splines: Orthogonal Basis

In the following, we build a basis for the wavelet spaces W j with an orthogonality requirement, proposing a mother wavelet ψ ∈ W 0.

4.1 Construction of a Mother Wavelet

As W 0 ⊂ V 1, there exists a {d k} sequence such that

$$\displaystyle \begin{aligned} \psi(x)=\sum_{k \in \mathbb{Z}} {d_{k}} \, \varphi(2x - k), \quad x \in \mathbb{R}.{} \end{aligned} $$
(25)

The coefficients {d(k)} must be found such that the orthogonality requirement

$$\displaystyle \begin{aligned} \left\langle \psi'(x),\varphi'(x-l)\right\rangle =0 \quad \forall l \in \mathbb{Z}, {} \end{aligned} $$
(26)

is satisfied.

Fixed \(l \in \mathbb {Z}\), this means

$$\displaystyle \begin{aligned} \begin{array}{rcl} \left\langle \psi'(x),\varphi'(x-l)\right\rangle & = &\displaystyle 2 \left\langle\sum_{k \in \mathbb{Z}}\left[{d _{k}} \varphi' (2x-k)\right],\varphi'(x-l)\right\rangle \\ & = &\displaystyle 2 \sum_{k \in \mathbb{Z}} {d_{k}} \left\langle \varphi'(2x-k),\varphi'(x-l)\right\rangle. {} \end{array} \end{aligned} $$
(27)

Considering the intersection of the supports of scaling functions, index k takes only values 2l − 4 < k < 2l + 8.

So we obtain

$$\displaystyle \begin{aligned} \begin{array}{rcl} \left\langle \psi'(x),\varphi'(x-l)\right\rangle & = &\displaystyle 2 \sum \limits_{k=2l-3}^{2l+7} {d_{k}} \left\langle \varphi' (2x-k),\varphi'(x-l)\right\rangle.{} \end{array} \end{aligned} $$
(28)

Rewriting the two-scale relation Eq. (15) as \(\varphi (x)= \sum \limits _{n=0}^{4} h_{n}\, \varphi (2x-n)\) and using properties of B-splines, the terms in the sum of Eq. (28) have the following expression:

$$\displaystyle \begin{aligned} \left\langle \varphi' (2x-k),\varphi'(x-l)\right\rangle = -2 \sum \limits_{n=0}^{4} h_{n} \, \varphi'' _{8}(4+2l+n-k).{} \end{aligned} $$
(29)

Hence,

$$\displaystyle \begin{aligned} \begin{array}{rcl} \left\langle \psi'(x),\varphi'(x-l)\right\rangle & = &\displaystyle -4 \sum \limits_{k=2l-3}^{2l+7} {d_{k}} \sum \limits_{n=0}^{4} h_{n}\, \varphi'' _{8}(4+2l+n-k). {} \end{array} \end{aligned} $$
(30)

It remains to find d k values. If we call

$$\displaystyle \begin{aligned} \begin{array}{rcl} q_{1}(z):=\sum \limits_{l \in \mathbb{Z}} {d_{2l+1}} \, z^{2l+1}, & \quad \quad &\displaystyle q_{2}(z):= \sum \limits_{l \in \mathbb{Z}} {d_{2l}} \, z^{2l}, \end{array} \end{aligned} $$

the orthogonality condition Eq. (26) is

$$\displaystyle \begin{aligned}B(z) \, (q_{1}(z)~ ~ q_{2}(z))^{T}= 0.\end{aligned} $$

where

$$\displaystyle \begin{aligned}\left( B(z)\right)^{T}=\left[\begin{array}{c} -\dfrac{1}{240} z^7 - \dfrac{39}{80}z^5 + \dfrac{59}{120}z^{3} + \dfrac{59}{120}z -\dfrac{39}{80} z^{-1} - \dfrac{1}{240}z^{-3}\\ ~ \\ -\dfrac{7}{60} z^{6} -\dfrac{8}{15} z^{4} +\dfrac{13}{10}z^{2} - \dfrac{8}{15}-\dfrac{7}{60}z^{-2} \end{array}\right].\end{aligned} $$

One solution is:\(\left [\begin {array}{c} q_{1}(z)\\ q_{2}(z)\\\end {array}\right ]= \left [\begin {array}{c} -28 \, z^5-184\, z^3- 28 \, z^{1}\\ z^6+119 \, z^4+119 \, z^{2}+1\\ \end {array}\right ],\)

and therefore, the wavelet ψ is given by

$$\displaystyle \begin{aligned} \psi(x)=\sum \limits_{k=0}^{6} d_{k} \varphi (2x - k), \quad x \in \mathbb{R}, {} \end{aligned} $$
(31)

with \(\left [d_{0}, d_{1}, \ldots , d_{6}\right ] = \left [ 1,-28,119,-184, 119, -28, 1\right ]\).

ψ(x) is supported on \(\left [0,5\right ]\), it satisfies the orthogonality above conditions. Moreover ψ(x) is symmetric (Fig. 3).

Fig. 3
figure 3

Wavelet

4.2 Wavelet Basis

We propose a suitable basis for the W j spaces, considering two boundary wavelets \(\psi _{b_{1}},\, \psi _{b_{2}} \in W_{0}\) that are defined by Cěrná et al. [9]:

$$\displaystyle \begin{aligned} \begin{array}{rcl} \psi_{b_{1}}(x) & =&\displaystyle c_{0}^{b_1} \varphi_{b1} (2 \, x)+ c_{1}^{b_1} \varphi_{b_2} (2 \, x)+ \sum \limits_{k=2}^{4} c_{k}^{b_1} \varphi (2 \, x-k+2), \end{array} \end{aligned} $$
(32)
$$\displaystyle \begin{aligned} \begin{array}{rcl} \psi_{b_2}(x) & =&\displaystyle c_{0}^{b2} \varphi_{b_1} (2 \, x)+ c_{1}^{b_2} \varphi_{b_2} (2 \, x)+ \sum \limits_{k=2}^{6} c_{k}^{b_2} \varphi (2 \, x-k+2), {} \end{array} \end{aligned} $$
(33)

where

$$\displaystyle \begin{aligned} \begin{array}{rcl} \left[ c_{0}^{b_{1}}, c_{1}^{b_1}, \ldots, c_{4}^{b_1}\right] & =&\displaystyle \left[\dfrac{939}{70},\dfrac{-393}{20},\dfrac{6233}{560},-4,1\right], \\ \left[ c_{0}^{b_2}, c_{1}^{b_2}, \ldots, c_{6}^{b_2}\right] & =&\displaystyle \left[\dfrac{1444}{953},\dfrac{1048}{1871},\dfrac{-1340}{209},\dfrac{545}{48},\dfrac{-6839}{655},7,-3\right]. \end{array} \end{aligned} $$

Boundary wavelets \(\psi _{b_{1}}\), \(\psi _{b_{2}}\) have supports on [0, 3] and [0, 4], respectively. They have two vanishing moments and satisfy the orthogonality condition Eq. (26) (Fig. 4).

Fig. 4
figure 4

Boundary wavelets of W j, j = 3

Using those functions, the set of boundary wavelets (Fig. 4) is defined:

$$\displaystyle \begin{aligned} \Psi_{j}^{bound}=\left\lbrace\, \psi_{b_1}(2^jx), \psi_{b_2}(2^j x), \psi_{b_2}(2^j(1-x)), \psi_{b_1}(2^j(1-x))\right\rbrace . {}\end{aligned} $$
(34)

Note that as V j+1 = V j ⊕ W j, the dimension of W j is 2j. Thus, a basis for these spaces is

$$\displaystyle \begin{aligned} \Psi_{j}= \Psi_{j}^{inn} \cup \Psi_{j}^{bound}, {}\end{aligned} $$
(35)

where \( \Psi _{j}^{inn}\) is the set of inner wavelets (Fig. 5),

$$\displaystyle \begin{aligned} \Psi^{inn}_{j}=\left\lbrace \psi_{j,k}: k=0,1,\ldots,2^{j}-5 \right\rbrace , {}\end{aligned} $$
(36)

and \(\psi _{j,k}(x):= 2^{j/2} \psi (2^{j}x-k), \, \text{for each} \, j \in \mathbb {Z}\).

Fig. 5
figure 5

Inner wavelets of W j, j = 3

The functions in Ψj are normalized so that \(\parallel \psi ^{\prime }_{j,k}\parallel _{L_{2}(0,1)}=1\).

Remark 1

Due to V j ∩ W j = {0} and Eq. (13),

$$\displaystyle \begin{aligned} \dim ( V_{j}+W_{j})= \dim V_{j} + \dim W_{j}= 2^{j+1}+1=\dim (V_{j+1}). {} \end{aligned} $$
(37)

Thus,

$$\displaystyle \begin{aligned} V_{j+1}=V_{j_{0}}\oplus W_{j_{0}} \oplus W_{j_{0}+1} \ldots \oplus W_{j}, \quad \text{for} \, j_{0} \geq 3. \end{aligned}$$

For J > j 0, a wavelet basis for V J+1 is,

$$\displaystyle \begin{aligned} G_{J}= \Phi_{j_{0}} \cup \bigcup \limits_{j=j_{0}}^{J} \Psi_{j} {} = \left\lbrace g_{1},g_{2}, \ldots,g_{2^{J+1}+1} \right\rbrace, \end{aligned} $$
(38)

where \(g_{i} \in \Phi _{j_0}\) for \(i=1,2, \ldots , 2^{j_0}+1\) and g i ∈ Ψj for \(i=2^{j_0}+2, \ldots , 2^{J+1}+1\) and j = j 0…, J.

Remark 2

If \( v \in V_{j_{0}}\), w j ∈ W j, from the orthogonality condition Eq. (26) it is true that

$$\displaystyle \begin{aligned} \begin{array}{rcl} \langle v',w_{j_{1}}^{\prime}\rangle & =&\displaystyle 0, \\ {}\\ \langle w_{j_{1}}^{\prime},w_{j_{2}}^{\prime} \rangle & =&\displaystyle 0\quad \text{for} \, j_{1}\neq j_{2}. \end{array} \end{aligned} $$
(39)

5 Numerical Example

Consider the following problem:

$$\displaystyle \begin{aligned} \left\{\begin{array}{ccc} -u''& =f & \text{on} ~(0,1)\\ u(0)& =u(1)& =0 \quad \end{array}\right. {}, \end{aligned} $$
(40)

with \(f(x)=(70 \, \pi )^{2} \, \sin {}(70 \, \pi \, x)-\pi ^{2} \, \cos \left ( \pi \, x + \dfrac {\pi }{2}\right )\).

Substitution of the approximation,

using the basis Eq. (38) into the weak formulation, Eq. (3) results in

or, in matrix form

(41)

where K J is the stiffness matrix,

$$\displaystyle \begin{aligned} {\mathbf{K}}_{J}:= \left \langle g_{i}^{\prime}, g_{j}^{\prime} \right\rangle_{1\leq l,i \leq 2^{J+1}+1}. {}\end{aligned} $$
(42)

This system of linear algebraic equations is solved for α, the vector of 2J+1 + 1 × 1 parameters.

As a consequence of the orthogonality requirement, the matrix K J is sparse and each block is diagonal (Fig. 6). The condition number \(cond(K_{J})=\dfrac {\lambda _{max}}{\lambda _{min}}\) with respect to 2-norm is uniformly bounded. This assertion is confirmed by numerical computation of the condition number of the matrix K J for J = 3, …, 9 (see Table 1).

Fig. 6
figure 6

Structure of matrices K J, J = 4, 5

Table 1 Condition number of K J

The exact solution of the problem is

$$\displaystyle \begin{aligned} u(x)=\sin{}(70 \, \pi \, x)-\cos\left( \pi \, x + \dfrac{\pi}{2}\right). {}\end{aligned} $$
(43)

For J = 1, 2, …, let \(e_{J} :=\dfrac {\left \|u_{J+1}-u\right \|}{\left \|u\right \|}\) the approximation relative errors.

Although the exact solution is very oscillatory, good convergence results were obtained, which are shown in Table 2 and Fig. 7.

Fig. 7
figure 7

Exact and approximate solutions u J, J = 3, 4, 5, 8. (a) Exact solution. (b) Approximate solution for J = 3. (c) Approximate solution for J = 4. (d) Approximate solution for J = 5. (e) Approximate solution for J = 8

Table 2 Error e J

6 Conclusions

Due to the good properties of the proposed wavelet cubic B-splines basis, such as multiresolution analysis and the orthogonal characteristic according to inner product \(\left \langle u',v'\right \rangle \), the numerical resolution of boundary value problems is easy and efficient. The matrix K J involved in the linear system is block diagonal (each block is a banded matrix), and its condition number is bounded independently of the scale.

The work presented can be extended in several ways. The implemented technique using wavelet cubic B-splines bases could be well suited for solving nonlinear and higher-dimensional differential equations. We hope to address some of these problems in a future paper.