1 Introduction

Classical interpolation theory deals with the continuous representation of discrete data through various types of interpolants which are sufficiently smooth with the possible exception of a finite number of points. On the other hand, a great number of scientific experimental data and real-world signals are highly complex and their graphs are effectively never smooth; see, for instance, (Wang et al. 2021; Geng et al. 2021; Sun et al. 2006; Barnsley 1996; Timbo et al. 2009; Onali and Goddard 2011).

In order to describe such irregular functions or signals more accurately, Barnsley (1986) introduced the concept of fractal interpolation function (FIF) based on the theory of iterated function system (IFS) (Hutchinson 1981; Barnsley and Demko 1985). The construction of various types of FIFs and the investigation into their properties comprises one of the foremost topics in the theory of fractal functions. It has gone through several generalizations and extensions over the last few decades to generate smooth fractal splines (Barnsley and Harrington 1989; Chand and Kapoor 2006; Massopust 2010; Navascués and Sebastián 2006), fractal rational and trigonometric interpolations (Chand et al. 2014; Tyada et al. 2021; Viswanathan and Chand 2015), zipper FIFs (Chand et al. 2020), and so forth.

A suitable subclass of FIFs elucidates connections between the concept of univariate FIF and classical approximation theory. This subclass was proposed by Barnsley (1986, Example 2, Page 309) and its elements were later coined \(\alpha \)-fractal functions to emphasize their dependency on the vertical scaling vector \(\alpha \) which affects the shape and dimension of the graph of the associated fractal function. Navascués and her collaborators extensively investigated the various approximation theoretic issues in their work (Navascués 2005; Navascués and Chand 2008; Vijender et al. 2021; Navascués and Massopust 2019; Viswanathan et al. 2016).

Quasi-interpolation is an indispensable tool in the approximation of functions which has been investigated assiduously both in theory and in engineering applications; see for instance (Chen and Wu 2006; Duan and Rong 2013; Zhang et al. 2019; Wu and Zhang 2013) and the references therein. The major advantage of quasi-interpolation is that it provides a solution directly without solving a system of linear equations. Based on the multiquadric (MQ) functions which were conceptualized by Hardy (1971), Beatson and Powell (1992) first proposed three different types of univariate MQ quasi-interpolants associated with scattered centers in a bounded interval. Wu and Schaback (1994) made some improvements to one of this quasi-operators and studied its approximation and shape-preserving aspects.

By utilizing the definition of MQ B-splines, Beatson and Dyn (1996) investigated MQ quasi-interpolation theoretically. The quasi-interpolation operator defined via MQ functions has many applications such as the solution of PDEs (Chen and Wu 2007; Bao and Song 2014), the approximation of derivatives of a function (Ma and Wu 2009), and the solution of shock wave equations (Hon and Wu 2000).

The quasi-interpolant preserves several basic properties of MQ quasi-interpolants such as the smoothness, simplicity, efficiency, and the capability of approximating higher order derivatives. It is found that both fractal interpolation and fractal quasi-interpolation are useful in the approximation of functions. But in the literature, there has not been a common modality between them. The objective of this paper is to create a bridge between these two diverse fields and propose a new object called fractal quasi-interpolation to approximate either very irregular functions or smooth functions having a highly irregular derivative.

In this article, we first present the construction of multiquadric fractal functions from the classical multiquadric functions. Further, we investigate their differentiability and suitability for constraint approximation. Using the translates of a fractal MQ function as base functions, we construct a fractal approximant for a function f similar to the classical analog given in Wu and Schaback (1994). We propose two quasi-interpolation operators in this article. The first quasi-interpolation operator \(L^{\alpha }_Cf\) requires the values of the derivative of f at the endpoints of the domain whereas the second quasi-interpolation operator \(L^{\alpha }_Df\) does not.

Shape preserving aspects and convergence results for these two operators are investigated and it is shown that the order of convergence is \(O(h^2)\) in the case of \(L^{\alpha }_Cf\) given some restrictions on the scaling vector \(\alpha \). A similar order of convergence for \(L^{\alpha }_Df\) can be obtained provided certain conditions on the scaling vector and the shape preserving constant c of the multiquadric functions are imposed. Examples are provided to support the theoretical results of the approximation of functions by the operators \(L_C^{\alpha }f\) and \(L_D^{\alpha }f\).

In various research domains, a multitude of challenges emerge where traditional functions characterized by simple geometric structures prove insufficient. These challenges cut across diverse fields, encompassing finance, various types of differential equations, ecology, turbulence modeling, and more (Liu et al. 2020; Ortmann and Buhmann 2024; Brambila 2017). The primary aim of this article is to address theoretical issues concerning the approximation of irregular functions, as well as regular functions exhibiting irregular derivatives. Furthermore, it seeks to tackle approximation problems associated with irregular or fractal functions, such as delay differential equations (Rihan 2021), ECG dynamics (Golany et al. 2021), and financial modeling (Pan and Zhang 2023). Moreover, a plethora of other applications can be explored in related articles and their respective references (Wu and Duan 2016; Gao and Chi 2014; Gao and Zhang 2018).

The structure of this article is arranged as follows. Section 2 provides some basics and introduces the theory of fractal functions to the degree that it is required in the subsequent parts. Section 3 introduces the construction of the fractal MQ functions and their smoothness and shape-preserving properties are presented. In Sect. 4, a novel fractal quasi-interpolation operator \(L_C^{\alpha }f\) is introduced and its shape preserving and convergence properties are derived. In Sect. 5, we introduce the second fractal quasi-interpolation operator \(L_D^{\alpha }f\) and study results similar to those in the previous section using various examples.

2 Background and preliminaries

For the benefit of the reader, we provide in this section the basics of IFSs and the construction of fractal functions from a suitable IFS. For more details, the reader may consult (Hutchinson 1981; Barnsley and Demko 1985; Barnsley 1986; Massopust 2016; Navascués 2005).

In the sequel, we use the following notation. For \(N\in {\mathbb {N}}:= \{1,2,3,\ldots \}\), we set \({\mathbb {N}}_N := \{1, \ldots , N\}\), \({\mathbb {N}}_N^- := -{\mathbb {N}}_N\), and \({\mathbb {N}}_{N,0} :={\mathbb {N}}_N\cup \{0\}\).

An IFS \(\mathcal {F}:= \{X;w_i: i\in {\mathbb {N}}_N \}\) consists of a collection of continuous functions from a metric space (Xd) to itself. \(\mathcal {F}\) is called a hyperbolic IFS if each \(w_i\) is contractive on X, i.e., its Lipschitz constant

$$\begin{aligned} s_i:= {{\,\textrm{Lip}\,}}(w_i):= \sup _{x,y\in X,. x\ne y} \frac{d(w_i(x), w_i(y))}{d(x,y)} < 1. \end{aligned}$$

As we deal exclusively with hyperbolic IFSs, we will drop the adjective “hyperbolic" in the following unless it is necessary.

Let \(\mathcal {H}(X) := \{ A\subseteq X : A \text { is non-empty and compact} \}\). The Hausdorff-Pompeiu metric h on \(\mathcal {H}(X)\) is defined by

$$\begin{aligned} h(A,B):= \max \{d(A,B),d(B,A)\}, \end{aligned}$$

where \(d(A,B):=\max \{d(x,B):x \in A\}\) and \(d(x,B):=\min \{d(x,y):y\in B\}\). It is known that if (Xd) is a complete metric space, then \((\mathcal {H}(X),h)\) is also a complete metric space, named the space of fractals in Barnsley (1993).

Define the Huchinson map (Hutchinson 1981) \(W : \mathcal {H}(X)\rightarrow \mathcal {H}(X)\) by

$$\begin{aligned} W(A):= \bigcup _{i=1}^{N} w_i(A), \quad \forall A\in \mathcal {H}(X). \end{aligned}$$

If the IFS \({\mathcal {F}}\) is hyperbolic then W is a contraction on \((\mathcal {H}(X),h)\) with contraction factor \(s :=\max \limits _{i\in {\mathbb {N}}_N} |s_i|\). Thus, by the Banach fixed point theorem, there exists a unique \(G \in \mathcal {H}(X)\) such that

$$\begin{aligned} G=\lim _{m\rightarrow \infty }W^{\circ m} (A), \quad \text { for any}\, A \in \mathcal {H}(X), \end{aligned}$$

where \(W^{\circ m}\) denotes the m-fold composition of W with itself. The fixed point G is known as the attractor of or deterministic fractal generated by the IFS \({\mathcal {F}}\).

Next, we would like to construct a suitable IFS whose attractor is the graph of a continuous function interpolating a given set of data or interpolation points.

For this purpose, consider a set of interpolation points

$$\begin{aligned} \{(x_j,y_j)\in [x_0, x_N]\times {\mathbb {R}}: -\infty<x_0<...<x_N<+\infty \wedge j\in \mathbb {N}_{N,0}\}. \end{aligned}$$

Let \(\{u_i\}_{i\in \mathbb {N}_{N}}\) be a set of homeomorphisms from \(I:=[x_0,x_N]\) to \(I_i:=[x_{i-1},x_{i}]\) satisfying

$$\begin{aligned} u_i(x_0)=x_{i-1},\quad u_i(x_N)=x_{i},\quad i\in \mathbb {N}_{N}. \end{aligned}$$
(1)

For \(i\in {\mathbb {N}}_{N}\), construct functions \(v_i: I \times {\mathbb {R}}\rightarrow {\mathbb {R}}\) such that \(v_i\) is continuous in the first variable and Lipschitz continuous in the second variable with Lipschitz constant \(s_i<1\):

$$\begin{aligned} |v_i(x,y_1) - v_i(x,y_2)| \le s_i |y_1 - y_2|, \quad \forall \, i\in \mathbb {N}_{N}. \end{aligned}$$
(2)

Further, impose the following join-up conditions:

$$\begin{aligned} v_i(x_0,y_0)=y_{i-1}, \quad v_i(x_N,y_N)=y_{i},\quad i\in \mathbb {N}_{N}. \end{aligned}$$
(3)

Now, define an IFS whose maps \(w_i: I\times {\mathbb {R}}\rightarrow I_i \times {\mathbb {R}}\) are given by

$$\begin{aligned} w_i(x,y):=(u_i(x),v_i(x,y)), \quad (x,y)\in I\times {\mathbb {R}}, \;\;i\in \mathbb {N}_{N}. \end{aligned}$$

Such an IFS is sometimes called an interpolation IFS and we denote it by

$$\begin{aligned} \mathcal {I}:=\{I\times {\mathbb {R}};w_i(x,y)=(u_i(x),v_i(x,y)), i\in \mathbb {N}_{N}\}. \end{aligned}$$

As the maps \(w_i\) in the IFS \(\mathcal {I}\) are all contractive, \(\mathcal {I}\) has a unique attractor G that satisfies the self-referential set-valued equation

$$\begin{aligned} G= \bigcup _{i\in \mathbb {N}_{N}}w_i(G). \end{aligned}$$
(4)

Let \(C(I)=\{f:I \rightarrow \mathbb {R}: f ~ \text {is continuous on}~ I\}\) and \( \mathcal {G}:=\{g\in C(I):g(x_0)=y_0 \wedge g(x_N)=y_N\}.\) Define a metric on \( \mathcal {G}\) by \(\rho (h,g) :=\max \{ | h(x)-g(x) | : x\in I \}\), \(g,h\in \mathcal {G}\). Since \( \mathcal {G}\) is closed in C(I), \((\mathcal {G},\rho )\) is a complete metric space. Define a Read-Bajraktarevic (RB) operator (Massopust 2016) T on \((\mathcal {G},\rho )\) by

