1 Introduction

The equation of homomorphism is stable if every “approximate” solution can be approximated by a solution of this equation. The problem of stability of a functional equation was formulated by Ulam [1] in a conference at Wisconsin University, Madison in 1940: “Given a metric group \((G,.,\rho )\), a number \(\varepsilon >0\) and a mapping \(f:G\rightarrow G\) which satisfies the inequality \(\rho (f(xy),f(x)f(y))<\varepsilon \) for all \(x,y\in G\), does there exist a homomorphism \(h\) of \(G\) and a constant \(k>0\), depending only on \(G\), such that \(\rho (f(x),h(x))\le k\varepsilon \) for all \(x\in G?\)” If the answer is affirmative the equation \(f(xy)=f(x)f(y) \) of the homomorphism is called stable; see [2, 3]. The first answer to Ulam’s problem was given by Hyers [4] in 1941 for the Cauchy functional equation in Banach spaces, more precisely he proved: “Let \(X,Y\) be Banach spaces, \(\varepsilon \) a non-negative number, \(f:X\rightarrow Y\) a function satisfying \(\Vert f(x+y)-f(x)-f(y)\Vert \le \varepsilon \) for all \(x,y\in X\), then there exists a unique additive mapping \(h:X\rightarrow Y\) with the property \(\Vert f(x)-h(x)\Vert \le \varepsilon \) for all \(x\in X\).” Due to the question of Ulam and the result of Hyers this type of stability is called today Hyers–Ulam stability of functional equations. A similar problem was formulated and solved earlier by Pólya and Szegö in [5] for functions defined on the set of positive integers. After Hyers result a large amount of literature was devoted to study the Hyers–Ulam stability for various equations. A new type of stability for functional equations was introduced by Aoki [6] and Rassias [7] by replacing \(\varepsilon \) in the Hyers theorem with a function depending on \(x\) and \(y\), such that the Cauchy difference can be unbounded. For other results on the Hyers–Ulam stability of functional equations one can refer to [2, 8, 9]. The Hyers–Ulam stability of linear operators was considered for the first time in the papers by Miura, Takahasi et al. (see [1012]). Similar type of results are obtained in [13] for weighted composition operators on \(C(X)\), where \(X\) is a compact Hausdorff space. A result on the stability of a linear composition operator of the second order was given by Brzdek and Jung in [14].

Recently, Popa and Raşa obtained [15] a result on Hyers–Ulam stability of the Bernstein–Schnabl operators using a new approach to the Fréchet functional equation, and in [16, 17], they have shown the (in)stability of some classical operators defined on \([0,1]\) and find best constant when the positive linear operators are stable in the sense of Hyers–Ulam.

The aim of this paper is to show that Kantorovich–Stancu type operators, an operator introduced by J. P. King and Bernstein–Stancu type and Kantorovich–Bernstein–Stancu type operators with shifted knots are Hyers–Ulam stable. Further we find the best Hyers–Ulam stability constants for some of these operators. We also prove that Szász–Mirakjan and Kantorovich–Szász–Mirakjan type operators are unstable in the sense of Hyers and Ulam.

2 The Hyers–Ulam stability property of operators

In this section, we recall some basic definitions and results on Hyers–Ulam stability property which form the background of our main results.

Definition 2.1

Let \(A\) and \(B\) be normed spaces and \(T\) a mapping from \(A\) into \(B\). We say that \(T\) has the Hyers–Ulam stability property (briefly, \(T\) is HU-stable) [13] if there exists a constant \(K\) such that for any \(g\in T(A)\), \( \varepsilon >0\) and \(f\in A\) with \(\Vert Tf-g\Vert \le \varepsilon \), there exists an \(f_{0}\in A\) such that \(Tf_{0}=g\) and \(\Vert f-f_{0}\Vert \le K\varepsilon \). The number \(K\) is called a HUS constant of \(T\), and the infimum of all HUS constants of \(T\) is denoted by \(K_{T}\). Generally, \(K_{T}\) is not a HUS constant of T (see [10, 11]).

