New method for solving non-homogeneous periodic second-order difference equation and some applications

In the present study, we are interested in solving the nonhomogeneous second-order linear difference equation with periodic coefficients of period p≥2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ p\ge 2$$\end{document}, by bringing two new approaches enabling us to provide both analytic and combinatorial solutions to this family of equations. First, we get around the problem by converting this kind of equations to an equivalent family of nonhomogeneous linear difference equations of order p with constant coefficients. Second, we propose new expressions of the solutions of this family of equations, using our techniques of calculating the powers of product of companion matrices and some properties of generalized Fibonacci sequences. The study of the special case p=2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ p=2 $$\end{document} is provided. And to enhance the effectiveness of our approaches, some numerical examples are discussed.


Introduction
The nonhomogeneous linear difference equations are discrete dynamical systems, currently studied in the literature under the form, where a j : N → R (0 ≤ j ≤ r − 1) and g : N → R are given functions defined on N. Recently, the homogeneous and nonhomogeneous linear difference equation (1), has attracted a lot of attention because of their wide applications in various fields of mathematics and applied sciences.That is, discrete time systems defined by Eq. ( 1), have several applications in economics, physics, circuit theory, and other areas.For example in finance, there is an application to the well-known Leontief model, or the Samuelson-Hicks model.For this former model, the nonhomogeneous linear difference equations of the second order plays a central role (see for instance [9,13,16], and references therein).We recall that, when the coefficients a j (n) (0 ≤ j ≤ r − 1) of the linear recurrences equation ( 1) are constants, namely, a j (n) = a j , where a j (0 ≤ j ≤ r − 1) is a constant, it is well known in the literature that the explicit solutions are expressed under a combinatorial form in terms of coefficients a j (0 ≤ j ≤ r −1) or under an analytic form, using the roots of the associated characteristic polynomial P(z) = z r − a 0 z r −1 − • • • − a r −1 (see, for example, [11,12], and references therein).However, when the coefficients a j (n) (0 ≤ j ≤ r − 1) are variable, some methods have been elaborated in the literature for exhibiting formulas of the solutions of Eq. (1).That is, Kittapa gave solutions of the homogeneous linear difference equations of higher order with variable coefficients, in terms of a single matrix determinant (see [14]).In [15], the general solution for nonhomogeneous linear difference equations with variable coefficients, has been provided in terms of the determinant of a lower Hessenberg matrix.In [10], the explicit solution of the nonhomogeneous linear difference equation with variable coefficients is presented, in terms of matrix pencil theory.Malik established a closed form the solutions of (1), in terms of coefficients for the homogeneous linear difference equations with variable coefficients (see [17]).In [1], solutions of the homogeneous linear difference equations of the second order are studied in terms of the determinental approach and using the nested sum.Whereas, some explicit expressions of solutions of the homogeneous linear difference equations with periodic coefficients are established in [4].
In this paper, we present an alternative new method for solving the second order nonhomogeneous linear difference equations with periodic coefficients satisfying, where {g n } n∈N is a given real sequence and a j : N → R ( j = 0, 1) are periodic functions of period p ∈ N, with p ≥ 2, namely a 0 (n + p) = a 0 (n) and a 1 (n + p) = a 1 (n), for every n ≥ 0. In our investigation, we provide explicit solutions of ( 2) by making use of some current results established in [8], on the periodic matrix difference equations related to Eq. ( 2).Moreover, the combinatorial and analytic formulas of linearly recurrence sequences of constants coefficients, will play a central role.More precisely, the matrix equation expression of Equation ( 2) and the periodicity condition, allow us to obtain an equivalent formulation of Eq. ( 2), as a family of nonhomogeneous linear difference equations of constant coefficients.This process leads to the resolution of Eq. ( 2), by applying the method of [12].The study of this paper is structured as follows.Section 2 is devoted to the matrix formulation of the second-order difference Eq. ( 2), where the product of periodic companion matrices is considered.In addition, we give an explicit formula for the second member of the equivalent matrix equation.For this purpose, we develop algorithms for computing the finite product of companion matrices and give combinatorial expressions of powers of such class of matrices.In Sect.3, we present the first approach, where we study the scalar nonhomogeneous matrix equation of order p with constant coefficients, emanated from the second-order Eq. ( 2).This allows us to provide the solutions of the homogeneous part and the particular solutions, to obtain the combinatorial and the analytic solutions of Eq. (2).Furthermore, an illustrative example is proposed as application of the results obtained.Section 4 concerns the second approach, where we manage to give other combinatorial and analytic expressions of the solutions of Eq. (2).Section 5 is devoted to the special case when the coefficients of Eq. ( 2) are periodic of period p = 2. Finally, concluding remarks and discussion are considered.