$$\begin{aligned} Tg(x) := \sum _{i=1}^{N}v_i(u_i^{-1}(x),g\circ u_i^{-1}(x))\chi _{I_i^*}(x), \quad x\in I, \end{aligned}$$
(5)

where \(\chi _K\) denotes the characteristic function of a set K, \(I_i^*=[x_{i-1},x_i), i\in {\mathbb {N}}_{N-1}\), \(I_N^*=[x_{N-1},x_N]\). The following theorem provides the existence of a fractal function arising from an interpolating IFS.

Theorem 1

(Barnsley 1986, Theorem 1 Massopust 2016) The IFS \(\mathcal {I}\) has a unique attractor G which is the graph of a continuous function \(f^*:I\rightarrow {\mathbb {R}}\) satisfying the interpolation conditions \(f^*(x_j)=y_j\), \(j\in {\mathbb {N}}_{N,0}\). Moreover, if \(\mathcal {G}\) is endowed with the uniform metric \( \rho \), then \(f^*\) is the unique fixed point of the operator T acting on \({\mathcal {G}}\).

Since \(f^*\) is the fixed point of T given in (5), \(f^*\) obeys the self-referential functional equation

$$\begin{aligned} f^* = \sum _{i=1}^{N} v_i\left( u_i^{-1},f^*\circ u_i^{-1}\right) \chi _{I_i^*} \end{aligned}$$
(6)

on I. This function \(f^*\) is termed as a fractal interpolation function (FIF) associated with the IFS \(\mathcal {I}\) as its graph \(G(f^*)\) satisfies a similar self-referential set-valued Eq. (4).

The concept of FIF may be used to define a specific class of fractal functions (Barnsley 1986; Massopust 2010; Navascués 2005) associated with any function \(f \in C(I)\) as described in the following.

To this end, let \(I:= [x_0,x_N]\subset {\mathbb {R}}\). For a given \(f\in C(I)\), consider a partition \(\Delta :=\{ x_0, x_2,\dots , x_N\}\) of I satisfying \(x_0<x_1<\ldots <x_N\) and a continuous function \(b:I \rightarrow \mathbb {R}\) with \(b\ne f\) that satisfies the endpoint interpolation conditions \(b(x_0)=f(x_0)\) and \(b(x_N)= f(x_N)\).

Choose a scaling vector \(\beta := (\beta _1, \ldots , \beta _{N}) \in (-1,1)^{N}\). The components of \(\beta \) are called scaling factors. For \(i\in \mathbb {N}_{N}\), we set

$$\begin{aligned} u_i(x):=a_ix+b_i\quad \text {and}\quad v_i(x,y):=\beta _i y +f(u_i(x))-\beta _i b(x). \end{aligned}$$
(7)

The constants \(a_i\) and \(b_i\) are computed via the conditions (1). Then, the IFS \(\{[x_0,x_N]\times \mathbb {R};w_i(x,y)=(u_i(x),v_i(x,y)), i\in \mathbb {N}_{N}\}\) possesses an attractor which is the graph of a fractal function \(f^{\beta }_{\Delta ,b} =: f^{\beta }\). The function \(f^{\beta }\) is referred to as a \(\beta \)-fractal function for f with respect to the scaling vector \(\beta \), the base function b, and the partition \(\Delta \).

If \(C_f(I)=\{ g\in C(I): g(x_0)=f(x_0) \wedge g(x_N)=f(x_N)\},\) then \(f^{\beta }\) is the unique fixed point of the RB operator \(T:C_f(I)\rightarrow C_f(I)\) defined by Massopust (2016)

$$\begin{aligned} Tg = f + \sum _{i=1}^{N}\beta _i\, (g - b)\circ u_i^{-1}\,\chi _{I_i^*}. \end{aligned}$$
(8)

Consequently, \(f^{\beta }\) satisfies the self-referential functional equation

$$\begin{aligned} f^{\beta }(x)= f(x)+ \sum _{i=1}^{N}\beta _i \left( f^{\beta }(u_i^{-1}(x))- b(u_i^{-1}(x))\right) \chi _{I_i^*}(x),\quad x\in I. \end{aligned}$$
(9)

Using (9), it is straight-forward to show that

$$\begin{aligned} \Vert f^{\beta }-f\Vert _{\infty }\le \frac{|\beta |_{\infty }}{1-|\beta |_{\infty }}\, \Vert f-b\Vert _{\infty }, \end{aligned}$$
(10)

where \(|\beta |_\infty = \max \{ \beta _i \; : \, i \in \mathbb {N}_{N}\}.\) The above inequality shows that \(f^{\beta }\) converges uniformly to f if either \(|\beta |_{\infty } \rightarrow 0\) or/and \(\Vert f-b\Vert _{\infty } \rightarrow 0\).

3 Fractal multiquadric functions

In this section, we introduce a novel fractal multiquadric (MQ) function and also construct convexity preserving fractal MQ-functions. The construction of a symmetric fractal MQ-function is based on the following steps:

  1. (i)

    From a given set of abscissas \(\{x_0,x_1,\dots x_n\}\) contained in the domain \([a,b]\subset {\mathbb {R}}\) of the approximating function, we construct another closed set I which is symmetric about 0 and a partition for it.

  2. (ii)

    This partition must contain all values of \(|x_i-x_j|\), for all \(i,j \in {\mathbb {N}}_{0,n}\).

  3. (iii)

    We define affine mappings \(u_i\) such that \(u_i (r) = -u_{-i}(r)\), for all \(r\in I\).

  4. (iv)

    We require the scaling factors \(\alpha _i\) to satisfy \(\alpha _i = \alpha _{-i}\).

  5. (v)

    We construct a suitable iterated function system to obtain a symmetric fractal function given a symmetric MQ-function.

Construct a closed set \( I:=[-K,K]\), where \(K:= {\max }_{0\le j\le n} {\sup |x-x_j|}_{ x_0 \le x \le x_n}\). If the abscissas are not ordered, we can order them. Thus, without loss of generality, let \(P:=\{x_0<x_1< \dots <x_n\}\) be the set of abscissas in \(\Omega :=[x_0,x_n]\).

Next, we partition [0, K] into N parts \( 0 = r_0< r_1< \dots < r_N\) such that the ensuing partition \(\Pi \) contains all the values

$$\begin{aligned} r_{ij}:=|x_i-x_{j}| \in \Pi , \text { for all } i,j \in {\mathbb {N}}_{n,0}. \end{aligned}$$
(11)

We sometimes refer to the \(r_i\) as nodal points. Then, we extend the partition \(\Pi \) to the left of \(r_0=0\) in a symmetric way to obtain the required partition

$$\begin{aligned} \Delta =:\{ -K=-r_N<-r_{N-1}< \dots< -r_{1}<r_0<r_1< \dots <r_{N}=K.\} \end{aligned}$$

Let \(I_i:=[r_{i-1},r_i]\), and \(I_{-i}:=[-r_i,-r_{i-1}]\), \( i \in \mathbb {N}_N.\) For \(i\in {\mathbb {N}}_N\), define affine maps \( u_i:I \rightarrow I_i\) and \( u_{-i}:I \rightarrow I_{-i}\) by setting