Now let \(T\) be a bounded linear operator with the kernel denoted by \(N(T)\) and the range denoted by \(R(T)\). Consider the one-to-one operator \(\widetilde{T}\) from the quotient space \(A/N(T)\) into \(B\):

$$\begin{aligned} \widetilde{T}(f+N(T))=Tf,\quad f\in A, \end{aligned}$$

and the inverse operator \(\widetilde{T}^{-1}:R(T)\rightarrow A/N(T)\).

Theorem 2.2

[13] Let \(A\) and \(B\) be Banach spaces and \(T:A\rightarrow B\) be a bounded linear operator. Then the following statements are equivalent:

  1. (a)

    \(T\) is HU-stable\(;\)

  2. (b)

    \(R(T)\) is closed\(;\)

  3. (c)

    \(\widetilde{T}^{-1}\) is bounded.

Moreover\(,\) if one of the conditions (a), (b), (c) is satisfied\(,\) then \(K_{T}=\Vert \widetilde{T}^{-1}\Vert \).

The main results used in our approach for obtaining, in some concrete cases, the explicit value of \(K_{T}\) are the formula given above and a result by Lubinsky and Ziegler [18] concerning coefficient bounds in the Lorentz representation of a polynomial.

Let \(p\in \varPi _{n}\), where \(\varPi _{n}\) is the set of all polynomials of degree at most \(n\) with real coefficients. Then \(p\) has a unique Lorentz representation of the form

$$\begin{aligned} p(x)=\sum \limits _{k=0}^{n}c_{k}x^{k}(1-x)^{n-k}, \end{aligned}$$
(2.1)

where \(c_{k}\in {\mathbb {R}}\), \(k=0,1,\ldots ,n\). Remark that, in fact, it is a representation in Bernstein–Bézier basis. Let \(T_{n}\) denote the usual \(n\)th degree Chebyshev polynomial of the first kind. Then the following representation holds (see [18]):

$$\begin{aligned} T_{n}(2x-1)=\sum \limits _{k=0}^{n}d_{n,k}x^{k}(1-x)^{n-k}(-1)^{n-k}, \end{aligned}$$
(2.2)

where

$$\begin{aligned} d_{n,k}:=\sum \limits _{j=0}^{\min \{k,n-k\}}\left( \begin{array}{c} n \\ 2j \end{array} \right) \left( \begin{array}{c} n-2j \\ k-j \end{array} \right) 4^{j},\quad k=0,1,\ldots ,n. \end{aligned}$$

It is proved in [16] that \(d_{n,k}=\left( \begin{array}{c} 2n \\ 2k \end{array} \right) ,~~k=0,1,\ldots ,n\). Therefore

$$\begin{aligned} T_{n}(2x-1)=\sum \limits _{k=0}^{n}{\left( {\begin{array}{c}2n\\ 2k\end{array}}\right) }(-1)^{n-k}x^{k}(1-x)^{n-k}. \end{aligned}$$

Remark 2.3

[16] (1) Condition (i) expresses the Hyers–Ulam stability of the equation \(Tf=g\), where \(g\in R(T)\) is given and \(f\in A\) is unknown.

(2) If \(T:A\rightarrow B\) is a bounded linear operator, then (i) is equivalent to:

(ii) for any \(f\in A\) with \(\Vert Tf\Vert \le 1\) there exists an \(f_{0}\in N(T)\) such that \(\Vert f-f_{0}\Vert \le K\), (see [19]).

So, in what follows, we shall study the HU-stability of a bounded linear operator \(T:A\rightarrow B\) by checking the existence of a constant \(K\) for which (ii) is satisfied, or equivalently, by checking the boundedness of \( \widetilde{T}^{-1}\).

Theorem 2.4

(Lubinsky and Ziegler [18]) Let \(p\) have the representation (2.1)\(,\) and let \(0\le k\le n\). Then

$$\begin{aligned} |c_{k}|\le d_{n,k}\Vert p\Vert _{\infty } \end{aligned}$$

with equality if and only if \(p\) is a constant multiple of \(T_{n}(2x-1)\).

Let \(C[0,1]\) be the space of all continuous\(,\) real-valued functions defined on \([0,1],\) and \(C_{b}[0,+\infty )\) the space of all continuous\(,\) bounded\(,\) real-valued functions on \([0,+\infty ).\) Endowed with the supremum norm\(,\) they are Banach spaces.

