1 Introduction

The question about an error one commits replacing an object possessing some properties by an object fulfilling them only approximately is natural both in mathematics and in many other scientific investigations. One of the effective approaches to deal with it is using the notion of the generalized Hyers–Ulam stability.

Let us recall that an equation is said to be Hyers–Ulam stable in a class of mappings if each mapping from this class satisfying our equation “approximately” is “near” to its actual solution.

It is well-known that the problem of the stability of homomorphisms of metric groups or, in other words, of the Cauchy functional equation was posed by S.M. Ulam in 1940. A year later, Hyers in [22] gave its solution in the case of Banach spaces.

In recent years, the Hyers–Ulam stability of several objects (for instance functional equations and inequalities, isometries, differential, difference, integral and integro-differential equations, flows, groups, vector measures, and C*-algebras) has been studied by many researchers (for more information on this notion as well as its applications we refer the reader to papers [1,2,3, 5, 8, 9, 12,13,14, 16, 18,19,20, 24,25,26, 30] and books [7, 23]).

Assume that X is a linear space over the field \({\mathbb {F}}\), and Y is a linear space over the field \({\mathbb {K}}\). Let, moreover, \(a_1,a_2,a_3,a_4,b_1,b_2,b_3,b_4\in {\mathbb {F}}\) and \(C_{11},C_{12},C_{21},C_{22}\in {\mathbb {K}}\) be given scalars.

In this note, we deal with the generalized, in the spirit of Bourgin (see [4]), Hyers–Ulam stability of the following functional equation in four variables:

$$\begin{aligned} \begin{array}{ll} f(a_1(x_1+x_2),b_1(y_1+y_2))+f(a_2(x_1+x_2),b_2(y_1-y_2))\\ \\ \quad +\,f(a_3(x_1-x_2),b_3(y_1+y_2))+f(a_4(x_1-x_2),b_4(y_1-y_2))\\ \\ =C_{11}f(x_1,y_1)+C_{12}f(x_1,y_2)+C_{21}f(x_2,y_1)+C_{22}f(x_2,y_2), \end{array} \end{aligned}$$
(1)

where \(f:X^2\rightarrow Y\) and \(x_1, x_2, y_1, y_2 \in X\).

In order to do this, we use a variant of the fixed point method (more information about this method as well as the interplay between the fixed point theory and the Hyers–Ulam stability one can find in survey papers [6, 10]), namely we apply a fixed point result of Diaz and Margolis from [15] (let us only mention here that other approaches to proving the stability of functional equations include the Hyers/direct method (see [22]), the method of invariant means (see [31]), the method based on sandwich theorems (see [27]), and the method using the concept of shadowing (see [32])).

As corollaries from our main result (Theorem 2), some outcomes on the stability of some known equations will be derived in Sect. 3. Moreover, we generalize the main result from [11].

Denote by \({\mathbb {N}}\), as usual, the set of all positive integers, put \({\mathbb {N}}_0 :={\mathbb {N}}\cup \{0\}\) and

$$\begin{aligned} C:=C_{11}+C_{12}+C_{21}+C_{22}. \end{aligned}$$

Assume, moreover, that \(C\ne 0\).

2 Main Result

In this section, we prove the generalized Hyers–Ulam stability of functional equation (1).

Before we do this, let us recall that a pair (Gd) such that G is a nonempty set and \(d :G\times G\rightarrow [0,\, \infty ]\) is a function satisfying the standard metric axioms is called a generalized metric space.

The below result from [15] plays a crucial role in the proof of the main result of this note.

Proposition 1