$$\begin{aligned} {\left\{ \begin{array}{ll} u_i(-r_N)=r_{i-1}, \quad u_i(r_N)=r_{i}, \\ u_{-i}(-r_N)=-r_{i-1}, \quad u_{-i}(r_N)=-r_{i}. \end{array}\right. } \end{aligned}$$
(12)

If \(u_i(r)=a_ir+b_i\) and \(u_{-i}(r)=a_{-i}r+b_{-i}\), \(i\in \mathbb {N}_N\), then one finds that

$$\begin{aligned} a_i=-a_{-i}=\frac{r_i - r_{i-1}}{2K} \text { and } b_i=-b_{-i}=\frac{r_i + r_{i-1}}{2}. \end{aligned}$$

It is clear from these equations that \( u_i=-u_{-i}\) and \(|a_i| < 1\), for all \(i\in {\mathbb {N}}_N\cup {\mathbb {N}}_N^-\).

To explain the construction of the \(u_i\) from a set P using steps (i) – (iii) above, we provide the following example.

Example 1

Consider the set of abscissas \(P:=\{\tfrac{1}{2},1,\tfrac{3}{2}\}\) in \(\Omega =[\tfrac{1}{2},\tfrac{3}{2}]\). Then \(I=[-1,1]\) and \(\Delta =\{-1,-\tfrac{1}{2},0,\tfrac{1}{2},1\}\) is the smallest partition satisfying (11). For this \(\Delta \), we have

$$\begin{aligned} I_{-2}=\left[ -1,-\tfrac{1}{2}\right] , \quad I_{-1}=\left[ -\tfrac{1}{2},0\right] ,\quad I_1=\left[ 0,\tfrac{1}{2}\right] ,\quad I_2=\left[ \tfrac{1}{2},1\right] . \end{aligned}$$

Computing \(a_i\) and \(b_i\) for \( i\in {\mathbb {N}}_2\cup {\mathbb {N}}_2^-\), yields

$$\begin{aligned} u_{-2}(x)=-\tfrac{1}{4}(x+3),\quad u_{-1}(x)=-\tfrac{1}{4}(x+1),\quad u_1(x)=\tfrac{1}{4}(x+1),\quad u_2(x)=\tfrac{1}{4}(x+3). \end{aligned}$$

Now, we briefly explain the distribution of points under these maps around the center 0. Observe that \(u_i:I \rightarrow I_i\) for \(i\in \mathbb {N}_2 \cup {\mathbb {N}}_2^-\), are homeomorphic and contractive. Note that

$$\begin{aligned} \tilde{I}=\{[-1,1]; u_i, i\in {\mathbb {N}}_2 \cup {\mathbb {N}}_2^-\}. \end{aligned}$$

is a just-touching IFS and its attractor is \([-1,1]\).

Let \(r\in [0,1]\) be generated by a finite sequence of maps \(u_{n_1},u_{n_2},\dots ,u_{n_k}\), i.e.,

$$\begin{aligned} r=u_{n_1}\circ u_{n_2}\circ \dots \circ u_{n_k}(x), \end{aligned}$$

for some \(x\in [-1,1]\) and \(n_1 \in {\mathbb {N}}_2\), \(n_i\in {\mathbb {N}}_2 \cup {\mathbb {N}}_2^-\). Then, an easy computation shows that the symmetric point \(-r\in [-1,0]\) can be obtained as \(-r=u_{-n_1}\circ u_{n_2}\circ \dots \circ u_{n_k}(x)\). Thus, each point in \([-1,1]\) is generated symmetrically around 0 by the IFS \(\tilde{I}\). For example, some points symmetric about \(r_0 = 0\) are obtained by similar indices which differ only in the first digit:

$$\begin{aligned} \begin{aligned} u_{-2}(1)&=-1,\quad u_{2}(1)=1,\quad u_{-1}(1)=-\tfrac{1}{2},\quad u_{1}(1)=\tfrac{1}{2} ;\\ u_{-2} \circ u_{-2}(1)&=-\tfrac{1}{2},\quad u_{2} \circ u_{-2}(1)=\tfrac{1}{2},\quad u_{-2} \circ u_{-1}(1)=-\tfrac{5}{8},\quad u_{2} \circ u_{-1}(1)=\tfrac{5}{8};\\ u_{-1} \circ u_{-2} \circ u_{-2}(1)&=-\tfrac{1}{8},\quad u_{1} \circ u_{-2} \circ u_{-2}(1)=\tfrac{1}{8},\\ u_{-1} \circ u_{-2} \circ u_{-1}(1)&=-\tfrac{3}{32},\quad u_{1} \circ u_{-2} \circ u_{-1}(1)=\tfrac{3}{32}. \end{aligned} \end{aligned}$$

The last two steps (iv)–(v) in the construction of fractal MQ-functions depend on the maps \(v_i:I \times \mathbb {R} \rightarrow \mathbb {R}\) for an MQ-function. Here, we take as an MQ-function the most popular multiquadric function, namely \({\phi }:{\mathbb {R}}\rightarrow {\mathbb {R}}^+\), \(r\mapsto \sqrt{c^2+r^2}\), where c is the so-called shape parameter.

Let \(y_i:={\phi }(r_i)\), \(i\in {\mathbb {N}}_{N,0}\). For \(i\in \mathbb {N}_N \), we define maps \(v_i:I \times \mathbb {R} \rightarrow \mathbb {R}\) by

$$\begin{aligned} {\left\{ \begin{array}{ll} v_{\pm i}(-K,y_{-N})=y_{i-1},\quad v_{\pm i}(K,y_N)=y_{i},\\ |v_{{\pm i}}(r,y)-v_{{\pm i}}(r,y^*)| \le \alpha _{{\pm i}}|y-y^*|, \text { for all }\; (r,y), (r,y^*) \in I\times \mathbb {R},\\ v_i(r,y)=v_{-i}(r,y), \text { for all }\; (r,y) \in I\times \mathbb {R}, \end{array}\right. } \end{aligned}$$
(13)

where \( \alpha _i=\alpha _{-i}\) with \( |\alpha _i|\in [0,1)\).

Finally, for \(i\in {\mathbb {N}}_N\cup {\mathbb {N}}_N^-\), we define maps \(w_i: I \times \mathbb {R} \rightarrow I_i \times \mathbb {R}\) by

$$\begin{aligned} w_i(r,y)=(u_i(r),v_i(r,y)). \end{aligned}$$
(14)

Following the procedure in Sect. 2, the IFS

$$\begin{aligned} \mathcal {I}=\{I\times \mathbb {R} ; w_i, i\in {\mathbb {N}}_N\cup {\mathbb {N}}_N^-\} \end{aligned}$$
(15)

has a unique attractor \(G\in \mathcal {H}(\mathbb {R}^2)\). This G is the graph of a continuous fractal function \({\phi }^*:I \rightarrow \mathbb {R}\) satisfying the interpolating conditions \({\phi }^*(r_i)={\phi }^*(-r_i)=y_i\), for \(i\in {\mathbb {N}}_{N,0}\). In order to get the functional equation for \({\phi }^*\), we proceed as follows.

Let \(\mathcal {G}=\{g\in C[-K,K]: g(K)=g(-K)=y_N\}\) and \(\rho \) be the sup-norm on \(\mathcal {G}\). Then \((\mathcal {G},\rho )\) is a complete metric space. Define an RB-operator \(T:(\mathcal {G},\rho ) \rightarrow (\mathcal {G}, \rho )\) by

$$\begin{aligned} \begin{aligned} Tg(r)&:=\sum _{i=1}^N v_i\left( u_i^{-1}(r),g(u_i^{-1}(r))\right) \chi _{I^*_i}(r)+ \sum _{i=-1 }^{-N} v_i\left( u_i^{-1}(r),g(u_i^{-1}(r))\right) \chi _{I^{\dagger }_i}(r),\\&\quad r\in I,\, g\in \mathcal {G}, \end{aligned} \end{aligned}$$
(16)

where \(I_i^*:= [r_{i-1}, r_i)\), \(i \in {\mathbb {N}}_{N-1}\), \(I^*_N := [r_{N-1},r_{N}]\), \( I^{\dagger }_{-i} := ( -r_i , -r_{i-1}]\), \(i \in {\mathbb {N}}_{N-1}\), and \(I^{\dagger }_{-N} := [-r_N, -r_{N-1}].\)

In order to obtain the fractal MQ-function, we take \(v_i(r,y):=\alpha _iy+q_i(r)\) with \(q_i(r) :=\phi (u_i(r))-\alpha _i b(r)\), \(\alpha _i=\alpha _{-i}\) with \(|\alpha _i|<1\), and any continuous b with \(b(-r_N)=b(r_N)=\phi (r_N)=y_N\). Then, it is easy to prove that T is a contractive map. By the Banach fixed point theorem, T has a unique continuous fixed point \({\phi }^{\alpha }\). Finally, we will show that \( \phi ^{\alpha }\) is symmetric about 0.

To this end, as \(\phi ^{\alpha }\) is the fixed point of (16), it satisfies the self-referential equation

$$\begin{aligned} \phi ^{\alpha }(u_i(r))=\phi (u_i(r))+\alpha _i(\phi ^{\alpha }(r)-b(r)),\; r\in I, i\in \mathbb {N}_N. \end{aligned}$$
(17)

Using the symmetry of \(\phi \) together with the form of the scaling parameters in (17), we have

$$\begin{aligned} \begin{aligned} \phi ^{\alpha }(u_i(r))&=\phi (u_i(r))+\alpha _i(\phi ^{\alpha }(r)-b(r))\\&= \phi (-u_i(r))+\alpha _i(\phi ^{\alpha }(r)-b(r))\\&=\phi (u_{-i}(r)) +\alpha _{-i}(\phi ^{\alpha }(r)-b(r))\\&={\phi }^{\alpha }(u_{-i}(r))={\phi }^{\alpha }(-u_{i}(r)). \end{aligned} \end{aligned}$$

Definition 1

(Multiquadric Fractal Function) The fractal function \(\phi ^{\alpha }\) defined in (17) is termed a fractal multiquadric (MQ) function. For \(\alpha =0\), \(\phi ^0\) agrees with the classical multiquadratic function \(\phi \).

Note that the maps \(u_{-i}, i \in \mathbb {N}_N\), are defined with negative scaling factors and around \(r_0=0\), \(u_{i}\) and \(u_{-i}\) are negatives of each other. For this reason, not all the results from the theory of fractal functions transfer easily to fractal MQ-functions. Here, we wish to check conditions on the scaling factors \(\alpha _i\) and the base function b such that \({\phi }^{\alpha }\) is p-times (\(p\in {\mathbb {N}}\)) differentiable and preserves the convexity of \({\phi }\).

Theorem 2

Let \({\phi }(r) =\sqrt{r^2+c^2}\) be multiquadric function with shape parameter \(c > 0\). Let \(b\in C^p(I)\), \(p\in {\mathbb {N}}\), be such that

$$\begin{aligned} b^{(k)}(x_{-N})= {\phi }^{(k)}(x_{-N}), \quad b^{(k)}(x_N)= {\phi }^{(k)}(x_N),\;\; k \in {\mathbb {N}}_{p,0}, \quad b\ne {\phi }, \end{aligned}$$
(18)

and let \(\alpha _i\) obey \(|\alpha _i|<|a_i|^p\), for all \(i\in {\mathbb {N}}_{N}\cup {\mathbb {N}}_{N}^{-}\). Then, \({\phi }^{\alpha }\in C^{p}(I)\) and satisfies the following self-referential functional equations

$$\begin{aligned} ({\phi }^{\alpha })^{(k)}(u_i(r))={\phi }^{(k)}(u_i(r))+ \frac{\alpha _i}{a_i^k}\left( {\phi }^{\alpha }-b\right) ^k(r),\quad r\in I,\;\; k\in {\mathbb {N}}_{p,0},\;\; i\in {\mathbb {N}}_{N}\cup {\mathbb {N}}_{N}^{-}. \end{aligned}$$
(19)

Furthermore, for \(k\in {\mathbb {N}}_{p,0}\), we have the estimate

$$\begin{aligned} \begin{aligned} \Vert {(\phi ^{\alpha }})^{(k)}-\phi ^{(k)}\Vert _{\infty } \le \frac{|\alpha |_{\infty }}{|a|^k-|\alpha |_{\infty }} \Vert \phi ^{(k)}-b^{(k)}\Vert _{\infty }, \end{aligned} \end{aligned}$$
(20)

where \(|a|:=\min \{|a_i|:i\in \mathbb {N}_N\}\) and \(|\alpha |_{\infty }:=\max \{|\alpha _i|:i\in \mathbb {N}_N\}\).

Proof

It is known (cf., for instance, Barnsley and Harrington 1989) that for the existence of a p-times differentiable fractal function, it is necessary that the scaling factors satisfy \(|\alpha _i| < a_i^p\), where \(a_i\) is the horizontal contraction of the map \(u_i\), \(i \in \mathbb {N}_{N}.\) Define

$$\begin{aligned}\mathcal {G}^p(I):=\left\{ h \in C^k(I): h^{(k)}(-r_{N})={\phi }^{(k)}(-r_{N}),\, h^{(k)}(r_{N})={\phi }^{(k)}(r_{N}),\, k\in {\mathbb {N}}_{p,0}\right\} . \end{aligned}$$

Then \(\mathcal {G}^p(I)\) becomes a complete metric space when endowed with the metric

$$\begin{aligned} \tau (h,h^*):=\max \{\Vert (h-h^*)^k\Vert _{\infty }: k \in {\mathbb {N}}_{p,0}\}.\end{aligned}$$

Define an RB operator \(T:\mathcal {G}^p(I) \rightarrow \mathcal {G}^p(I)\) by

$$\begin{aligned} Th(r):={\phi }(r)+\alpha _i (h-b)(u_i^{-1}(r)), \quad r\in I_i, \quad i\in {\mathbb {N}}_{N}\cup {\mathbb {N}}_{N}^{-}. \end{aligned}$$
(21)

Clearly, \(Th \in C^p(I_i)\) for \(p\in {\mathbb {N}}\). For \(k\in {\mathbb {N}}_{p,0}\), (21) implies

$$\begin{aligned} (Th)^{(k)}(u_i(r))={\phi }^{(k)}(u_i(r))+\frac{\alpha _i}{a_i^k} (h-b)^{(k)}(r)),\quad r\in I,\quad i \in {\mathbb {N}}_{N}\cup {\mathbb {N}}_{N}^{-}. \end{aligned}$$
(22)

To show the continuity of \((Th)^{(k)}\) on I, it suffices to prove continuity at the points of intersection of the subintervals \(I_i\).

First, by using (22), we show the continuity of \((Th)^{(k)}\) at 0 and \(r_i \) for \(i \in {\mathbb {N}}_{N-1} \cup {\mathbb {N}}_{N-1}^-\).

$$\begin{aligned} \begin{aligned} (Th)^{(k)}(0^+)&= {\phi }^{(k)}(0)+\frac{\alpha _1}{a_1^k}(h-b)^{(k)}(0)= {\phi }^{(k)}(0) \\ {}&\quad +\frac{\alpha _{-1}}{a_{-1}^k}(h-b)^{(k)}(0) =(Th)^{(k)}(0^-). \end{aligned} \end{aligned}$$
(23)

To prove continuity at \(r_i \) is similar to proving it at \(-r_i \) for \(i \in {\mathbb {N}}_{N-1}\). Thus, we verify the continuity at \(-r_i \) for \(i \in {\mathbb {N}}_{N-1}\):

$$\begin{aligned} \begin{aligned} (Th)^{(k)}(-r_{i}^+)=&{\phi }^{(k)}(-r_{i})+\frac{\alpha _{-i}}{a_{-i}^k}(h-b)^{(k)}(-r_{i}) ={\phi }^{(k)}(-r_{i})+\frac{\alpha _{-i-1}}{a_{-i-1}^k}(h-b)^{(k)}(0)\\&=(Th)^{(k)}(-r_{i}^-). \end{aligned} \end{aligned}$$

The above two equations yield that \((Th)^{(k)}\in C(I)\), for \(k\in {\mathbb {N}}_{p,0}\).

Now, we will show that the RB-operator T is a contraction on \(\mathcal {G}^p(I)\). By (21), we can write

$$\begin{aligned} \begin{aligned} \Big |(Th^k-T{h^*}^k)(r)\Big |=&\frac{|\alpha _i|}{|a_i|^k}\Big |(h-h^*)^k(u_i^{-1}(r))\Big |\le \hat{\alpha } \,\tau (h,h^*), \end{aligned} \end{aligned}$$
(24)

where \(\hat{\alpha }=\max \left\{ \frac{|\alpha _i|}{|a_i|^k}:i\in {\mathbb {N}}_N\right\} <1\). According to the assumption in the theorem, (24) ensures that

$$\begin{aligned} \tau (Th,Th^{*})\le \hat{\alpha } \,\tau (h,h^{*}). \end{aligned}$$

Hence, by the Banach fixed point theorem, there exists a unique fixed point \({\phi }^{\alpha }\in \mathcal {G}^p(I) \) of T and this fixed point satisfies the self-referential functional Eq. (19).

Using (19), a uniform error estimate for the fractal MQ-function is obtained via

$$\begin{aligned} \begin{aligned} \Vert {(\phi ^{\alpha }})^{(k)}-\phi ^{(k)}\Vert _{\infty }\le&\frac{|\alpha |_{\infty }}{|a|^k} \Vert {(\phi ^{\alpha }})^{(k)}-b^{(k)}\Vert _{\infty }, \quad k\in {\mathbb {N}}_{p,0}, \\ \le&\frac{|\alpha |_{\infty }}{|a|^k} \Vert {({\phi }^{\alpha }})^{(k)}-{\phi }^{(k)}\Vert _{\infty }+ \frac{|\alpha |_{\infty }}{|a|^k} \Vert {{\phi }}^{(k)}-b^{(k)}\Vert _{\infty },\; k\in {\mathbb {N}}_{p,0}. \end{aligned} \end{aligned}$$

The above inequality simplifies to the desired estimate (20). \(\square \)

As \({\phi }''(r)=\frac{c^2}{(r^2+c^2)^{\frac{3}{2}}}\ge 0\), \({\phi }\) is convex. Now, we prove that convexity is preserved when going from \(\phi \) to the MQ-fractal function \({\phi }^\alpha \).

Theorem 3

Let \({\phi }(r) =\sqrt{r^2+c^2}\), where \(c>0\) is fixed. Let the base function \(b\ne {\phi }\) be any function satisfying

$$\begin{aligned} b \in C^2(\Omega ),\quad b^{(k)}(-r_{N})= \phi ^{(k)}(-r_{N}),\quad b^{(k)}(r_N)= \phi ^{(k)}(r_N),\quad \text {for } k \in \{0,1,2\}. \end{aligned}$$
(25)

If the scaling factors satisfy \(|\alpha _i|< |a_i|^2\) for \(i\in \mathbb {N}_{N} \cup \mathbb {N}_{N}^-\), and

$$\begin{aligned} 0\le \alpha _i \le \frac{a_i^2 m_{i}^{(2)}}{M^{(2)}},\quad \text { for } i \in {\mathbb {N}}_N, \end{aligned}$$
(26)

where \(m_i^{(2)}:=\min \left\{ {\phi }''(u_i(r)):r\in I\right\} \) and \(M^{(2)}:=\min \left\{ b''(r):r\in I\right\} \), then the fractal MQ-function \(\phi ^{\alpha }\) is convex, i.e., \( (\phi ^{\alpha })''\ge 0\) on I.

Proof

Since the base function b and the scaling functions \(\alpha \) fulfil all conditions of Theorem 2, \({\phi }^{\alpha }\in C^2(I)\). The fractal MQ-function is constructed iteratively from nodal points by using Theorem 2. Thus, it is sufficient to prove that \(({\phi }^{\alpha })'' \ge 0\) on I at the j-th iteration implies \(({\phi }^{\alpha })'' \ge 0\) on I at the \((j+1)\)-st iteration.

To this end, assume that r is nodal point at the j-iteration. Then, \(({\phi }^{\alpha })''(r) = {\phi }''(r) \ge 0\). Now, we have to show that \({\phi }^{\alpha }(u_i(r)) \ge 0\) for \(i\in {\mathbb {N}}_{N} \cup {\mathbb {N}}_{N}^-\). Employing (26) and (19), we obtain

$$\begin{aligned} \begin{aligned} ({\phi }^{\alpha })''(u_i(r))=&\, {\phi }''(u_i(r))+\frac{\alpha _i}{a_i^2} ({\phi }^{\alpha })''(r)-\frac{\alpha _i}{a_i^2} b''(r) \\ \ge&\, {\phi }''(u_i(r))-\frac{\alpha _i}{a_i^2} b''(r)\\ \ge&\, m_i^{(2)}-\frac{\alpha _i M^{(2)}}{a_i^2}\ge 0. \end{aligned} \end{aligned}$$
(27)

As

$$\begin{aligned} {\phi }''(u_{-i}(r))=\frac{c^2}{((u_{-i}(r))^2+c^2)^{\frac{3}{2}}}=\frac{c^2}{((-u_{i}(r))^2+c^2)^{\frac{3}{2}}}={\phi }''(-u_{i}(r)), \end{aligned}$$

we have

$$\begin{aligned} \begin{aligned} ({\phi }^{\alpha })''(u_{-i}(r))=&\, {\phi }''(u_{-i}(r))+\frac{\alpha _{-i}}{a_{-i}^2} ({\phi }^{\alpha })''(r)-\frac{\alpha _{-i}}{a_{-i}^2} b''(r) \\ \ge&\, {\phi }''(u_{i}(r))-\frac{ \alpha _{i}}{a_{i}^2} b''(r)\\ \ge&\, m_i^{(2)}-\frac{\alpha _i M^{(2)}}{a_i^2}\ge 0. \end{aligned} \end{aligned}$$
(28)

Hence, we have the desired convexity result of \({\phi }^\alpha \): \(({\phi }^{\alpha })''(u_{i}(r)) \ge 0, \text { for } i\in {\mathbb {N}}_N \cup {\mathbb {N}}_N^-\). \(\square \)

Remark 1

In the above theorem, we need a base function b that has to satisfy 2-point Hermite interpolation conditions at \(-r_N\) and \(r_N\) for \({\phi }\). For this reason, we use for b the Hermite polynomial \(H_5\) in the next two sections. The Hermite polynomial \(H_5(r)\) is given by

$$\begin{aligned} \begin{aligned} H_5(r)&={\phi }(r_{-N})+{\phi }'(r_{-N})(r-r_{-N})+ \tfrac{1}{2}{\phi }''(r_{-N})(r-r_{-N})^2+h_1(r-r_{-N})^3 \\&\quad + h_2 (r-r_{-N})^3(r-r_{N})+h_3 (r-r_{-N})^3(r-r_{N})^2, \end{aligned} \end{aligned}$$
(29)

where the constants \(h_1\), \(h_2\), and \(h_3\) are determined by

$$\begin{aligned} \begin{aligned} h_1=&\frac{{\phi }(r_{N})-{\phi }(r_{-N})-{\phi }'(r_{-N})(r_{N}-r_{-N})-\frac{1}{2} {\phi }''(r_{-N})(r_{N}-r_{-N})^2}{(r_{N}-r_{-N})^3},\\ h_2=&\frac{3{\phi }(r_{-N})-3{\phi }(r_{N})+2({\phi }'(r_{-N})+{\phi }'(r_{N}))(r_{N}-r_{-N})+\frac{1}{2} {\phi }''(r_{-N})(r_{N}-r_{-N})^2}{(r_{N}-r_{-N})^4},\\ h_3=&\frac{6{\phi }(r_{N})-6{\phi }(r_{-N})-3({\phi }'(r_{-N})+{\phi }'(r_{N}))(r_{N}-r_{-N})+\frac{1}{2} ({\phi }''(r_{N})-{\phi }''(r_{-N}))(r_{N}-r_{-N})^2}{(r_{N}-r_{-N})^5}. \end{aligned} \end{aligned}$$

4 The fractal quasi-interpolation operator \(L_{C}^{\alpha }\)

This section deals with the shape-preserving approximation of irregular or/and self-similar functions by means of a novel fractal quasi-interpolation operator. These quasi-interpolants are useful for approximating data generated from an irregular fractal function or a smooth function whose first or second derivative is irregular. Several examples are provided to demonstrate the importance of this quasi-interpolation operator when compared to the classical quasi-interpolation operators defined by the translates of an MQ-function.

Let \(f\in C^1(I)\), where \(I\subseteq {\mathbb {R}}\) is an interval as defined in Sect. 3. In the sequel, we employ the following notation: \( f'_0:=f'(x_0),\; f'_n:=f'(x_n), f_j:=f(x_j)\), and \({\phi }_j(x):=\sqrt{c^2+(x-x_j)^2}\), for \(j\in {\mathbb {N}}_{n,0}\).

We would like to approximate f using a fractal quasi-interpolation operator \(L_C^{\alpha }\). First, we choose a scaling vector \(\alpha \) according to Theorem 3 to ensure differentiability and convexity of the ensuing fractal MQ-function \({\phi }^{\alpha }\). We define a fractal quasi-interpolation operator \(L_{C}^{\alpha }\) using the translates of the fractal MQ-function \(\phi ^{\alpha }\) along the interpolation points \(x_i\in P\), i.e., we set

$$\begin{aligned} ( L_{C}^{\alpha }f)(x) :=f'_0 \gamma _0^{\alpha }(x)+ f_0 \beta _0^{\alpha }(x)+ \sum _{j=1}^{n-1}f_j \psi _j^{\alpha }(x)+f_n \beta _n^{\alpha }(x)+f'_n \gamma _n^{\alpha }(x), \end{aligned}$$
(30)

where

$$\begin{aligned} \begin{aligned} \psi _j^{\alpha }(x):=&\frac{\phi _{j+1}^{\alpha }(x)-\phi _j^{\alpha }(x)}{2(x_{j+1}-x_j)} - \frac{\phi _{j}^{\alpha }(x)-\phi _{j-1}^{\alpha }(x)}{2(x_{j}-x_{j-1})},\quad j \in {\mathbb {N}}_{n-1},\\ \beta _0^{\alpha }(x):=&\frac{1}{2}+\frac{\phi _{1}^{\alpha }(x)-\phi _0^{\alpha }(x)}{2(x_1-x_0)},\\ \beta _n^{\alpha }(x):=&\frac{1}{2}+\frac{\phi _{n-1}^{\alpha }(x)-\phi _n^{\alpha }(x)}{2(x_n-x_{n-1})},\\ \gamma _0^{\alpha }(x):=&\frac{1}{2}((x-x_0)-\phi _0^{\alpha }(x)),\\ \gamma _n^{\alpha }(x):=&\frac{1}{2}(\phi _n^{\alpha }(x)-(x_n-x)), \end{aligned} \end{aligned}$$
(31)

with \(\phi _j^{\alpha }(x):=\phi ^{\alpha }(x-x_j)\).

Remark 2

Note that \(\phi _j^{0}(x)=\phi (x-x_j)\) for \(j=0,1,\dots ,N\). Thus, for \(\alpha =0\), we can write \(\psi _j(x) := \psi _j^0(x)\), \(\beta _0(x) := \beta _0^0(x)\), \(\beta _n(x) := \beta _n^0(x)\), \(\gamma _n(x) := \gamma _n^0(x)\), and \(\gamma _n(x) := \gamma _n^0(x)\). Then, the above operator reduces to the classical quasi-interpolation operator \(L_{C}\) (Wu and Schaback 1994; Beatson and Powell 1992) which is given by

$$\begin{aligned} (L_Cf)(x):=f'_0 \gamma _0(x)+ f_0 \beta _0(x)+ \sum _{j=1}^{n-1}f_j \psi _j(x)+f_n \beta _n(x)+f'_n \gamma _n(x).\end{aligned}$$

We require the following estimate to compute uniform error bounds for fractal quasi-approximants. For \(j\in \mathbb {N}_{n,0}\), we have that

$$\begin{aligned} \begin{aligned} \Vert \phi _{j}^{\alpha }-\phi _{j}\Vert _{\infty }&=\max \{|\phi ^{\alpha }(x-x_j)-\phi (x-x_j)|:x\in [x_0,x_n]\}\\&=\max \{|\phi ^{\alpha }(r)-\phi (r)|:r\in [x_0-x_j,x_n-x_j]\subseteq [-K,K]\}\\&\le \max \{|\phi ^{\alpha }(r)-\phi (r)|:r\in [-K,K]\}\\&\le \Vert \phi ^{\alpha }-\phi \Vert _{\infty } \end{aligned} \end{aligned}$$

Utilising the above inequality, we derive the following uniform error bounds between the classical and fractal approximants for the computation of \(\Vert L_C^{\alpha }f-f\Vert _{\infty }\) below. (See also Theorem 4.)

$$\begin{aligned} \begin{aligned} \Vert \psi _{j}^{\alpha }-\psi _j\Vert _{\infty }&\le \frac{\Vert \phi _{j+1}^{\alpha }-\phi _{j+1}\Vert _{\infty }+ \Vert \phi _{j}^{\alpha }-\phi _{j}\Vert _{\infty }}{2(x_{j+1}-x_j)} + \frac{\Vert \phi _{j}^{\alpha }-\phi _{j}\Vert _{\infty }+\Vert \phi _{j-1}^{\alpha }-\phi _{j-1}\Vert _{\infty }}{2(x_j-x_{j-1})}\\&\le \frac{2\Vert \phi ^{\alpha }-\phi \Vert _{\infty }}{2(x_{j+1}-x_j)}+\frac{2\Vert \phi ^{\alpha }-\phi \Vert _{\infty }}{2(x_{j}-x_{j-1})}\le \frac{2\Vert \phi ^{\alpha }-\phi \Vert _{\infty }}{\delta } ,\quad 1\le j\le n-1,\\ \Vert \beta _0^{\alpha }-\beta _0\Vert _{\infty }&\le \frac{\Vert \phi _1^{\alpha }-\phi _1\Vert _{\infty }+\Vert \phi _0^{\alpha }-\phi _0\Vert _{\infty }}{2(x_1-x_0)} \le \frac{\Vert \phi ^{\alpha }-\phi \Vert _{\infty }}{\delta },\\ \Vert \beta _n^{\alpha }-\beta _n\Vert _{\infty }&\le \frac{\Vert \phi ^{\alpha }_{n-1}-\phi _{n-1}\Vert _{\infty }+\Vert \phi ^{\alpha }_{n-1}-\phi _{n-1}\Vert _{\infty }}{2(x_n- x_{n-1})}\le \frac{\Vert \phi ^{\alpha }-\phi \Vert _{\infty }}{\delta },\\ \Vert \gamma _0^{\alpha }-\gamma _0\Vert _{\infty }&= \frac{1}{2} \Vert {\phi }^\alpha _0-{\phi }_0 \Vert _{\infty } \le \frac{1}{2} \Vert {\phi }^\alpha -{\phi }\Vert _{\infty } ,\\ \Vert \gamma _n^{\alpha }-\gamma _n\Vert _{\infty }&= \frac{1}{2}\Vert \phi ^{\alpha }_{n}-\phi _{n}\Vert _{\infty } \le \frac{1}{2}\Vert \phi ^{\alpha }-\phi \Vert _{\infty }, \end{aligned} \end{aligned}$$
(32)

where we set \(\delta :=\min \limits _{1\le j\le n} |x_j-x_{j-1}|\).

Next, we present a computational example to show the advantages of fractal quasi-interpolants over the classical quasi-interpolants.

Example 2

Suppose we are given a function \(f^*\in C^1[0,1]\) whose first derivative is highly irregular. The graphs of \(f^*\) and \((f^*)'\) are depicted in Fig. 1b and a, respectively. We approximate \(f^*\) by \(L_C^{\alpha }f^*\). For this purpose, let \({\phi }= \sqrt{r^2 + c^2}\) with \(c=0.01\) and let \((\phi ^{\alpha })^{(k)}\), \(k=1,2\), be MQ-fractal functions corresponding to \(P:=\{0,\frac{1}{10},\frac{2}{10},\dots , \frac{9}{10},1\}\subseteq [0,1]\), \(b=H_5\), and \(\Delta :=\{-1<-\frac{9}{10}<\dots<-\frac{1}{10}<0<\frac{1}{10}< \dots<\frac{9}{10}<1\}\) with two different scaling vectors, both elements of \({\mathbb {R}}^{20}\):

$$\begin{aligned} \begin{aligned} \alpha ^1&=(4, ~-2,\dots , ~-2, ~2,~2, ~-2,\dots , ~-2, ~4)\times 10^{-2},\\ \alpha ^2&=(6, ~-3,\dots , ~-3, ~3,~3, ~-3,\dots , ~-3, ~6)\times 10^{-2}. \end{aligned} \end{aligned}$$

Note that the scaling vectors \(\alpha ^k\) satisfy the conditions specified in (26) for \(k=1,2\).

Using these two scaling vectors, we construct the translates of the fractal multi-quadric functions \(\phi _j^{\alpha ^k}(x)=\phi ^{\alpha ^k}(x-x_j)\), for \(k =1,2\) and all j, and thus obtain the fractal quasi-interpolants \(L_C^{\alpha ^1}f^*\) and \(L_C^{\alpha ^2}f^*\). These, along with the classical quasi-interpolant \(L_Cf^*\) are shown in Fig. 1b.

The error functions \(|f^*(x)-L_C^{\alpha ^k}f^*(x)|\), \(k=1,2\), together with the error function \(|f^*(x)-L_Cf^*(x)|\) are plotted in Fig. 1c. One observes that the absolute error is higher for the classical quasi-interpolant than for the fractal quasi-interpolants. It is evident from Fig.  1d that the derivative of \(L_Cf^*\) does not contain sharp irregularities in the derivative of the original function \(f^*\). However, the derivatives of the fractal quasi-interpolants \(L_C^{\alpha ^1}f^*\) and \(L_C^{\alpha ^2}f^*\) capture more accurately and efficiently the derivative of the original functions \(f^*\) as compared to \(L_Cf^*\). This is demonstrated in Fig. 1e–f. Figure 1b–d also show that the fractal quasi-interpolants better approximate the original function by (i) providing a lower absolute error, and (ii) preserving the irregularities in the derivative of the original function \(f^*\) more accurately than the classical quasi-interpolant. If the derivative of the original function f is a smooth then one can take as the scaling vector \(\alpha = \textbf{0}\) to obtain the classical smooth quasi-interpolant \(L_Cf\).

Fig. 1
figure 1

Fractal quasi-interpolants \(L_C^{\alpha }f^*\), the classical quasi-interpolant \(L_Cf^*\), and their derivatives

Remark 3

In the case of fractal quasi-interpolation, we can relax (11), i.e., the partition \(\Pi \) need not contain all values of \(|x_i-x_j|\), for all \(i,j \in {\mathbb {N}}_{0,n}\), as the interpolation matrix does not arise in the construction. However, by experimenting with various numerical examples, it was found that fractal quasi-interpolants for which \(\Pi \) satisfies (11) yield better accuracy. This was used in the above example.

Theorem 4

Let \(f\in C^2[x_0,x_n]\) and let the interpolation data set be \(P:=\{x_0,x_1,\dots ,x_n\}\). Further, let \(h:= \max |x_j-x_{j-1}|_{1\le j\le n}\), \(\omega :=\sup _{x_0\le x \le x_N} |f{''}(x)|\), and \(\Vert f\Vert _1:=\max \{\Vert f\Vert _{\infty },\Vert f'\Vert _{\infty }\}\). Then, the uniform error between \( L_{C}^{\alpha }f\) and f is given by

(i):
$$\begin{aligned} \begin{aligned} \Vert L_C^{\alpha }f-f\Vert _{\infty }&\le \frac{1}{4} c^2\omega \left\{ 1+2\log \left( 1+\frac{x_N-x_0}{c}\right) \right\} \\ {}&\quad + \frac{1}{8}h^2 \omega +\frac{\Vert \phi ^{\alpha }-\phi \Vert _{\infty }}{\delta }\Vert f\Vert _1(2n+1). \end{aligned} \end{aligned}$$
(33)
(ii):

If \(c\le Dh\) for some positive constant D, then the above estimate reduces to

$$\begin{aligned} \begin{aligned} \Vert L_C^{\alpha }f-f\Vert _{\infty }&\le \left\{ \frac{1}{8}+\frac{1}{4}D^2+\frac{1}{2}D^2 \log (1+\frac{x_n-x_0}{Dh})\right\} \omega h^2 \\ {}&\quad +\frac{\Vert \phi ^{\alpha }-\phi \Vert _{\infty }}{\delta } \Vert f\Vert _1(2n+1). \end{aligned} \end{aligned}$$
(34)

Proof

Utilising (32) together with (30), yields

$$\begin{aligned} \begin{aligned} \Vert L_C^{\alpha }-L_Cf\Vert _{\infty }&\le \frac{1}{2} |f'_0| \Vert \phi ^{\alpha }-\phi \Vert _{\infty }+ |f_0|\frac{\Vert \phi ^{\alpha }-\phi \Vert _{\infty }}{\delta }+\sum _{j=1}^{n-1}2|f_j|\frac{\Vert \phi ^{\alpha }-\phi \Vert _{\infty }}{\delta }\\&\quad + |f_n|\frac{\Vert \phi ^{\alpha }-\phi \Vert _{\infty }}{\delta }+ \frac{1}{2} |f'_n|\Vert \phi ^{\alpha }-\phi \Vert _{\infty }\\&\le \Vert \phi ^{\alpha }-\phi \Vert _{\infty } \left\{ \frac{|f'_0|}{2}+\frac{|f_0|}{\delta }+ \frac{|f_n|}{\delta }+\frac{|f'_n|}{2}+ \frac{2(n-1)\Vert f\Vert _{\infty }}{\delta } \right\} . \end{aligned} \end{aligned}$$
(35)

Without loss of generality, we can assume that \(\delta \le 1\). By assumption, we have

$$\begin{aligned} \begin{aligned} \left\{ \frac{|f'_0|}{2}+\frac{|f_0|}{\delta }+ \frac{|f_n|}{\delta }+\frac{|f'_n|}{2}+ \frac{2(n-1)\Vert f\Vert _{\infty }}{\delta } \right\} \le&\Vert f\Vert _1\left\{ 1+\frac{2}{\delta }+\frac{2(n-1)}{\delta }\right\} \\ \le&\frac{1}{\delta } \Vert f\Vert _1\left\{ \delta +2+2(n-1)\right\} \\ \le&\frac{1}{\delta } \Vert f\Vert _1(2n+1). \end{aligned} \end{aligned}$$
(36)

Using (36) in (35), we obtain

$$\begin{aligned} \begin{aligned} \Vert L_C^{\alpha }-L_Cf\Vert _{\infty } \le&\frac{\Vert \phi ^{\alpha }-\phi \Vert _{\infty }}{\delta } \Vert f\Vert _1(2n+1). \end{aligned} \end{aligned}$$
(37)

By Beatson and Powell (1992), it is known that

$$\begin{aligned} \Vert f-L_Cf\Vert _{\infty } \le \frac{1}{4}c^2 \omega \left( 1+2\log \left( 1+\frac{ x_N-x_0}{c}\right) \right) + \frac{1}{8} h^2 \omega , \end{aligned}$$
(38)

and

$$\begin{aligned} \Vert f-L_Cf\Vert _{\infty } \le \left\{ \frac{1}{8}+\frac{1}{4}D^2+\frac{1}{2}D^2\log \left( 1+\frac{x_n-x_0}{Dh} \right) \right\} \omega h^2, \end{aligned}$$
(39)

Thus, (37) and (38) establish the error estimate (33), and (37) and (39) give the estimate (34). \(\square \)

Remark 4

If we consider a set of uniformly distributed data points \(P:=\{x_0,x_1,\dots ,x_n\}\), i.e., with \(h:= x_j-x_{j-1}\), for \(1\le j\le n\), and additionally assume that \(\Vert \alpha \Vert _{\infty }=O(h^4)\), then we have

$$\begin{aligned} \begin{aligned} \frac{\Vert \phi ^{\alpha }-\phi \Vert _{\infty }}{\delta }\Vert f\Vert _1(2n+1)&\le \frac{\Vert \alpha \Vert _{\infty }}{1-\Vert \alpha \Vert _{\infty }} \Vert {\phi }-b_{MQ}\Vert _{\infty } \Vert f\Vert _1 \frac{ \left( \tfrac{2}{h}+1\right) }{h}\\&\le \frac{\Vert \alpha \Vert _{\infty }}{h^2} \frac{\Vert {\phi }-b_{MQ}\Vert _{\infty }}{1-\Vert \alpha \Vert _{\infty }} \Vert f\Vert _1 (2+h)= A \frac{\Vert \alpha \Vert _{\infty }}{h^2}, \end{aligned} \end{aligned}$$

where \(A=3\frac{\Vert {\phi }-b_{MQ}\Vert _{\infty }}{1-\Vert \alpha \Vert _{\infty }} \Vert f\Vert _1 \) for small h. From above and together with (34), we conclude that

$$\begin{aligned} \Vert L_C^{\alpha }f-f\Vert _{\infty }=O(h^2). \end{aligned}$$

We now present a numerical example to verify the order of convergence \(O(h^2)\) derived in the last theorem for uniformly distributed data points and compare the fractal quasi-interpolation operator \(L_C^{\alpha }f(x)\) to its classical counterpart.

Example 3

Consider a function \(f^*\in C^2[0,1]\) whose second derivative, which is plotted in Fig. 2a, is highly irregular. The graph of \(f^*\) is depicted in Fig. 2b. We approximate \(f^*\) by using the fractal quasi-interpolant \(L_C^{\alpha ^k}f^*\), for \(k=1,2\). As in the previous example, we construct fractal MQ-functions \(\phi ^{\alpha ^k}\), for \( k=1,2\) from \({\phi }(r)= \sqrt{r^2 + c^2}\) with \(c = 0.01\). Further, we use again the partition \(P:=\{0,\frac{1}{10},\frac{2}{10},\dots , \frac{9}{10},1\}\subseteq [0,1]\), \(b=H_5\), and \(\Delta :=\{-1<-\frac{9}{10}<\dots<-\frac{1}{10}<0<\frac{1}{10}< \dots<\frac{9}{10}<1\}\) but choose as scaling functions the following two vectors in \({\mathbb {R}}^{20}\):

$$\begin{aligned} \begin{aligned} \alpha ^1&:=(6, ~-3,\dots , ~-3, ~3,~3, ~-3,\dots , ~-3, ~6)\times 10^{-3},\\ \alpha ^2&:=\left( 9, ~-\tfrac{9}{2},\dots , ~-\tfrac{9}{2}, ~\tfrac{9}{2},~\tfrac{9}{2}, ~-\tfrac{9}{2},\dots , ~-\tfrac{9}{2}, ~9\right) \times 10^{-3}. \end{aligned} \end{aligned}$$

The scaling factors \(\alpha _i^1\) and \(\alpha _i^2\) were chosen according to condition (26).

Using the translates \(\phi _j^{\alpha ^k}(x)=\phi ^{\alpha ^k}(x-x_j)\), the fractal quasi-interpolant \(L_C^{\alpha ^1}f^*\) and \(L_C^{\alpha ^2}f^*\), along with the classical quasi-interpolant \(L_Cf^*\), are plotted in Fig. 2b. The error functions \(|f^*(x)-L_C^{\alpha ^k}f^*(x)|\), for \(k=1,2\), and \(|f^*(x)-L_Cf^*(x)|\) are depicted in Fig.  2c. One observes that the error estimates are of order \(O(h^2)\) as claimed in Theorem 6. Note that the second derivative of \(L_Cf^*\) in Fig. 2d is very much different from that of the original function in Fig. 1a. The second derivative of \(L_C^{\alpha ^1}f^*(x)\) and \(L_C^{\alpha ^2}f^*(x)\), illustrated in Fig. 2e–f, shows a better approximation of the second derivative of \(L_Cf^*(x)\). Employing diverse optimization techniques for scaling vectors, one can get more accurate fractal quasi approximants \(L_C^{\alpha }f^*(x)\). These fractal quasi-approximants are tailored to capture intricate patterns and structures within the data, enhancing the fidelity of the approximation process.

Fig. 2
figure 2

The fractal quasi-interpolant \(L_C^{\alpha }f^*\) and the classical quasi-interpolant \(L_Cf^*\)

Theorem 5

If the data points \(\{f(x_j)\}_{j=0}^{n}, f{'}(x_0),f{'}(x_n)\) stem from a convex (concave, linear) function \( f\in C^1[x_0,x_n]\) and the scaling factors are chosen according to Theorem 3, then \(L_C^{\alpha }f(x)\) is a convex (concave, linear) function.

Proof

Let f be convex.

$$\begin{aligned} \begin{aligned} (L_C^{\alpha }){''}(x)&= f'_0(\gamma _0^{\alpha }){''}(x) +f_0 (\beta _0^{\alpha }){''}(x)+\sum _{j=0}^{n-1} f_j (\psi _j^{\alpha }){''}(x)+ f_n (\beta _n^{\alpha }){''}(x) +f'_n(\gamma _n^{\alpha }){''}(x)\\&= -f'_0 \frac{(\phi ^{\alpha }){''}(x)}{2}+ f_0 (\beta _0^{\alpha }){''}(x)+\sum _{j=1}^{n-1} f_j (\psi _j^{\alpha }){''}(x)+f_n (\beta _n^{\alpha }){''}(x)+f'_n (\gamma _n^{\alpha }){''}(x)\\&= \frac{1}{2}\left[ \frac{f_1-f_0}{x_1-x_0}-f'_0\right] (\phi _0^{\alpha }){''}(x)+\frac{1}{2}\sum _{j=1}^{n-1} \left[ \frac{f_{j+1}-f_j}{x_{j+1}-x_{j}}-\frac{f_{j}-f_{j-1}}{x_{j}-x_{j-1}}\right] (\phi _j^{\alpha }){''}(x)\\&\quad +\frac{1}{2}\left[ f'_n-\frac{f_{n}-f_{n-1}}{x_{n}-x_{n-1}}\right] (\phi _n^{\alpha }){''}(x). \end{aligned} \end{aligned}$$
(40)

As the data points \(\{f(x_j)\}_{j=0}^{n}, f{'}(x_0),f{'}(x_n)\) are taken from a convex function, all the terms in square brackets in (40) are non-negative. Due to the choice of the scaling parameters, we know that \((\phi ^{\alpha }){''}(x)\ge 0\). Thus, the right hand side of (40) is non-negative confirming that \(L_C^{\alpha }f\) is convex. The other cases are proven similarly. \(\square \)

Now, we want to illustrate the results in Theorem 5 by a few examples.

Example 4

Let \(\phi _j^{\alpha }(x)=\phi ^{\alpha }(x-x_j)\), \(c=0.01\), and let \(\phi ^{\alpha }\) be a fractal MQ-function corresponding to \(P:=\{0,\frac{1}{5},\frac{2}{5},\frac{3}{5},\frac{4}{5},1\}\subseteq [0,1]\), \(b=H_5\), \(\Delta =\{-1<-\frac{4}{5}<\dots<-\frac{1}{5}<0<\frac{1}{5}< \dots<\frac{4}{5}<1\}\), and

$$\begin{aligned} \alpha \!=\!(0.0067, ~0.0130, ~0.0309, ~0.1041, ~0.0, ~0.0, ~0.1041, ~0.0309, ~0.0130, ~0.0067)\!\times \! 10^{-4}. \end{aligned}$$

The scaling vector \(\alpha \) satisfies the conditions in (26).

Choose the convex function \(f(x):=(x-1/2)^2\), \(x\in [0,1]\). The graphs of f and \(L_C^{\alpha }f\) are shown in Fig. 3a. One observes that \(L_C^{\alpha }f\) is a convex function.

Let us consider now the concave function \(f(x)=\sin (2\pi x)\), \(x\in [0,1]\). The graphs of f and \(L_C^{\alpha }f\) are depicted in Fig. 3b. Since \(\alpha \) obeys (26), it is verified that \(L_C^{\alpha }f\) is concave.

Fig. 3
figure 3

The shape preserving property of \(L_C^{\alpha }\)

5 The fractal quasi-interpolation operator \(L_{D}^{\alpha }\)

In this section, we require the scaling vector \(\alpha \) for the fractal MQ-function \({\phi }^{\alpha }\) to satisfy Theorem 3, hence \({\phi }^{\alpha }\) is convex. Since the quasi-interpolation operator \(L_C^\alpha f\) requires the values of the derivative of the function f at the end points, we propose another fractal quasi-operator \(L_D^\alpha f\) which avoids this requirement.

Let \(f\in C[x_0,x_n]\) and let \(P:=\{ x_0,x_1,\dots ,x_n\}\) be a set of interpolation points. Define a new fractal quasi-interpolation operator by

$$\begin{aligned} L_{D}^{\alpha }f(x):=f_0 \zeta _0^{\alpha }(x)+ f_1 \zeta _1^{\alpha }(x)+ \sum _{j=2}^{n-1}f_j \psi _j^{\alpha }(x)+f_{n-1} \zeta _{n-1}^{\alpha }(x)+f_n \zeta _n^{\alpha }(x), \end{aligned}$$
(41)

where

$$\begin{aligned} \begin{aligned} \zeta _0^{\alpha }(x)&=\frac{1}{2}+\frac{\phi _1^{\alpha }(x)-(x-x_0)}{2(x_1-x_0)},\\ \zeta _1^{\alpha }(x)&=\frac{\phi _2^{\alpha }(x)-\phi _1^{\alpha }(x)}{2(x_2-x_1)}-\frac{\phi _1^{\alpha }(x)-(x-x_0)}{2(x_1-x_0)},\\ \psi _j^{\alpha }(x)&=\frac{\phi _{j+1}^{\alpha }(x)-\phi _j^{\alpha }(x)}{2(x_{j+1}-x_j)} - \frac{\phi _{j}^{\alpha }(x)-\phi _{j-1}^{\alpha }(x)}{2(x_{j}-x_{j-1})},\quad 2\le j \le n-1,\\ \zeta _{n-1}^{\alpha }(x)&=\frac{(x_n-x)-\phi _{n-1}^{\alpha }(x)}{2(x_n-x_{n-1})}-\frac{\phi _{n-1}^{\alpha }(x)-\phi _{n-2}^{\alpha }(x)}{2(x_{n-1}-x_{n-2})},\\ \zeta _n^{\alpha }(x)&=\frac{1}{2}+\frac{\phi _{n-1}^{\alpha }(x)-(x_n-x)}{2(x_n-x_{n-1})}. \end{aligned} \end{aligned}$$

As \({\phi }^0_j(x) = {\phi }(x)\), for \( j \in \mathbb {N}_{n,0}\), the proposed fractal quasi-interpolation operator reduces to its classical counterpart \(L_Df\) defined by Wu and Schaback (1994) whenever \(\alpha ={0}\).

Next, we discuss convexity, concavity, and linear polynomial reproduction for \(L_{D}^{\alpha }\).

Theorem 6

Suppose that a set of data points \(\{f(x_j)\}_{j=0}^n\) is obtained from a convex, concave, or linear function f. If the scaling factors and the base function are chosen according to Theorem 3, then the fractal quasi-interpolant \(L_{D}^{\alpha }f(x)\) is also convex, concave, or linear, respectively.

Proof

Computing the second derivative of (41), yields

$$\begin{aligned} \begin{aligned} ( L_{D}^{\alpha }f){''}(x)&= f_0 (\zeta _0^{\alpha }){''}(x)+ f_1 (\zeta _1^{\alpha }){''}(x)+ \sum _{j=2}^{n-1}f_j (\psi _j^{\alpha }){''}(x)\\ {}&\quad +f_{n-1} (\zeta _{n-1}^{\alpha }){''}(x)+f_n (\zeta _n^{\alpha }){''}(x). \end{aligned} \end{aligned}$$
(42)

Simplifying (42) produces

$$\begin{aligned} \begin{aligned} ( L_{D}^{\alpha }f){''}(x)= \frac{1}{2}\sum _{j=1}^{n-1}\left[ \frac{f_{j+1}-f_j}{x_{j+1}-x_j}-\frac{f_j-f_{j-1}}{x_{j }-x_{j-1}}\right] (\phi ^{\alpha }){''}(x). \end{aligned} \end{aligned}$$
(43)

Note that each term in square brackets is positive or negative according to whether the original function f is convex or concave, respectively. By our assumption on \(\alpha \), \((\phi ^{\alpha }){''} \ge 0\). Thus, (43) confirms that \(L_{D}^{\alpha }f\) is convex (concave) if f is convex (concave). If f is linear on its domain, then each term in square brackets in (42) is zero, that is, \(L_{D}^{\alpha }f\) is a linear polynomial. \(\square \)

Example 5

Consider the convex function

$$\begin{aligned} f(x):={\left\{ \begin{array}{ll} -\frac{5}{4}x+\frac{15}{40}, &{} 0\le x< \frac{1}{4};\\ \left( x-\frac{1}{2}\right) ^{2}, &{} \frac{1}{4} \le x \le \frac{3}{4};\\ 5x-\frac{59}{16}, &{} \frac{3}{4} < x \le 1, \end{array}\right. }\end{aligned}$$

and the concave function

$$\begin{aligned} g(x)={\left\{ \begin{array}{ll} \sin \left( x+\frac{\pi }{6}\right) , &{} 0\le x\le \pi /6;\\ \cos x, &{} \pi /6 < x \le 1. \end{array}\right. } \end{aligned}$$

f and g are approximated by the fractal quasi-operators \(L_{D}^{\alpha }f\) and \(L_{D}^{\alpha }g\), respectively. Let \(\phi ^{\alpha }\) be a fractal MQ-function corresponding to \(P=\{0,\frac{1}{5},\frac{2}{5},\frac{3}{5},\frac{4}{5},1\}\), \(b=H_5\), \(c=0.01\), \(\Delta =\{-1<-\frac{4}{5}<\dots<-\frac{1}{5}<0<\frac{1}{5}< \dots<\frac{4}{5}<1\}\), and

$$\begin{aligned} \alpha \!=\!(0.0067, ~0.0130, ~0.0309, ~0.1041, ~ 0.0, ~ 0.0, ~ 0.1041, ~ 0.0309, ~ 0.0130, ~ 0.0067)\!\times \! 10^{-4}, \end{aligned}$$

where the scaling factors were chosen according to Theorem 3. Using the translates \(\phi _j^{\alpha }(x)=\phi ^{\alpha }(x-x_j)\), \( j \in \mathbb {N}_{n,0}\), the fractal quasi-approximants \(L_D^{\alpha }f\) and \(L_D^{\alpha }g\) are shown in Fig. 4a and b, respectively. One observes that \(L_D^{\alpha }f\) is a convex and \(L_D^{\alpha }g\) a concave function. As f is not linear on its domain, \(L_D^{\alpha }f\) is also not linear; see Fig.  4a.

Fig. 4
figure 4

Convexity and Concavity of \(L_D^{\alpha }\)

In the next theorem, we derive an additional condition on the scaling vector \(\alpha \) so that the fractal quasi-interpolation \(L_D^{\alpha }f\) preserves the monotonicity of a function \(f \in {C}[x_0,x_n]\).

Theorem 7

The fractal quasi-interpolation operator \(L_D^{\alpha }\) defined in (41) preserves the monotonicity of f if the scaling factors and the base function are chosen according to Theorem 3 and, in addition,

$$\begin{aligned} |\alpha |_{\infty } < \frac{(1-\phi {'}(K)) |a|}{\Vert \phi {'}-b{'}\Vert _{\infty }+1-\phi '(K)}, \end{aligned}$$
(44)

where |a| and K are defined in Sect. 3.

Proof

As \((\phi ^{\alpha }){''}\ge 0\), \((\phi ^{\alpha }){'}\) is monotonic increasing. Now \({\phi }'(r) = \frac{r}{\sqrt{r^2+c^2}} \le 1.\) Thus,

$$\begin{aligned} 1\ge \phi '(r_{N})= (\phi ^{\alpha }){'}(r_{N}) \ge (\phi ^{\alpha }){'}(r)\ge (\phi ^{\alpha }){'}(-r_{N})=\phi {'}(-r_{N})\ge -1, \text { for } r\in [-K,K]. \end{aligned}$$

The above inequality ensures that for \( x\in [x_0,x_n]\),

$$\begin{aligned} \begin{aligned} -1\le {(\phi ^{\alpha }}){'}(x-x_j)= {(\phi ^{\alpha }}){'}_j(x)\le {(\phi ^{\alpha }}){'}_{j-1}(x) ={(\phi ^{\alpha }}){'} (x-x_{j-1})\le 1. \end{aligned} \end{aligned}$$
(45)

From (20), for \(r\in [-K,K]\), we obtain

$$\begin{aligned} \begin{aligned} -\frac{|\alpha |_{\infty }}{|a|-|\alpha |_{\infty }} \Vert \phi {'}-b{'}\Vert _{\infty } \le&{(\phi ^{\alpha }}){'}(r)-\phi {'}(r) \le \Vert {(\phi ^{\alpha }}){'}-\phi {'}\Vert _{\infty }\le \frac{|\alpha |_{\infty }}{|a|-|\alpha |_{\infty }} \Vert \phi {'}-b{'}\Vert _{\infty }, \end{aligned} \end{aligned}$$

which implies

$$\begin{aligned} {(\phi ^{\alpha }}){'}(r)\le \phi {'}(r) + \frac{|\alpha |_{\infty }}{|a|-|\alpha |_{\infty }} \Vert \phi {'}-b{'}\Vert _{\infty }. \end{aligned}$$

Now, \({(\phi ^{\alpha }}){'}(r)\le \phi {'}(r) +\frac{|\alpha |_{\infty }}{|a|-|\alpha |_{\infty }} \Vert \phi {'}-b{'}\Vert _{\infty } < 1\) provided that

$$\begin{aligned} \underset{ r \in [-K,K]}{\sup }\phi {'}(r)+\frac{|\alpha |_{\infty }}{1-|\alpha |_{\infty }} \Vert \phi {'}-b{'}\Vert _{\infty } <1. \end{aligned}$$

Thus, we conclude that \({(\phi ^{\alpha }}){'}(r) < 1\) if

$$\begin{aligned} |\alpha |_{\infty } < \frac{\left( 1- \underset{ r \in [-K,K]}{\sup }\phi {'}(r)\right) |a|}{\Vert \phi {'}-b{'}\Vert _{\infty }+1- \underset{ r \in [-K,K]}{\sup }\phi '(r)} =\frac{(1-\phi {'}(K)) |a|}{\Vert \phi {'}-b{'}\Vert _{\infty }+1-\phi '(K)}. \end{aligned}$$
(46)

Differentiating \(L_D^{\alpha }f\), yields

$$\begin{aligned} \begin{aligned} (L_{D}^{\alpha }f)'(x)=f_0 (\zeta _0^{\alpha })'(x)+ f_1 (\zeta _1^{\alpha })'(x)+ \sum _{j=2}^{n-1}f_j (\psi _j^{\alpha })'(x)+f_{n-1} (\zeta _{n-1}^{\alpha })'(x)+f_n (\zeta _n^{\alpha })'(x). \end{aligned} \end{aligned}$$

Rearranging the above expression, we obtain

$$\begin{aligned} \begin{aligned} (L_D^{\alpha }f){'}(x)=&\left[ \frac{1-{(\phi ^{\alpha }_1})^{\prime }(x)}{2(x_1-x_0)}\right] (f_1-f_0)+\sum _{j=1}^{n-2} \left[ \frac{ {(\phi ^{\alpha }_j}){'} (x) -{(\phi ^{\alpha }_{j+1}}){'} (x)}{2(x_{j+1}-x_j)} \right] (f_{j+1}-f_{j})\\&+\left[ \frac{1+{(\phi ^{\alpha }_{n-1}}){'}(x)}{2(x_n-x_{n-1})} \right] (f_{n}-f_{n-1}), \text { for } x\in [x_0,x_n]. \end{aligned} \end{aligned}$$
(47)

Now, (46) ensures the non-negativity of the first square bracket in (47), and (45) the non-negativity of the second and third square bracket in (47). As the set of data points \(\{f_j\}_{j=0}^{n}\) satisfies \(f_j\le f_{j+1}\), all the terms in (47) are non-negative. Hence, \(L_D^{\alpha }f\) is monotone. \(\square \)

Example 6

Consider a monotone function

$$\begin{aligned} f(x)={\left\{ \begin{array}{ll} x, &{} 0\le x<\tfrac{1}{4};\\ 2x-\tfrac{1}{4}, &{} \tfrac{1}{4} \le x \le \tfrac{1}{2};\\ \exp \left( x-\frac{1}{2}\right) -\tfrac{1}{4}, &{} \tfrac{1}{2} < x \le 1. \end{array}\right. } \end{aligned}$$

Let \(\phi ^{\alpha }(x)\) be a fractal MQ-function corresponding to the base function \(b=H_5\), \(P:=\{0,\frac{1}{5},\frac{2}{5},\frac{3}{5},\frac{4}{5},1\}\), \(c=0.01\), \(\Delta =\left\{ -1<-\frac{4}{5}< \dots<-\frac{1}{5}<0<\frac{1}{5}< \dots<\frac{4}{5}<1\right\} \), and

$$\begin{aligned} \alpha \!=\!(0.0067, ~0.0130, ~0.0309, ~0.1041, ~ 0.0, ~ 0.0, ~ 0.1041, ~ 0.0309, ~ 0.0130, ~ 0.0067)\!\times \! 10^{-4}.\end{aligned}$$

Note that \(\alpha \) is chosen according to Theorem 3 and (44). The graphs of \(L_D^{\alpha }f\) and f are plotted in Fig. 5a, and their zoomed-in versions are shown in Fig. 5b. The monotonicity of \(L_D^{\alpha }f\) confirms the statement in Theorem 7.

Fig. 5
figure 5

The preservation of monotonicity by the operator \(L_D^{\alpha }\)

In the following theorem, the rate of convergence of the fractal quasi-operator \(L_D^{\alpha }f\) to an \(f\in C^2[x_0,x_n]\) is derived.

Theorem 8

Let \(f\in C^2[x_0,x_n]\) and let \(h := \max \limits _{1 \le j \le n} |x_j - x_{j-1}|\). Then, a bound for the uniform error between f and \(L_D^{\alpha }f\) is given by

$$\begin{aligned} \Vert f-L_D^{\alpha }\Vert _{\infty } \le K_0h^2+K_1c^2h+K_2ch+K_3c^2\log (h)+ K_4\Vert \phi ^{\alpha }-\phi \Vert _{\infty }, \end{aligned}$$
(48)

for some positive constants \(K_0,K_1,K_2,K_3,K_4\). If \(c=O(h)\), then

$$\begin{aligned} \Vert L_D^{\alpha }f-f\Vert _{\infty } =O(h^2). \end{aligned}$$
(49)

Proof

We can rewrite \(L_D^{\alpha }\) as

$$\begin{aligned} \begin{aligned} L_D^{\alpha }f(x)&=\sum _{j=1}^{n-1} \phi ^{\alpha }_{j}(x)(x_{j+1}-x_{j-1})\Delta ^2(x_{j-1},x_j,x_{j+1})f+f_0+f_n\\&\quad + (x-x_0)\Delta (x_0,x)f-(x_n-x)\Delta (x_{n-1},x_n)f, \end{aligned} \end{aligned}$$
(50)

where \(\Delta \) and \(\Delta ^2\) denotes the first and second order divided difference operator, respectively. Let Lf be the piecewise interpolant of f. Then, for \( x \in [x_0, x_n]\),

$$\begin{aligned} \begin{aligned} 2(L_D^{\alpha }f-Lf)(x)=&\sum _{j=1}^{n-1} (\phi ^{\alpha }_{j}(x)-\phi _{j}(x))(x_{j+1}-x_{j-1})\Delta (x_{j-1},x_j,x_{j+1})f\\&+ \sum _{j=1}^{n-1}(\phi _j(x)-|x-x_j|)(x_{j+1}-x_{j-1})\Delta ^2(x_{j-1,x_j,x_{j+1}})f. \end{aligned} \end{aligned}$$
(51)

By Wu and Schaback (1994), it is known that

$$\begin{aligned} \left| \,\sum _{j=1}^{n-1}(\phi _j(x)-|x-x_j|)(x_{j+1}-x_{j-1})\Delta ^2(x_{j-1,x_j,x_{j+1}})f \,\right|&\le 8ch + M_0c^2\log (h)\nonumber \\ {}&\quad + c^2hM_1, \end{aligned}$$
(52)

for some positive constants \(M_0, M_1\). Let

$$\begin{aligned} M_2:=\sup _{x_0\le x \le x_n} |\Delta (x_{j-1},x_j,x_{j+1})f| \,\sum _{j=1}^{n-1} (x_{j+1}-x_{j-1}). \end{aligned}$$

Substituting (52) into (51), produces

$$\begin{aligned} \begin{aligned} 2|(L_D^{\alpha }f-Lf)(x)|&\le \sum _{j=1}^{n-1} \Vert \phi ^{\alpha }_{j}-\phi _{j}\Vert _{\infty }(x_{j+1}-x_{j-1})|\Delta (x_{j-1},x_j,x_{j+1})f|\\&\quad + 8ch + M_0c^2\log (h)+c^2hM_1\\&\le \Vert \phi ^{\alpha }-\phi \Vert _{\infty } \sup _{x_0\le x \le x_n} |\Delta (x_{j-1},x_j,x_{j+1})f|\\&\quad \cdot \sum _{j=1}^{n-1} (x_{j+1}-x_{j-1})+ 8ch + M_0c^2\log (h)+c^2hM_1\\&\le \Vert \phi ^{\alpha }-\phi \Vert _{\infty } M_2 +8ch + M_0c^2\log (h)+c^2hM_1\\&\le 2\Vert \phi ^{\alpha }-\phi \Vert _{\infty } M_2+8ch + M_0c^2\log (h)+c^2hM_1. \end{aligned} \end{aligned}$$

Thus,

$$\begin{aligned} \Vert L_D^{\alpha }f-Lf\Vert _{\infty } \le 2\Vert \phi ^{\alpha }-\phi \Vert _{\infty } M_2+8ch + M_0c^2\log (h)+c^2hM_1. \end{aligned}$$
(53)

By standard interpolation theory, we know that \(\Vert Lf-f\Vert _{\infty }=M_3h^2\), for some positive constant \(M_3\). Therefore, (53) reduces to

$$\begin{aligned} \Vert L_D^{\alpha }f-f\Vert _{\infty } =K_0h^2+K_1c^2h+K_2ch+K_3c^2\log (h)+ K_4\Vert \phi ^{\alpha }-\phi \Vert _{\infty }, \end{aligned}$$

where \(K_0=M_3\), \(K_1=M_1\), \(K_2=8\), \(K_3=M_0\), and \(K_4=2M_2\). As the scaling factors are chosen according to \( |\alpha _i| < a_i^2\), for \( i \in \mathbb {N}_N\), we have that \(\Vert \alpha \Vert _{\infty }=O(h^2)\). If \(c=O(h)\), then we get the desired estimate in (49). \(\square \)

The above convergence rate for \(L_D^{\alpha }f\) makes \(L_D^{\alpha }f\) more valuable than the fractal quasi-operator \(L_C^{\alpha }f\). We provide an example to demonstrate the superior performance of the fractal quasi-interpolation method over the classical quasi-interpolants. Both interpolants work equally well for smooth functions but when we approximate a self-similar and/or irregular function, then the fractal quasi-interpolation operator \(L_D^{\alpha }\) has definite advantages over its classical counterpart \(L_D\).

Example 7

Consider a fractal function \(f^*(x), x\in [0,1]\), which is constructed from the IFS (7) with germ function \(f(x)=\sin (\pi x)\), partition \(P:=\{0, \frac{1}{5}, \frac{2}{5},\frac{3}{5}, \frac{4}{5}, 1\}\subseteq [0,1]\), a base function b which is the Bernstein polynomial \(B_2f\), and \(\beta _i=0.2\), for all \(i\in \mathbb {N}_{5}\).

The fractal function \(f^*\) is depicted in Fig. 6a and b in blue color. Applying the procedure outlined in Sect. 2, we construct a fractal MQ-function \({\phi }^{\alpha }\) corresponding to \(\Omega :=\{0,\frac{1}{5},\frac{2}{5},\frac{3}{5},\frac{4}{5},1\}\),

$$\begin{aligned} \Delta :=\left\{ -1,-\tfrac{4}{5},-\tfrac{3}{5},-\tfrac{2}{5},-\tfrac{1}{5},0,\tfrac{1}{5},\tfrac{2}{5},\tfrac{3}{5},\tfrac{4}{5},1\right\} , \end{aligned}$$

\(c=0.01\), and \(b(r):=\frac{r-1}{-2}{\phi }(-1)+\frac{r+1}{2}\).

The approximants \(L_Df^*\) and \(L_D^{\alpha }f^*\) are plotted in Fig. 6 for different values of the scaling factors (\(\alpha \in \{0.05,0.06,0.07\}\)) along with the function \(f^*\). From Fig. 6a and b, it is clear that the quasi-interpolant \(L_Df^*\) is not a good approximant for \(f^{*}\), for any value of the shape parameter c. However, \(L_D^{\alpha }f^*\) very nicely captures the irregularities of \(f^*\) and is even close to \(f^*\); see Fig. 6b. One can employ an optimization technique to obtain the optimal value for the scale factor \(\alpha \) to get a best approximation for \(f^*\). Thus, the operator \(L_D^{\alpha }\) can be used to approximate non-smooth functions effectively in addition to any smooth function.

Fig. 6
figure 6

The approximation of an irregular function by the fractal quasi-operator

In Theorem  8, we derived an upper bound for the uniform error between f and \(L_D^{\alpha }f\) in order to obtain the convergence result. We note that it is not necessarily true that \(\Vert f - L_Df \Vert _\infty \le \Vert f -L_D^{\alpha }f \Vert _\infty \) even for a smooth function f. The following example shows that \(L_D^{\alpha }f\) is a much better approximant than the classical quasi-approximant \(L_Df.\)

Example 8

Consider the smooth function \(f(x)=\sin ( \pi x)\), \(x\in [0,1]\). The smooth fractal MQ-function \(\phi ^{\alpha }\) is constructed according to Sect. 3, where \(\Omega :=\{0,\frac{1}{5},\frac{2}{5},\frac{3}{5},\frac{4}{5},1\}\subseteq [0,1]\),

$$\begin{aligned} \Delta :=\left\{ -1,-\tfrac{4}{5},-\tfrac{3}{5},-\tfrac{2}{5},-\tfrac{1}{5},0,\tfrac{1}{5},\tfrac{2}{5},\tfrac{3}{5},\tfrac{4}{5},1\right\} , \end{aligned}$$

\(\alpha _j=\alpha _{-j}, j\in {\mathbb {N}}_5\), and \(b=H_5\) on \([-1,1]\).

The fractal MQ-approximants \(L_D^{\alpha }f\) are plotted in Fig. 7a for different values of \(\alpha \) together with \(L_D\) and f. It is difficult to distinguish between these quasi-approximants graphically. Thus, we plotted in Fig. 7b the graphs of the errors \(|f- L_D^{\alpha }f|\) and \(|f - L_Df|\). The error between the quasi-interpolants and f is less than that between the classical quasi-approximant and f. This example shows that fractal quasi-approximants are superior to the classical quasi-approximants.

Fig. 7
figure 7

The approximation of a smooth function by the fractal quasi-operator \(L_D\)

6 Conclusion

In this work, we proposed the novel concepts of a fractal multiquadric function \({\phi }^\alpha (r)\) and a fractal quasi-interpolation operator. The former generalizes the classical multiquadric functions \({\phi }(r)=\sqrt{r^2+c^2}\), \(c>0\), and the latter the classical quasi-interpolation operators. We derived suitable conditions for the scaling factors to preserve the smoothness and convexity of a germ function \({\phi }\). Two quasi-interpolations operators \(L_C^{\alpha }f\) and \(L_D^{\alpha }f\) that we introduced have been investigated concerning their shape-preserving properties, such as linear polynomial reproduction, convexity, concavity, and monotonicity. Through our analysis, we provided evidence showcasing the advantages of fractal quasi-approximants over their classical counterparts. Additionally, we delved into the rate of convergence of these fractal quasi-interpolants to the original function. Our findings suggest that these newly introduced fractal quasi-interpolants are adept at approximating both smooth and irregular functions effectively.