Popa and Raşa have shown the Hyers–Ulam stability of the following operators:

(i) Bernstein operators [16]

For each integer \(n\ge 1\), the classical Bernstein operators \(B_{n}:C[0,1]\rightarrow C[0,1]\) are defined by (see [8])

$$\begin{aligned} B_{n}f=\sum \limits _{k=0}^{n}{\left( {\begin{array}{c}n\\ k\end{array}}\right) }x^{k}(1-x)^{n-k}f\left( \frac{k}{n} \right) ,\quad f\in C[0,1],\ n\ge 1 \end{aligned}$$

are stable in the Hyers–Ulam sense and the best Hyers–Ulam stability constant is given by

$$\begin{aligned} K_{B_{n}}={\left( {\begin{array}{c}{2n}\\ {2[\frac{n}{2}]}\end{array}}\right) }\Big /{\left( {\begin{array}{c}{n}\\ {[\frac{n}{2}]}\end{array}}\right) },\quad n\in {\mathbb {N}}. \end{aligned}$$

(ii) Szász–Mirakjan operators [16]

The \(n\)th Szász–Mirakjan operator \(L_{n}:C_{b}[0,+\infty )\rightarrow C_{b}[0,+\infty )\) is defined by (see [20, pp. 338])

$$\begin{aligned} L_{n}f(x)=e^{-nx}\sum \limits _{i=0}^{\infty }f\left( \frac{i}{n}\right) \frac{n^{i}}{i! }x^{i},\quad x\in [0,+\infty ) \end{aligned}$$

is HU-unstable for each \(n\ge 1\).

(iii) Beta operators [16]

For each \(n\ge 1\), the Beta operator \(B_{n}:C[0,1]\rightarrow C[0,1]\) defined by [21]

$$\begin{aligned} L_{n}f(x):=\frac{\int \nolimits _{0}^{1}t^{nx}(1-t)^{n(1-x)}f(t)dt}{ \int \nolimits _{0}^{1}t^{nx}(1-t)^{n(1-x)}dt} \end{aligned}$$

is unstable in the sense of Hyers and Ulam.

(iv) Stancu operators [17]

Let \(C[0,1]\) be the linear space of all continuous functions \(f:[0,1]\rightarrow {\mathbb {R}}\), endowed with the supremum norm denoted by \( \Vert .\Vert \), and \(a,b\) real numbers, \(0\le a\le b\). The Stancu operators [22] \(S_{n}:C[0,1]\rightarrow \varPi _{n}\) defined by

$$\begin{aligned} ~S_{n}f(x)=\sum \limits _{k=0}^{n}f\left( \frac{k+a}{n+b}\right) {\left( {\begin{array}{c}n\\ k\end{array}}\right) } x^{k}(1-x)^{n-k}, \end{aligned}$$

\(f\in C[0,1]\) are HU-stable and the infimum of the Hyers–Ulam constant is \(K_{S_{n}}={\left( {\begin{array}{c}{2n}\\ {2[\frac{n}{2}]}\end{array}}\right) }/{\left( {\begin{array}{c}{n}\\ {[\frac{n}{2}]}\end{array}}\right) }\), for each \(n\ge 1\).

(v) Kantorovich operators [17]

Let \(X=\{f:[0,1]\rightarrow {\mathbb {R}}~|~f \text{ is } \text{ bounded } \text{ and } \text{ Riemann } \text{ integrable }\}\) be endowed with the supremum norm denoted by \(\Vert .\Vert \) are defined by

$$\begin{aligned} K_{n}f(x)=(n+1)\sum \limits _{k=0}^{n}\left( \int \nolimits _{\frac{k}{n+1}}^{\frac{k+1 }{n+1}}f(t)dt\right) {\left( {\begin{array}{c}n\\ k\end{array}}\right) }x^{k}(1-x)^{n-k}, \end{aligned}$$