Assume that \(({{{\mathcal {G}}}}, d)\) is a complete generalized metric space and \(T:{{{\mathcal {G}}}}\rightarrow {{{\mathcal {G}}}}\) is a strictly contractive operator with the Lipschitz constant \(L<1\). If there are \(n_0\in {\mathbb {N}}_0\) and \(x\in {{{\mathcal {G}}}}\) such that \(d(T^{n_{0}+1}x,\, T^{n_{0}}x)<\infty \), then:

  1. (i)

    the sequence \((T^j x)_{j\in {\mathbb {N}}}\) is convergent, and its limit \(x^*\) is a fixed point of the operator T;

  2. (ii)

    \(x^*\) is the unique fixed point of T in the set

    $$\begin{aligned}{{{\mathcal {G}}}}^*:=\{y\in {{{\mathcal {G}}}}: d(T^{n_{0}}x, y)<\infty \};\end{aligned}$$
  3. (iii)

    if \(y\in {{{\mathcal {G}}}}^*\), then

    $$\begin{aligned}d(y, x^*)\le \frac{1}{1-L}d(Ty, y).\end{aligned}$$

Our main result is the following.

Theorem 2

Assume that Y is a Banach space and \(\varphi :X^{4}\rightarrow [0, \infty )\) is a mapping such that

$$\begin{aligned} \begin{array}{cc} \lim _{j\rightarrow \infty }\frac{1}{|C|^{j}}\varphi \big ((2a_{1})^{j}x_{1}, (2a_{1})^{j}x_{2}, (2b_{1})^{j}y_{1}, (2b_{1})^{j}y_{2}\big )=0,&{}\\ &{}\\ x_{1}, x_{2}, y_{1}, y_{2}\in X \end{array} \end{aligned}$$
(2)

and

$$\begin{aligned} \begin{array}{cc} \varphi (2a_{1}x_{1}, 2a_{1}x_{1}, 2b_{1}y_{1}, 2b_{1}y_{1})\le |C|L\varphi (x_{1}, x_{1}, y_{1}, y_{1}),&{}\\ &{}\\ x_{1}, y_{1}\in X \end{array} \end{aligned}$$
(3)

for an \(L\in (0, 1)\). If \(f:X^2\rightarrow Y\) is a function satisfying

$$\begin{aligned} f(x, 0)=0=f(0, y), \qquad x, y\in X \end{aligned}$$
(4)

and

$$\begin{aligned} \begin{array}{ll} \Vert f(a_1(x_1+x_2),b_1(y_1+y_2))+f(a_2(x_1+x_2),b_2(y_1-y_2))\\ \\ \quad +\,f(a_3(x_1-x_2),b_3(y_1+y_2))+f(a_4(x_1-x_2),b_4(y_1-y_2))\\ \\ \quad -\,C_{11}f(x_1,y_1)-C_{12}f(x_1,y_2)-C_{21}f(x_2,y_1)-C_{22}f(x_2,y_2)\Vert \\ \\ \le \varphi (x_{1}, x_{2}, y_{1}, y_{2}),\qquad x_{1}, x_{2}, y_{1}, y_{2}\in X, \end{array} \end{aligned}$$
(5)

then there exists a unique solution \(F :X^{2}\rightarrow Y\) of Eq. (1) such that condition (4) holds and

$$\begin{aligned} \Vert f(x, y)-F(x, y)\Vert \le \frac{1}{|C|(1-L)}\varphi (x, x, y, y),\qquad x, y\in X. \end{aligned}$$
(6)

The mapping F is given by

$$\begin{aligned} F(x, y)=\lim _{j\rightarrow \infty }\frac{1}{C^{j}}f\big ((2a_{1})^jx, (2b_{1})^jy\big ),\qquad x, y\in X. \end{aligned}$$
(7)

Proof

Put

$$\begin{aligned}{{{\mathcal {G}}}}:=\{f:X^2\rightarrow Y: f\; \mathrm{satisfies} \; \mathrm{condition} \; (4)\}\end{aligned}$$

and

$$\begin{aligned}&d (g, h):=\inf \{c\in [0, \infty ]: \Vert g(x, y)-h(x, y)\Vert \\&\qquad \le c\varphi (x, x, y, y),\, x, y\in X\},\qquad g, h\in {{{\mathcal {G}}}}. \end{aligned}$$

It is a standard verification that the pair \(({{{\mathcal {G}}}}, d)\) is a complete generalized metric space.

Next, define

