Let q be a positive integer and let (an) and (bn) be two given ℂ-valued and q-periodic sequences. First we prove that the linear recurrence in ℂ
0.1
$$x_{n + 2} = a_nx_{n + 1} + b_nx_n,\quad n\in {\open Z}_+ $$
is Hyers–Ulam stable if and only if the spectrum of the monodromy matrix
Tq: =
Aq−1 · · ·
A0 (i.e. the set of all its eigenvalues) does not intersect the unit circle Γ = {
z ∈ ℂ: |
z| = 1}, i.e.
Tq is hyperbolic. Here (and in as follows) we let
0.2
$$A_n = \left( {\matrix{ 0 & 1 \cr {b_n} & {a_n} \cr } } \right)\quad n\in {\open Z}_+ .$$
Secondly we prove that the linear differential equation
0.3
$${x}^{\prime \prime}(t) = a(t){x}^{\prime}(t) + b(t)x(t),\quad t\in {\open R},$$
(where
a(
t) and
b(
t) are ℂ-valued continuous and 1-periodic functions defined on ℝ) is Hyers–Ulam stable if and only if
P(1) is hyperbolic; here
P(
t) denotes the solution of the first-order matrix 2-dimensional differential system
0.4
$${X}^{\prime}(t) = A(t)X(t),\quad t\in {\open R},\quad X(0) = I_2,$$
where
I2 is the identity matrix of order 2 and
0.5
$$A(t) = \left( {\matrix{ 0 & 1 \cr {b(t)} & {a(t)} \cr } } \right),\quad t\in {\open R}.$$