\(f\in X,x\in [0,1]\) are stable in HU sense and the best HUS constant is \(K_{S_{n}}={\left( {\begin{array}{c}{2n}\\ {2[\frac{n}{2}]}\end{array}}\right) }/{\left( {\begin{array}{c}{n}\\ {[\frac{ n}{2}]}\end{array}}\right) }\).

3 Main results

(i) Kantorovich–Stancu type operators

For each integer \(n\ge 1\) let \(\varPi _{n}\) be the subspace of \(C[0,1]\) consisting of all polynomial functions of degree \(\le n\). Let \(C[0,1+m]\) be the linear space of all continuous functions \( f:[0,1]\rightarrow {\mathbb {R}}\), endowed with the supremum norm denoted by \( \Vert .\Vert \), and \(a,b\) real numbers, \(0\le a\le b\). The Kantorovich–Stancu type operators [23] \(K_{n,m}:C[0,1+m]\rightarrow \varPi _{n+m}\) are defined by

$$\begin{aligned}&K_{n,m}(f)(x)=(n+m+\beta +1)\sum \limits _{k=0}^{n+m}{\left( {\begin{array}{c}n+m\\ k\end{array}}\right) } x^{k}(1-x)^{n+m-k}\int \nolimits _{\frac{k+\alpha }{n+\beta +1}}^{\frac{k+\alpha +1}{n+\beta +1}}f(t)dt,\\&f\in C[0,1+m]. \end{aligned}$$

The kernel of \(K_{n,m}\) is given by

$$\begin{aligned} N(K_{n,m})=\left\{ f\in C[0,1+m]:~\int \nolimits _{\frac{k+\alpha }{n+\beta +1}}^{ \frac{k+\alpha +1}{n+\beta +1}}f(t)dt=0,\ 0\le k\le n+m\right\} . \end{aligned}$$

which is a closed subspace of \(C[0,1+m]\), and \(R(K_{n,m})=\varPi _{n+m} \). The operator \(\widetilde{K}_{n,m}:C[0,1+m]/N(K_{n,m})\rightarrow \varPi _{n+m}\) is bijective, \(\widetilde{K}_{n,m}^{-1}:\varPi _{n+m} \rightarrow C[0,1+m]/N(K_{n,m})\) is bounded since dim\(\varPi _{n+m}=n+m+1\), so according to Theorem 2.2 the operator \(K_{n,m}\) is Hyers–Ulam stable.

Theorem 3.1

For \(n\ge 1\)

$$\begin{aligned} K_{K_{n,m}}=\Vert \widetilde{K}_{n,m}^{-1}\Vert =\frac{(n+\beta +1){\left( \begin{array}{l}{ 2(n+m)}\\ {2[\frac{n+m}{2}]}\end{array}\right) }}{(n+m+\beta +1){\left( \begin{array}{l}{n+m}\\ {[\frac{n+m}{2}]}\end{array}\right) }}. \end{aligned}$$

Proof

Let \(p\in \varPi _{n+m}\), \(\Vert p \Vert \le 1\), and its Lorentz representation

$$\begin{aligned} p(x)=\sum \limits _{k=0}^{n+m}c_{k}(p)x^{k}(1-x)^{n+m-k},\quad x\in [0,1]. \end{aligned}$$

Consider the piecewise constant function \(f_{p}\in C[0,1+m]\) defined by