$$\begin{aligned}T g(x, y):=\frac{1}{C}g(2a_{1}x, 2b_{1}y),\qquad g\in {{{\mathcal {G}}}},\, x, y\in X.\end{aligned}$$

We prove that the operator \(T:{{{\mathcal {G}}}}\rightarrow {{{\mathcal {G}}}}\) is strictly contractive with the Lipschitz constant L. To this end, fix \(g, h\in {{{\mathcal {G}}}}\), \(x, y\in X\) and \(c_{g,h}\in [0, \infty ]\) such that \(d (g, h)\le c_{g,h}\). Then we have

$$\begin{aligned} \Vert g(x, y)-h(x, y)\Vert \le c_{g,h}\varphi (x, x, y, y), \end{aligned}$$
(8)

whence by (3)

$$\begin{aligned}\Vert T g(x, y)- T h(x, y)\Vert =\frac{1}{|C|}\Vert g(2a_{1}x, 2b_{1}y)-h(2a_{1}x, 2b_{1}y)\Vert \\\le \frac{1}{|C|}c_{g,h}\varphi (2a_{1}x, 2a_{1}x, 2b_{1}y, 2b_{1}y)\le Lc_{g,h}\varphi (x, x, y, y).\end{aligned}$$

Therefore \(d (T g, T h)\le L c_{g,h}\), and consequently \(d (T g, T h)\le L d (g,h)\). This shows that T is strictly contractive with the constant L.

Let us next note that by (4) and (5) we get

$$\begin{aligned} \Vert T f(x, y)-f(x, y)\Vert =\left\| \frac{1}{C}f(2a_{1}x, 2b_{1}y)-f(x, y)\right\| \le \frac{1}{|C|}\varphi (x, x, y, y), \end{aligned}$$

and therefore

$$\begin{aligned} d(T f, f)\le \frac{1}{|C|}<\infty . \end{aligned}$$
(9)

We can now apply Proposition 1 for the space \(({{{\mathcal {G}}}}, d)\), the operator T, \(n_0=0\) and \(x=f\) to deduce that the sequence \((T ^j f)_{j\in {\mathbb {N}}}\) is convergent in \(({{{\mathcal {G}}}}, d)\) and its limit F is a fixed point of T.

Thus, we have

$$\begin{aligned} F(x, y)=\lim _{j\rightarrow \infty } T^j f(x, y) \end{aligned}$$
(10)

and

$$\begin{aligned} \frac{1}{C}F(2a_{1}x, 2b_{1}y)=F(x, y). \end{aligned}$$
(11)

As one can also prove, by induction, that

$$\begin{aligned}T^j f(x, y)=\frac{1}{C^{j}}f((2a_{1})^j x, (2b_{1})^j y),\qquad j\in {\mathbb {N}},\end{aligned}$$

we get (7).

Next, note that \(f\in {{{\mathcal {G}}}}^*\). Proposition 1(iii) and (9) now shows that

$$\begin{aligned}d(f, F)\le \frac{1}{1-L}d(T f, f)\le \frac{1}{|C|(1-L)},\end{aligned}$$

and thus we obtain (6).

Moreover, it follows from (5) that

$$\begin{aligned} \begin{array}{ll} \Big \Vert \frac{1}{C^j}f\big ((2a_{1})^{j}a_1(x_1+x_2),(2b_{1})^{j}b_1(y_1+y_2)\big )\\ \\ \quad +\,\frac{1}{C^j}f\big ((2a_{1})^{j}a_2(x_1+x_2),(2b_{1})^{j}b_2(y_1-y_2)\big )\\ \\ \quad +\,\frac{1}{C^j}f\big ((2a_{1})^{j}a_3(x_1-x_2),(2b_{1})^{j}b_3(y_1+y_2)\big )\\ \\ \quad +\,\frac{1}{C^j}f\big ((2a_{1})^{j}a_4(x_1-x_2),(2b_{1})^{j}b_4(y_1-y_2)\big )\\ \\ \quad -\,C_{11}\frac{1}{C^j}f\big ((2a_{1})^{j}x_1,(2b_{1})^{j}y_1\big )-C_{12}\frac{1}{C^j}f\big ((2a_{1})^{j}x_1,(2b_{1})^{j}y_2\big )\\ \\ \quad -\,C_{21}\frac{1}{C^j}f\big ((2a_{1})^{j}x_2,(2b_{1})^{j}y_1\big )-C_{22}\frac{1}{C^j}f\big ((2a_{1})^{j}x_2,(2b_{1})^{j}y_2\big )\Big \Vert \\ \\ \le \frac{1}{|C|^j}\varphi \big ((2a_{1})^{j}x_{1}, (2a_{1})^{j}x_{2}, (2b_{1})^{j}y_{1}, (2b_{1})^{j}y_{2}\big ), \end{array} \end{aligned}$$

for \(x_{1}, x_{2}, y_{1}, y_{2}\in X\) and \(j\in {\mathbb {N}}_0\). Letting \(j\rightarrow \infty \), and using (2) and (7) we deduce hence that the mapping \(F:X^2\rightarrow Y\) is a solution of functional equation (1).

Let us finally suppose that \(F' :X^{2}\rightarrow Y\) is a solution of functional equation (1) such that conditions (4) and (6) hold true. Then clearly \(F'\) fulfills (11), and therefore it is a fixed point of the operator T. Furthermore, from (6) it follows that

$$\begin{aligned}d(f, F')\le \frac{1}{|C|(1-L)}<\infty ,\end{aligned}$$

and therefore \(F'\in {{{\mathcal {G}}}}^*\). Proposition 1(ii) now shows that \(F' =F\), which completes the proof. \(\square \)

Let us mention here that assumption (4) is natural in stability considerations on some types of functional equations, and it also appears in particular cases of (1) (see for instance [11, 21, 28]). Whether it can be omitted is an open question.

Theorem 2 with \(L:=\frac{1}{|C|}\) and \(\varphi :\equiv \varepsilon \) for an \(\varepsilon >0\) immediately gives the following result on the classical Hyers–Ulam stability of equation (1), which is a generalization of Theorem 1 in [11].

Corollary 3

Assume that Y is a Banach space, \(|C|>1\) and \(\varepsilon >0\). If \(f:X^2\rightarrow Y\) is a function such that condition (4) holds and

$$\begin{aligned} \begin{array}{ll} \Vert f(a_1(x_1+x_2),b_1(y_1+y_2))+f(a_2(x_1+x_2),b_2(y_1-y_2))\\ \\ \quad +\,f(a_3(x_1-x_2),b_3(y_1+y_2))+f(a_4(x_1-x_2),b_4(y_1-y_2))\\ \\ \quad -\,C_{11}f(x_1,y_1)-C_{12}f(x_1,y_2)-C_{21}f(x_2,y_1)-C_{22}f(x_2,y_2)\Vert \le \varepsilon ,\\ \qquad \quad x_{1}, x_{2}, y_{1}, y_{2}\in X, \end{array} \end{aligned}$$

then there exists a unique solution \(F :X^{2}\rightarrow Y\) of Eq. (1) such that condition (4) holds and

$$\begin{aligned} \Vert f(x, y)-F(x, y)\Vert \le \frac{\varepsilon }{|C|-1},\qquad x, y\in X. \end{aligned}$$
(12)

The mapping F is given by (7).

3 Some Consequences

Now, we present some further consequences of Theorem 2. Namely, we apply it to get some Hyers–Ulam stability results for three functional equations studied in [21, 28, 29]. These equations are connected with the two famous functional equations:

– the Cauchy equation

$$\begin{aligned} a(x+y)=a(x)+a(y) \end{aligned}$$

and

– the Jordan-von Neumann (quadratic) equation

$$\begin{aligned} q(x+y)+q(x-y)=2q(x)+2q(y). \end{aligned}$$

Let us start with the functional equation

$$\begin{aligned} \begin{array}{cc} f(x_{1}+x_{2}, y_{1}+y_{2})+f(x_{1}-x_{2}, y_{1}-y_{2})&{}\\ &{}\\ =2f(x_{1}, y_{1})+2f(x_{1}, y_{2}). \end{array} \end{aligned}$$
(13)

Let us here mention that the stability of this equation was very recently studied in [21].

Corollary 4

Assume that Y is a Banach space and \(\varphi :X^{4}\rightarrow [0, \infty )\) is a mapping such that

$$\begin{aligned} \begin{array}{cc} \lim _{j\rightarrow \infty }\frac{1}{4^{j}}\varphi \big (2^{j}x_{1} , 2^{j}x_{2} , 2^{j}y_{1}, 2^{j}y_{2}\big )=0,\qquad x_{1}, x_{2}, y_{1}, y_{2}\in X \end{array} \end{aligned}$$

and

$$\begin{aligned} \varphi (2x_{1}, 2x_{1}, 2y_{1}, 2y_{1})\le 4L\varphi (x_{1}, x_{1}, y_{1}, y_{1}),\qquad x_{1}, y_{1}\in X \end{aligned}$$

for an \(L\in (0, 1)\). If \(f:X^2\rightarrow Y\) is a function such that condition (4) holds and

$$\begin{aligned} \begin{array}{ll} \Vert f(x_{1}+x_{2}, y_{1}+y_{2})+f(x_{1}-x_{2}, y_{1}-y_{2})-2f(x_{1}, y_{1})-2f(x_{1}, y_{2})\Vert \\ \\ \le \varphi (x_{1}, x_{2}, y_{1}, y_{2}),\qquad x_{1}, x_{2}, y_{1}, y_{2}\in X, \end{array} \end{aligned}$$

then there exists a unique solution \(F :X^{2}\rightarrow Y\) of Eq. (13) fullfiling (4) and

$$\begin{aligned} \Vert f(x, y)-F(x, y)\Vert \le \frac{1}{4(1-L)}\varphi (x, x, y, y),\qquad x, y\in X. \end{aligned}$$

The mapping F is given by

$$\begin{aligned} F(x, y)=\lim _{j\rightarrow \infty }\frac{1}{4^{j}}f\big (2^jx, 2^jy\big ),\qquad x, y\in X. \end{aligned}$$
(14)

Proof

It suffices to apply Theorem 2 with \(a_{1}=b_{1}=a_{4}=b_{4}=1\), \(a_{2}=b_{2}=a_{3}=b_{3}=0\), \(C_{1,1}=C_{1,2}=2\) and \(C_{2,1}=C_{2,2}=0\). \(\square \)

Corollary 4 with \(L:=\frac{1}{4}\) and \(\varphi :\equiv \varepsilon \) for an \(\varepsilon >0\) immediately gives the following result on the classical Hyers–Ulam stability of equation (13).

Corollary 5

Assume that Y is a Banach space and \(\varepsilon >0\). If \(f:X^2\rightarrow Y\) is a function such that (4) holds and

$$\begin{aligned} \begin{array}{ll} \Vert f(x_{1}+x_{2}, y_{1}+y_{2})+f(x_{1}-x_{2}, y_{1}-y_{2})-2f(x_{1}, y_{1})-2f(x_{1}, y_{2})\Vert \\ \\ \le \varepsilon ,\qquad x_{1}, x_{2}, y_{1}, y_{2}\in X, \end{array} \end{aligned}$$

then there exists a unique solution \(F :X^{2}\rightarrow Y\) of Eq. (13) fullfiling (4) and

$$\begin{aligned} \Vert f(x, y)-F(x, y)\Vert \le \frac{\varepsilon }{3},\qquad x, y\in X. \end{aligned}$$

The mapping F is given by (14).

Next, consider the case \(a_{1}=b_{1}=\ldots =a_{4}=b_{4}=1\) and \(C_{11}=C_{12}=C_{21}=C_{22}=4\). Then from (1) we get the following functional equation

$$\begin{aligned} \begin{array}{ll} f(x_1+x_2,y_1+y_2)+f(x_1+x_2,y_1-y_2)\\ \\ \quad +\,f(x_1-x_2,y_1+y_2)+f(x_1-x_2,y_1-y_2)\\ \\ =4f(x_1,y_1)+4f(x_1,y_2)+4f(x_2,y_1)+4f(x_2,y_2), \end{array} \end{aligned}$$
(15)

which was introduced and studied in [28]. Let us also mention (see [28]) that this equation characterizes the so-called bi-quadratic mappings, i.e., functions \(f:X^2\rightarrow Y\) which are quadratic in each of their arguments. Its stability was already considered in [11, 28]. Now, we have the following.

Corollary 6

Assume that Y is a Banach space and \(\varphi :X^{4}\rightarrow [0, \infty )\) is a mapping such that

$$\begin{aligned} \lim _{j\rightarrow \infty }\frac{1}{16^{j}}\varphi \big (2^{j}x_{1}, 2^{j}x_{2}, 2^{j}y_{1}, 2^{j}y_{2}\big )=0,\qquad x_{1}, x_{2}, y_{1}, y_{2}\in X \end{aligned}$$

and

$$\begin{aligned} \varphi (2x_{1}, 2x_{1}, 2y_{1}, 2y_{1})\le 16L\varphi (x_{1}, x_{1}, y_{1}, y_{1}),\qquad x_{1}, y_{1}\in X \end{aligned}$$

for an \(L\in (0, 1)\). If \(f:X^2\rightarrow Y\) is a function satisfying condition (4) and

$$\begin{aligned} \begin{array}{ll} \big \Vert f(x_1+x_2,y_1+y_2)+f(x_1+x_2,y_1-y_2)\\ \\ \quad +\,f(x_1-x_2,y_1+y_2)+f(x_1-x_2,y_1-y_2)\\ \\ \quad -\,4f(x_1,y_1)-4f(x_1,y_2)-4f(x_2,y_1)-4f(x_2,y_2)\big \Vert \\ \\ \le \varphi (x_{1}, x_{2}, y_{1}, y_{2}),\qquad x_{1}, x_{2}, y_{1}, y_{2}\in X, \end{array} \end{aligned}$$

then there exists a unique solution \(F :X^{2}\rightarrow Y\) of Eq. (15) such that condition (4) holds and

$$\begin{aligned} \Vert f(x, y)-F(x, y)\Vert \le \frac{1}{16(1-L)}\varphi (x, x, y, y),\qquad x, y\in X. \end{aligned}$$

The mapping F is given by

$$\begin{aligned} F(x, y)=\lim _{j\rightarrow \infty }\frac{1}{16^{j}}f\big (2^jx, 2^jy\big ),\qquad x, y\in X. \end{aligned}$$
(16)

Proof

It suffices to apply Theorem 2 with \(a_{1}=b_{1}=\ldots =a_{4}=b_{4}=1\) and \(C_{11}=C_{12}=C_{21}=C_{22}=4\). \(\square \)

From Corollary 6 with \(L:=\frac{1}{16}\) and \(\varphi :\equiv \varepsilon \) for an \(\varepsilon >0\) we immediately obtain the following result on the classical Hyers–Ulam stability of equation (15).

Corollary 7

Assume that Y is a Banach space and \(\varepsilon >0\). If \(f:X^2\rightarrow Y\) is a function such that (4) holds and

$$\begin{aligned} \begin{array}{ll} \big \Vert f(x_1+x_2,y_1+y_2)+f(x_1+x_2,y_1-y_2)\\ \\ \quad +\,f(x_1-x_2,y_1+y_2)+f(x_1-x_2,y_1-y_2)\\ \\ \quad -\,4f(x_1,y_1)-4f(x_1,y_2)-4f(x_2,y_1)-4f(x_2,y_2)\big \Vert \\ \\ \le \varepsilon ,\quad x_{1}, x_{2}, y_{1}, y_{2}\in X, \end{array} \end{aligned}$$

then there exists a unique solution \(F :X^{2}\rightarrow Y\) of Eq. (15) fullfiling (4) and

$$\begin{aligned} \Vert f(x, y)-F(x, y)\Vert \le \frac{\varepsilon }{15},\qquad x, y\in X. \end{aligned}$$

The mapping F is given by (16).

A more general case of equation (1), i.e. the functional equation

$$\begin{aligned} \begin{array}{ll} f(x_1+x_2,y_1+y_2)+f(x_1+x_2,y_1-y_2)\\ \\ \quad +\,f(x_1-x_2,y_1+y_2)+f(x_1-x_2,y_1-y_2)\\ \\ =C_{11}f(x_1,y_1)+C_{12}f(x_1,y_2)+C_{21}f(x_2,y_1)+C_{22}f(x_2,y_2), \end{array} \end{aligned}$$
(17)

with \(C_{11}, C_{12}, C_{21}, C_{22}\ge 0\), was very recently investigated in [17], where its characterizations and representations of set-valued solutions are obtained. As for the generalized Hyers–Ulam stability of Eq. (17), we have the following.

Corollary 8

Assume that Y is a Banach space and \(\varphi :X^{4}\rightarrow [0, \infty )\) is a mapping such that

$$\begin{aligned} \lim _{j\rightarrow \infty }\frac{1}{|C|^{j}}\varphi \big (2^{j}x_{1}, 2^{j}x_{2}, 2^{j}y_{1}, 2^{j}y_{2}\big )=0,\qquad x_{1}, x_{2}, y_{1}, y_{2}\in X \end{aligned}$$

and

$$\begin{aligned} \varphi (2x_{1}, 2x_{1}, 2y_{1}, 2y_{1})\le |C|L\varphi (x_{1}, x_{1}, y_{1}, y_{1}),\qquad x_{1}, y_{1}\in X \end{aligned}$$

for an \(L\in (0, 1)\). If \(f:X^2\rightarrow Y\) is a function satisfying condition (4) and

$$\begin{aligned} \begin{array}{ll} \big \Vert f(x_1+x_2,y_1+y_2)+f(x_1+x_2,y_1-y_2)\\ \\ \quad +\,f(x_1-x_2,y_1+y_2)+f(x_1-x_2,y_1-y_2)\\ \\ \quad -\,C_{11}f(x_1,y_1)-C_{12}f(x_1,y_2)-C_{21}f(x_2,y_1)-C_{22}f(x_2,y_2)\big \Vert \\ \\ \le \varphi (x_{1}, x_{2}, y_{1}, y_{2}),\qquad x_{1}, x_{2}, y_{1}, y_{2}\in X, \end{array} \end{aligned}$$

then there exists a unique solution \(F :X^{2}\rightarrow Y\) of Eq. (17) such that conditions (4) and (6) hold. The mapping F is given by

$$\begin{aligned} F(x, y)=\lim _{j\rightarrow \infty }\frac{1}{C^{j}}f\big (2^jx, 2^jy\big ),\qquad x, y\in X. \end{aligned}$$
(18)

Proof

It suffices to apply Theorem 2 with \(a_{1}=b_{1}=\ldots =a_{4}=b_{4}=1\). \(\square \)

Using Corollary 8 with \(L:=\frac{1}{|C|}\) and \(\varphi :\equiv \varepsilon \) for an \(\varepsilon >0\) we immediately get the following outcome on the classical Hyers–Ulam stability of equation (17).

Corollary 9

Assume that Y is a Banach space, \(|C|>1\) and \(\varepsilon >0\). If \(f:X^2\rightarrow Y\) is a function such that (4) holds and

$$\begin{aligned} \begin{array}{ll} \big \Vert f(x_1+x_2,y_1+y_2)+f(x_1+x_2,y_1-y_2)\\ \\ \quad +\,f(x_1-x_2,y_1+y_2)+f(x_1-x_2,y_1-y_2)\\ \\ \quad -\,C_{11}f(x_1,y_1)-C_{12}f(x_1,y_2)-C_{21}f(x_2,y_1)-C_{22}f(x_2,y_2)\big \Vert \\ \\ \le \varepsilon ,\qquad x_{1}, x_{2}, y_{1}, y_{2}\in X, \end{array} \end{aligned}$$

then there exists a unique solution \(F :X^{2}\rightarrow Y\) of Eq. (17) fullfiling conditions (4) and (12). The mapping F is given by (18).

Finally, we deal with the Hyers–Ulam stability of the following functional equation

$$\begin{aligned} \begin{array}{ll} f(x_1+x_2,y_1+y_2)+f(x_1+x_2,y_1-y_2)\\ \\ =2f(x_1,y_1)+2f(x_1,y_2)+2f(x_2,y_1)+2f(x_2,y_2), \end{array} \end{aligned}$$
(19)

which was introduced and studied in [29].

Corollary 10

Assume that Y is a Banach space and \(\varphi :X^{4}\rightarrow [0, \infty )\) is a mapping such that

$$\begin{aligned} \lim _{j\rightarrow \infty }\frac{1}{8^{j}}\varphi \big (2^{j}x_{1}, 2^{j}x_{2}, 2^{j}y_{1}, 2^{j}y_{2}\big )=0,\qquad x_{1}, x_{2}, y_{1}, y_{2}\in X \end{aligned}$$

and

$$\begin{aligned} \varphi (2x_{1}, 2x_{1}, 2y_{1}, 2y_{1})\le 8L\varphi (x_{1}, x_{1}, y_{1}, y_{1}),\qquad x_{1}, y_{1}\in X \end{aligned}$$

for an \(L\in (0, 1)\). If \(f:X^2\rightarrow Y\) is a function satisfying condition (4) and

$$\begin{aligned} \begin{array}{ll} \big \Vert f(x_1+x_2,y_1+y_2)+f(x_1+x_2,y_1-y_2)\\ \\ \quad -\,2f(x_1,y_1)-2f(x_1,y_2)-2f(x_2,y_1)-2f(x_2,y_2)\big \Vert \\ \\ \le \varphi (x_{1}, x_{2}, y_{1}, y_{2}),\qquad x_{1}, x_{2}, y_{1}, y_{2}\in X, \end{array} \end{aligned}$$

then there exists a unique solution \(F :X^{2}\rightarrow Y\) of equation (19) such that condition (4) holds and

$$\begin{aligned} \Vert f(x, y)-F(x, y)\Vert \le \frac{1}{8(1-L)}\varphi (x, x, y, y),\qquad x, y\in X. \end{aligned}$$

The mapping F is given by

$$\begin{aligned} F(x, y)=\lim _{j\rightarrow \infty }\frac{1}{8^{j}}f\big (2^jx, 2^jy\big ),\qquad x, y\in X. \end{aligned}$$
(20)

Proof

It suffices to apply Theorem 2 with \(a_{1}=b_{1}=a_{2}=b_{2}=1\), \(a_{3}=b_{3}=a_{4}=b_{4}=0\) and \(C_{11}=C_{12}=C_{21}=C_{22}=2\). \(\square \)

By Corollary 10 with \(L:=\frac{1}{8}\) and \(\varphi :\equiv \varepsilon \) for an \(\varepsilon >0\) we get the following result on the Hyers–Ulam stability of Eq. (19).

Corollary 11

Assume that Y is a Banach space and \(\varepsilon >0\). If \(f:X^2\rightarrow Y\) is a function such that (4) holds and

$$\begin{aligned} \begin{array}{ll} \big \Vert f(x_1+x_2,y_1+y_2)+f(x_1+x_2,y_1-y_2)\\ \\ \quad -\,2f(x_1,y_1)-2f(x_1,y_2)-2f(x_2,y_1)-2f(x_2,y_2)\big \Vert \\ \\ \le \varepsilon ,\qquad x_{1}, x_{2}, y_{1}, y_{2}\in X, \end{array} \end{aligned}$$

then there exists a unique solution \(F :X^{2}\rightarrow Y\) of equation (19) fullfiling (4) and

$$\begin{aligned} \Vert f(x, y)-F(x, y)\Vert \le \frac{\varepsilon }{7},\qquad x, y\in X. \end{aligned}$$

The mapping F is given by (20).