General setting
Consider the second-order nonhomogeneous linear difference equation of periodic coefficients (2), namely, where y 0 , y 1 are the initial conditions, a j : N → R ( j = 0, 1) are periodic functions of period p ∈ N with p ≥ 2, namely a j (n + p) = a j (n) and {g n } n∈N is a given real sequence.For reason of periodicity we set, for every n ≥ p, where A(n) is a companion matrix of order p × p and U n , Y n are matrices of order p × 1.
We observe that the periodicity condition of a 0 (n), a 1 (n) implies that A(n + p) = A(n), for every n ≥ 0. Meanwhile, we show that Eq. ( 2) is equivalent to the following nonhomogeneous matrix discrete equation, Expression (3) implies that, for every m such that n − m ≥ p, we have, More generally, an iterative prove leads to the following formula, where * ,k When the matrix A(n) = A is a constant companion matrix, we show that Expression (5) represents a generalization of Expression (6) established in [12].On the other hand, using the periodicity condition of the coefficients, a straightforward computation allows us to show that Expression (5) takes the following form: for every k ≥ 1, where By taking n = kp + m + 1, with 0 ≤ m ≤ p − 2, in Expression (4) and employing the periodicity conditions, i.e.A(kp + i) = A(i), we get the following formula: In summary, we have the following result.
Proposition 2.1 Consider the second-order nonhomogeneous linear difference equation of periodic coefficients (2), namely where a 0 (n) and a 1 (n) are periodic functions of period p ≥ 2 and {g n } n∈N is a given sequence.Then, for every k ≥ 1, Eq. ( 2) is equivalent to the following system of p matrix equations (6) and (8), namely The matrix equation (3) shows that for solving Eq. ( 2), it is sufficient to compute only the Y kp , via the related matrix Expression (6).That is, it is not necessary to compute the Y kp+m+1 by solving Eq. (8).More precisely, it ensues from Proposition (2) our needed to compute C(h) and the powers B n .That is, for reasons of convenience and clarity, we can write the equation ( 6) under the following matrix equation, where Equations ( 9)- (10) will play an important role in the process of resolution of Eq. ( 2), presented in the next Sections.That is, for solving Equation (2), we are led to compute the explicit formula of C(h) and the powers B k of the constant matrix B.

Computation of the matrices C(h) and powers
Equation ( 6) can be written under the following matrix equation: where Z k = Y kp and H k is given as in (10).Equation (11) shows that Eq. ( 2) is reduced to a nonhomogeneous matrix equation of constant matrix B, given as in (7).Thence, solving Equation ( 11) calls for the following requirements: • A process for the calculation of the matrix • A process for the calculation of the powers B k of the matrix B.
Therefore, the main goal of this subsection is to implement a method for calculating the matrix C(h) (0 ≤ h ≤ p − 1) and the powers B k of the matrix B. First, put It turns from Expression (7) that Thus, a straightforward computation allows us to obtain, where α (h) (12) with the initial conditions α = 0, for every h ≥ 0. Second, let now compute the entries of the powers B k of the matrix B, given as in (7).Since B = C( p − 1) we have, where the α (h) j and the β (h) j are as in (12).For k ≥ 1, we put And as θ (1)   p γ (1) we conclude that, for every j = 1, 2, ..., p, we have the following recursive relations, Thereafter, we get the following homogeneous matrix equation, , then by induction, we acquire, for every j = 1, 2, ..., p.Let us consider the characteristic polynomial of Q, namely, 2 γ (1) 123 Using the combinatorial formula, on the powers of matrix established in [6], we obtain, for all n ≥ 2. As a matter of fact, we have the following combinatorial expression for the entries of the matrix .
Therefore, we get the following lemma, Lemma 2.2 With the same notation as above, the combinatorial formula of the powers of the matrix B, is given by, (1) and θ (1) j , γ (1) j are given by ( 12)- (14).
It follows from the above Lemma 2.2 that the entries of the powers B k are expressed in terms of the combinatorial expression ρ(n, 2), namely, Expression (16).Furthermore, we point out that the sequence {v n } n≥0 defined by v n = ρ(n + 1, 2), for n ≥ 0, satisfies the linear recursive relation of Fibonacci type v n+2 = c 0 v n+1 + c 1 v n , for n ≥ 0, with initial data v 0 = 0 and v 1 = 1 ( For more details see [6]).
Moreover, let λ 1 and λ 2 be the roots of the characteristic polynomial Thence, we get the analytic expression of the matrix powers Q n as follows: and using the fact that θ , for every k ≥ 2, we can formulate the following lemma.

Lemma 2.4
With the same notation as above, when λ 1 = λ 2 = λ the analytic formula of the powers B k of the matrix B is given by, and θ (1) j , γ (1) j are given by ( 12)-( 14).