$$\begin{aligned} f_p(t)= \left\{ \begin{array}{ll} \frac{(n+\beta +1)c_k(p)}{(n+m+\beta +1){\left( {\begin{array}{c}n+m\\ k\end{array}}\right) }} &{}\quad t\in \left[ \frac{k+\alpha }{n+\beta +1},\frac{k+\alpha +1}{n+\beta +1}\right) ; \\ c_{n+m}(p) &{}\quad t\in \left[ \frac{n+m}{n+\beta +1},1\right] \end{array} \right. \end{aligned}$$

\(0\le k\le n+m-1\).

Then \(K_{n,m}f_{p}=p\) and \(\widetilde{K}_{n,m}^{-1}(p)=f_{p}+N(K_{n,m})\).

As usual, the norm of \(\widetilde{K}_{n,m}^{-1}:\varPi _{n+m} \rightarrow C[0,1+m]/N(K_{n,m})\) is defined by

$$\begin{aligned} \Vert \widetilde{K}_{n,m}^{-1}\Vert =\sup \limits _{\Vert p\Vert \le 1}\Vert \widetilde{K}_{n,m}^{-1}(p)\Vert =\sup \limits _{\Vert p\Vert \le 1}\inf \limits _{h\in N(K_{n,m})}\Vert f_{p}+h\Vert . \end{aligned}$$

Clearly

$$\begin{aligned} \inf \limits _{h\in N(K_{n,m})}\Vert f_{p}+h\Vert =\Vert f_{p}\Vert =\max \limits _{0\le k\le n+m}\frac{(n+\beta +1)|c_{k}(p)|}{(n+m+\beta +1){ \left( {\begin{array}{c}n+m\\ k\end{array}}\right) }}. \end{aligned}$$

Therefore

$$\begin{aligned} \Vert \widetilde{K}_{n,m}^{-1}\Vert&= \sup \limits _{\Vert p\Vert \le 1}\max \limits _{0\le k\le n+m}\frac{(n+\beta +1)|c_{k}(p)|}{(n+m+\beta +1){ \left( {\begin{array}{c}n+m\\ k\end{array}}\right) }} \\&\le \sup \limits _{\Vert p\Vert \le 1}\max \limits _{0\le k\le n+m}\frac{ (n+\beta +1)\Vert p\Vert d_{n+m,k}}{(n+m+\beta +1){\left( {\begin{array}{c}n+m\\ k\end{array}}\right) }} \\&= \max \limits _{0\le k\le n+m}\frac{(n+\beta +1)d_{n+m,k}}{(n+m+\beta +1){ \left( {\begin{array}{c}n+m\\ k\end{array}}\right) }}. \end{aligned}$$

On the other hand, let \(q(x)=T_{n}(2x-1),~x\in [0,1]\). Then \(\Vert q\Vert =1\) and \(|c_{k}(q)|=d_{n+m,k},~0\le k\le n+m\), according to Theorem 2.4. Consequently

$$\begin{aligned} \Vert \widetilde{K}_{n,m}^{-1}\Vert \ge \max \limits _{0\le k\le n+m}\frac{ (n+\beta +1)|c_{k}(q)|}{(n+m+\beta +1){\left( {\begin{array}{c}n+m\\ k\end{array}}\right) }}=\max \limits _{0\le k\le n+m}\frac{(n+\beta +1)d_{n+m,k}}{(n+m+\beta +1){\left( {\begin{array}{c}n+m\\ k\end{array}}\right) }} \end{aligned}$$

and so

$$\begin{aligned} \Vert \widetilde{K}_{n,m}^{-1}\Vert =\max \limits _{0\le k\le n+m}\frac{ (n+\beta +1)d_{n+m,k}}{(n+m+\beta +1){\left( {\begin{array}{c}n+m\\ k\end{array}}\right) }}=\max \limits _{0\le k\le n+m}\frac{(n+\beta +1){\left( {\begin{array}{c}2(n+m)\\ 2k\end{array}}\right) }}{(n+m+\beta +1){\left( {\begin{array}{c}n+m\\ k\end{array}}\right) }}. \end{aligned}$$

Let

$$\begin{aligned} a_{k}=\frac{(n+\beta +1){\left( {\begin{array}{c}2(n+m)\\ 2k\end{array}}\right) }}{(n+m+\beta +1){\left( {\begin{array}{c}n+m\\ k\end{array}}\right) }},\quad 0\le k\le n+m. \end{aligned}$$

Then

$$\begin{aligned} \frac{a_{k+1}}{a_{k}}=\frac{2n+2m-2k-1}{2k+1},\quad 0\le k\le n+m. \end{aligned}$$

The inequality \(\frac{a_{k+1}}{a_{k}}\ge 1\) is satisfied if and only if \( k\le [\frac{n+m-1}{2}]\), therefore

$$\begin{aligned} \max \limits _{0\le k\le n+m}a_{k}=a_{[\frac{n+m-1}{2}]+1}=\left\{ \begin{array}{ll} a_{[\frac{n+m}{2}]}, &{}\quad \hbox {n}+\hbox {m is even}; \\ a_{[\frac{n+m}{2}]+1}, &{}\quad \hbox {n}+\hbox {m is odd}. \end{array} \right. \end{aligned}$$

Since \(a_{[\frac{n+m}{2}]+1}=a_{[\frac{n+m}{2}]}\) if \(n+m\) is an odd number, we conclude that

$$\begin{aligned} K_{K_{n,m}}=\Vert {\widetilde{K}}_{n,m}^{-1}\Vert =\frac{(n+\beta +1){\left( \begin{array}{l}{ 2(n+m)}\\ {2[\frac{n+m}{2}]}\end{array}\right) }}{(n+m+\beta +1){\left( \begin{array}{l}{n+m}\\ {[\frac{n+m}{2}]}\end{array}\right) }}. \end{aligned}$$

This completes the proof of the theorem.

Remark

For \(m=\beta =0\), the above operator reduces to the classical Kantorovich operator. Therefore the infimum of the HUS constant of the Kantorovich operator is

$$\begin{aligned} K_{K_{n}}={\left( \begin{array}{l}{2n}\\ {2[\frac{n}{2}]}\end{array}\right) } \Big /{\left( \begin{array}{l}{n}\\ {[\frac{n}{2}]}\end{array}\right) }. \end{aligned}$$

This corrects the value provided by Theorem 3.3 in [17].

(ii) King’s operator

Let \(\{r_{n}(x)\}\) be a sequence of continuous functions defined on \([0,1]\) with \(0\le r_{n}(x)\le 1\), i.e., \(r_{n}(x):[0,1]\rightarrow [0,1]\) are continuous functions.

In [24], King defined the following interesting sequence of positive linear operators \(V_{n}:C[0,1]\rightarrow C[0,1]\) which generalizes the classical Bernstein operators \(B_{n}\) defined by

$$\begin{aligned} V_{n}f(x)=\sum \limits _{k=0}^{n}{\left( {\begin{array}{c}n\\ k\end{array}}\right) } (r_{n}(x))^{k}(1-r_{n}(x))^{n-k}f\left( \frac{k}{n}\right) \end{aligned}$$

for all \(f\in C[0,1],~0\le x\le 1\).

The kernel of \(V_{n}\) is given by

$$\begin{aligned} N(V_{n})=\left\{ f\in C[0,1]:~f\left( \frac{k}{n}\right) =0,\ 0\le k\le n\right\} . \end{aligned}$$

which is a closed subspace of \(C[0,1]\), and \(R(V_{n})=\varPi _{n}\). The operator \(\widetilde{K}_{n}:C[0,1]/N(V_{n})\rightarrow \varPi _{n}\) is bijective, \(\widetilde{V}_{n}^{-1}:\varPi _{n}\rightarrow C[0,1]/N(V_{n})\) is bounded since dim\(\varPi _{n}=n+1\), so according to Theorem 2.2 the operator \(V_{n}\) is Hyers–Ulam stable.

Theorem 3.2

For \(n\ge 1,\)

$$\begin{aligned} K_{V_{n}}=\Vert {\widetilde{V}}_{n}^{-1}\Vert ={\left( \begin{array}{l}{2(n)}\\ {2[\frac{n}{2}]}\end{array}\right) }\Big /{ \left( \begin{array}{l}{n}\\ {[\frac{n}{2}]}\end{array}\right) }. \end{aligned}$$

Proof

The proof is similar as Theorem 3.3 for finding the best constant in the case of Bernstein operators in [16].

(iii) Szász–Mirakjan type operators

In [25], Lupaş proposed the linear positive operators

$$\begin{aligned} L_{n}f(x)=2^{-nx}\sum \limits _{k=0}^{\infty }\frac{(nx)_k}{2^kk!}f\left( \frac{k }{n}\right) ,\quad x\in [0,+\infty ) \end{aligned}$$

with the help of the identity \(\frac{1}{(1-a)^\alpha }=\sum \limits _{k=0}^{\infty }\frac{(\alpha )_k}{k!}a^k\), \( |a|<1\) where \((\alpha )_0=1,~(\alpha )_k=\alpha (\alpha +1)\cdots (\alpha +k-1)\); \(k\ge 1\). Here we are taking an \(n\)th Szász–Mirakjan type operator \( L_{n}:C_{b}[0,+\infty )\rightarrow C_{b}[0,+\infty )\) defined by

$$\begin{aligned} L_{n}f(x)=e^{-nx}\sum \limits _{k=0}^{\infty }\frac{(nx)_k}{e^kk!}f\left( \frac{k }{n}\right) ,\quad x\in [0,+\infty ). \end{aligned}$$

Theorem 3.3

For \(n\ge 1\) the operator \(L_n\) is unstable in the sense of Hyers–Ulam.

Proof

Suppose that for a certain \(n\ge 1\), the operator \(L_n\) is HU-stable. Then there exists a constant \(K\) such that for any \(f\in C_b[0,+\infty )\) with \(\Vert L_nf\Vert _{\infty }\le 1\) there exists \(g\in N(L_n)\) with \(\Vert f-g\Vert \le K\).

According to Stirling’s formula, \(\lim _{k\rightarrow \infty }\frac{k^k}{k!e^k}=0\), so that there exists a \(j\ge 1\) such that \((K+1)\frac{j^j}{j!e^j}\le 1\).

Let \(f\in C_b[0,+\infty )\) be the function defined by

$$\begin{aligned} f(x) = \left\{ \begin{array}{ll} 0, &{}\quad x\in \left[ 0,\frac{j-1}{n}\right] \cup \left[ \frac{j+1}{n},+\infty \right) ; \\ K+1, &{}\quad x=\frac{j}{n}. \end{array} \right. \end{aligned}$$

\(f\) is linear on \([\frac{j-1}{n},\frac{j}{n}]~\text{ and }~[\frac{j}{n},\frac{j+1}{n}]\). Then

$$\begin{aligned} L_nf(x)&= e^{-nx}\dfrac{(K+1)}{j!e^j}(n x)_j \\&= e^{-nx}\frac{(K+1)}{j!}\frac{(n x)(n x+1)\cdots (nx+j-1)}{e^j} \\&= e^{-nx}\frac{(K+1)}{j!}\frac{n^jx^j(1+\frac{1}{n x})(1+\frac{2}{n x})\cdots (1+ \frac{j-1}{nx})}{e^j} \\&= e^{-nx}(K+1)\frac{n^j}{j!e^j}\left( 1+\frac{1}{n x}\right) \left( 1+\frac{2}{n x}\right) \cdots \left( 1+\frac{j-1}{nx}\right) x^j \end{aligned}$$

\(x\in [0,+\infty )\).

It is easy to check that \(\Vert L_nf\Vert _{\infty }\le 1\), so that there exists \( g\in N(L_n)\) with \(\Vert f-g\Vert _{\infty }\le K\). But then \(g(\frac{j}{n})=0\) and consequently \(K\ge \Vert f-g\Vert _{\infty }\ge |f(\frac{j}{n})-g(\frac{j}{n})|=K+1\) a contradiction. Thus the theorem is proved.

(iv) Kantorovich–Szász–Mirakjan type operators

The classical \(n\)th Szász–Mirakjan operator \(L_{n}:C_{b}[0,+\infty )\rightarrow C_{b}[0,+\infty )\) is defined by (see [20, pp. 338])

$$\begin{aligned} L_{n}f(x)=e^{-nx}\sum \limits _{i=0}^{\infty }f\left( \frac{i}{n}\right) \frac{n^{i}}{i! }x^{i},\quad x\in [0,+\infty ). \end{aligned}$$

The Kantorovich version of the Szász–Mirakjan operators are defined by

$$\begin{aligned} K_{n}f(x)=ne^{-nx}\sum \limits _{k=0}^{\infty }\frac{(nx)^{k}}{k!e^{k}} \int \nolimits _{\frac{k}{n}}^{\frac{k+1}{n}}f(t)dt,\quad x\in [0,+\infty ). \end{aligned}$$

Theorem 3.4

For \(n\ge 1\) the operator \(K_n\) is unstable in the sense of Hyers and Ulam.

Proof

The proof is similar as Theorem 3.3. But here the mapping \(f\in C_b[0,+\infty )\) is defined by

$$\begin{aligned} f(x) = \left\{ \begin{array}{ll} 0, &{}\quad x\in [0,\frac{j-1}{n}]\cup [\frac{j+1}{n},+\infty ); \\ \frac{K+1}{n}, &{}\quad x\in [\frac{j}{n},\frac{j+1}{n}]. \end{array} \right. \end{aligned}$$

Of course \(f\) is linear on \([\frac{j-1}{n},\frac{j}{n}]\) and \([\frac{j}{n},\frac{ j+1}{n}]\).

(v) Other operators

Consider the operators

(a) Bernstein–Stancu type with shifted knots introduced in [26] is defined by

$$\begin{aligned} S_{n,\alpha ,\beta }(f;x)=\left( \frac{n\!+\!\beta _2}{n}\right) ^n~\sum \limits _{k=0}^{n} f\left( \frac{k\!+\!\alpha _1}{n\!+\!\beta _1}\right) { \left( {\begin{array}{c}n\\ k\end{array}}\right) }\left( x-\frac{\alpha _2}{n\!+\!\beta _2}\right) ^k\left( \frac{ n+\alpha _2}{n+\beta _2}-x\right) ^{n-k} \end{aligned}$$

where \(\frac{\alpha _2}{n+\beta _2}\le x\le \frac{n+\alpha _2}{n+\beta _2}\) and \(\alpha _k,\beta _k~(k=1,2)\) are positive real numbers provided \(0\le \alpha _1\le \alpha _2\le \beta _1\le \beta _2\);

(b) Kantorovich type generalization of Bernstein–Stancu type operator with shifted knots introduced in [19] is defined by

$$\begin{aligned} S_{n,\alpha ,\beta }^{*}(f;x)&= (n+\beta _{1}+1)\left( \frac{n+\beta _{2} }{n}\right) ^{n}~\sum \limits _{k=0}^{n}{\left( {\begin{array}{c}n\\ k\end{array}}\right) }\left( x-\frac{\alpha _{2}}{n+\beta _{2}}\right) ^{k}\\&\times \left( \frac{n+\alpha _{2}}{n+\beta _{2}}-x \right) ^{n-k}\int \nolimits _{\frac{k+\alpha _{1}}{n+\beta _{1}+1}}^{\frac{ k+\alpha _{1}+1}{n+\beta _{1}+1}}f(t)dt \end{aligned}$$

where \(\frac{\alpha _{2}}{n+\beta _{2}}\le x\le \frac{n+\alpha _{2}}{ n+\beta _{2}}\) and \(\alpha _{k},\beta _{k}~(k=1,2)\) are positive real numbers provided \(0\le \alpha _{1}\le \alpha _{2}\le \beta _{1}\le \beta _{2}\); and

(c) \(r\)-th order of the Kantorovich type generalization of Bernstein–Stancu type operator introduced in [19] is defined by

$$\begin{aligned} S_{n,\alpha ,\beta ,r}^{*}(f;x)&= (n+\beta _{1}+1)\left( \frac{n+\beta _{2}}{n}\right) ^{n}~\sum \limits _{k=0}^{n}{\left( {\begin{array}{c}n\\ k\end{array}}\right) }\left( x-\frac{ \alpha _{2}}{n+\beta _{2}}\right) ^{k}\\&\times \left( \frac{n+\alpha _{2}}{n+\beta _{2}}-x\right) ^{n-k}\int \nolimits _{\frac{k+\alpha _{1}}{n+\beta _{1}+1}}^{ \frac{k+\alpha _{1}+1}{n+\beta _{1}+1}}\sum \limits _{j=0}^{r}f^{(j)}(t)\frac{ (x-t)^{j}}{j!}dt \end{aligned}$$

where \(f\in C^{r}[0,1]~(r=0,1,2,\ldots )\) the set of all functions \(f\) having continuous \(r\)-th derivative \(f^{(r)}(f^{(0)}(x)=f(x))\) on the segment \([0,1]\).

They are Hyers–Ulam stable since their ranges are finite dimensional.