Matrix formulation of Eq. (2)
Consider the characteristic polynomial of the matrix B, given as follows: where θ (1) j and γ (1) j ( j = 1, 2) are given by ( 12)-( 14).We point out that c 1 and c 2 are nothing else but only the coefficients of P Q (x), the characteristic polynomial of the matrix Q, given by (15).
Since P B (B) = (the matrix null), the Cayley-Hamilton Theorem implies that B p = c 1 B p−1 + c 2 B p−2 .Therefore, we conclude that or equivalently, Equations ( 9)-( 10) yield, where H s is given as in (10), namely, Consequently, the sequence {Y ( p+k) p } k≥0 , satisfies the following nonhomogeneous linear recursive relation, with 20) represents another equivalent expression of Eq. ( 3).And by a direct computation we obtain, where 20)-( 21) will play a central role in the resolution of Eq. (2).To this aim, let us compute the explicit formula for each entry of the matrix column H * k .We first show that where α (h) j are given by (12).Thence, for every i = 0, 1, ..., p + k − 4, we get Moreover, a straightforward computation allows us to conclude that , where c 1 and c 2 are as in (15).We can show that, Furthermore, we have, By combining Expressions (23), ( 24) and (25), we obtain the following explicit expression of H * k .

Lemma 2.5 With the same notation as above, the explicit formula of H
where α (h) j , z (k) j and v (k) j are given by ( 12), ( 24), (25), respectively.
In the next sections, Lemmas 2.3, 2.4 and 2.5 will be extensively used for establishing various explicit expressions of the solutions of Eq. ( 2), namely, the analytic and the combinatorial formulas of the solutions of Eq. ( 2).

Solutions of Eq. (2)-first approach
The main steps of our process for solving Eq. ( 2), consist of considering the equivalent non-homogeneous matrix equation (3).Thanks to the condition of periodicity of the coefficients a 1 (n), a 2 (n), the matrix form (3) permits us to establish that it is equivalent to a nonhomogeneous matrix equation with constant coefficients, namely, Eq. ( 20).More precisely, in light of Eq. ( 20), we observe that the matrix sequence {Y ( p+k) p } k≥1 , satisfies the following recursive relation: where c 1 , c 2 are the coefficients given by ( 19) and

Solutions of the homogeneous part of Eq. (20).
Let us consider the homogeneous matrix recurrence relation of order 2, related to Eq. ( 20), given by, Hence, by considering the entries of each vector of the former equation, we conclude that Eq. ( 2) is equivalent, to the following scalar p equations: for k ≥ 1.By setting n = k + p − 1, we get, for every n ≥ p.For reason of clarity, we denote by y <h> np+ j the solutions of the former Eq. ( 27).For every j = 0, 1, • • • , p − 1, we consider the sequence {w with initial conditions w = y ( p−1) p+ j , whose related characteristic polynomial is Thus, the combinatorial formula of {w where ρ(m, 2) is given by ( 16), namely with ρ(1, 2) = 0 and ρ(2, 2) = 1.

Particular solutions of Eq. (20).
Consider the nonhomogeneous equation (20), , with initial conditions Y p 2 and Y ( p−1) p .Then, Eq. (20) implies that the entries of the vector Y kp satisfy the nonhomogeneous scalar equations, of constant coefficients, given by, The nonhomogeneous scalar equation of type (30) have been studied in [12].More precisely, we exploit the formula given in [12, Theorem 3.1], we can obtain the explicit form, for a particular solution of Eq. ( 30), which we present in the following proposition.

Theorem 3.3 Let us consider the difference equations
Let λ 1 , λ 2 be the roots of the polynomial P(z) = z 2 − c 1 z − c 2 , where the coefficients c 1 , c 2 are as in (19).
To better visualize our main result, we will consider the following illustrative numerical example.
Example 3.4 Let us consider the difference equations ( 2) and suppose that the coefficients a 0 (n), a 1 (n) are periodic of period p = 3, with a given sequence (g n ) n>0 and initial conditions y 0 , y 1 .Suppose that for the related matrix representation (3), we have, Using the algorithm (12), we can see that the scalars α (h) j and β (h) j satisfy the following relations: We infer that c 1 , c 2 are given by c (2) 1 = −12.Thus, we obtain, and Then, for j = 0, 1, 2 and n ≥ 3, the homogeneous solution is Furthermore, using Expression (32), we get the following particular solution, where the ϕ (k) More precisely, we have, j is as follows: and α (h) j , z (k) j , v (k) j are given by ( 23), ( 24) and (25).
defined by w ( j) m = y <h> mp+ p( p−2)+ j .Therefore, the sequence {w ( j) m } m≥0 is a linear recursive sequence of order 2, of Fibonacci type, fulfilled the following the linear recurrence relation: