1 Introduction

A lot of applications, which are of fundamental interest in numerical analysis, have been made on the expansion of an analytic function f(x) in a series of the form

f(x)= k = 0 a k φ k (x),
(1.1)

where the set { φ k (x)} is a special trial polynomial (or function) basis and a k ’s are constant coefficients [19]. One of the main utilization areas of the expansions with different basis can be seen in the solution methods for the differential equations. The idea of finding the solution of a differential equation in form (1.1) goes back, at least, to Lanczos (1938) [10, 11]. Then, three main techniques have been evolved from that idea, and each of these techniques has its own advantages in the implementation (details and applications of those can be seen in [1113]). Here, we deal only with the pseudospectral (collocation) type method. In the pseudospectral method, the solution of a differential equation is expressed as a linear combination of the polynomials in the basis set. Therefore, the coefficients in the combination are determined by the use of certain discrete points called collocation points. Thus, the accuracy of the approximation and the efficiency of its implementation are closely related to the choice of the grid points and the basis set. Determination of an appropriate set of basis should be kept in view of some rules. The most common one of those rules is that the geometry or the field of applicability determines the basis set. Then, collocation points are chosen according to the basis (for details see [12]). For example, the well-known basis functions of the Fourier expansion {1,cos(nx),sin(nx),} are all periodic. Thus, Fourier expansion is good for the solutions of the problems with periodic behaviors [1214]. On the other hand, since the Chebyshev polynomials of the first kind and Legendre polynomials are orthogonal in the interval [1,1], non-periodic problems on the range of [1,1] can be solved by the collocation method, the matrix method or the Tau method [1523]. However, when the problem is posed on an unbounded interval, alternative strategies are developed for the solution, such as domain truncation [24] and choosing a basis functions intrinsic to an infinite interval as Sinc [25], Hermite [26], and exponential Chebyshev [27]) or to semi-infinite interval as rational Chebyshev [2830], and Laguerre [31].

In this work, our aim is to develop a new type of collocation method for the boundary value problems (BVPs) on any subinterval of the real axis requiring no domain translation. For this reason, Fibonacci polynomials that have, so far, never been used as a basis for the collocation are considered. Even though this new approach is mainly intended for the BVPs, it can be successfully implemented on the initial value problems (IVPs).

Byrd [32] has defined the set { φ k (t)} (k=0,1,) as Fibonacci polynomials that satisfy the recurrence relation

φ k + 2 (t)2t φ k + 1 (t) φ k (t)=0,<t<
(1.2)

with the initial conditions

φ 0 (t)=0, φ 1 (t)=1.
(1.3)

He has also noted that in the special case of t= 1 2 , the relation above with the initial conditions reduces to the recurrence equation of Fibonacci numbers denoted by φ k ( 1 2 ) or F k . However, equation (1.2) with conditions (1.3) has a wide use as the relation of Pell polynomials [33]. Therefore, the well-known and common recurrence relation for the Fibonacci polynomials { F k (x)} (k=0,1,) is given [34]

F k + 2 (x)x F k + 1 (x) F k (x)=0

with the initial conditions F 0 (x)=0, F 1 (x)=1. It is also noteworthy that the polynomial φ k (t) turns into F k (x) when the variable change of t= x 2 is used in equation (1.2).

Byrd [32] has investigated some fundamental properties and certain applications for the expansion of an analytic function in a series of basic set of Fibonacci polynomials. Moreover, many other important properties of those polynomials are also studied by Falcon and Plaza in [34, 35] and references therein.

2 Properties of the Fibonacci polynomials

The k-Fibonacci numbers and polynomials have been defined as follows:

Definition 1 [34]

For any positive real number k, the k-Fibonacci sequence is defined recurrently by

F k , n + 1 =k F k , n + F k , n 1 ,n1
(2.1)

with the initial conditions

F k , 0 =0; F k , 1 =1.

Definition 2 [34]

If k is a real variable x in equation (2.1), then it is obvious that F k , n = F x , n . Therefore, the corresponding Fibonacci polynomials are given by the following general formula

F n + 1 (x)={ 1 , if  n = 0 , x , if  n = 1 , x F n ( x ) + F n 1 ( x ) , if  n > 1 ,
(2.2)

from which the first few Fibonacci polynomials can be deduced as

F 1 ( x ) = 1 , F 2 ( x ) = x , F 3 ( x ) = x 2 + 1 , F 4 ( x ) = x 3 + 2 x ,

The next proposition indicates the relation between the derivatives of the Fibonacci polynomials followed by the integral equation.

Proposition 1 [35]

The equality

F n (x)= 1 n [ F n + 1 ( x ) + F n 1 ( x ) ]
(2.3)

holds for all natural numbers n. Thus, in view of (2.3), it is easy to verify the integral equation

0 x F n (x)dx= 1 n { F n + 1 ( x ) + F n 1 ( x ) F n + 1 ( 0 ) F n 1 ( 0 ) } .
(2.4)

If n is even, it can be seen that F n + 1 (0)= F n 1 (0)=1 and, for odd n’s, we write F n + 1 (0)= F n 1 (0)=0.

Function approximation

Now, suppose that f(x) is a continuous function that can be expressed in terms of the Fibonacci polynomials

f(x)= r = 1 a r F r (x).
(2.5)

Then, a truncated expansion of N Fibonacci polynomials can be written

f(x) r = 1 N a r F r (x)=F(x)A,
(2.6)

where the Fibonacci row vector F(x) and the Fibonacci coefficient column vector A are given, respectively, by

F(x)= [ F 1 ( x ) F 2 ( x ) F N ( x ) ] ,
(2.7)
A= [ a 1 a 2 a N ] T .
(2.8)

Matrix relations of the derivatives of approximation

The k th order derivative of the function (2.5) can be written as

f ( k ) (x)= r = 1 a r ( k ) F r (x).

When the infinite sum is truncated to N terms, we get the approximation

f ( k ) (x) r = 1 N a r ( k ) F r (x)=F(x) A ( k ) ,k=0,1,,n,
(2.9)

where a r ( 0 ) = a r , f ( 0 ) (x)=f(x) and

A ( k ) = [ a 1 ( k ) a 2 ( k ) a N ( k ) ]
(2.10)

shows the coefficient vector of the polynomial approximation of k th order derivative.

Proposition 2 Let f(x) and kth order derivative be the functions given by (2.6) and (2.9), respectively. Then, there exists a relation between the Fibonacci coefficient matrices as

A ( k + 1 ) = D k A,k=0,1,,n,
(2.11)

where D is N×N operational matrix for the derivative defined by

D=[ d i , j ]={ i sin ( j i ) π 2 , j > i , 0 , j i .
(2.12)

Proof By using the integral relation (2.4), the Fibonacci coefficients a r ( k ) and a r ( k + 1 ) hold the equality,

a r ( k ) = a r 1 ( k + 1 ) r 1 + a r + 1 ( k + 1 ) r + 1 .
(2.13)

Therefore, it is easy to see the following recursive relations

a r + 1 ( k ) = a r ( k + 1 ) r + a r + 2 ( k + 1 ) r + 2 , a r + 3 ( k ) = a r + 2 ( k + 1 ) r + 2 a r + 4 ( k + 1 ) r + 4 , a r + 5 ( k ) = a r + 4 ( k + 1 ) r + 4 + a r + 6 ( k + 1 ) r + 6 ,

Then, summing the terms on both sides gives

a r ( k + 1 ) r = a r + 1 ( k ) a r + 3 ( k ) + a r + 5 ( k ) a r + 7 ( k ) +

or, equivalently,

a r ( k + 1 ) =r i = 0 ( 1 ) i a r + 2 i + 1 ( k ) ,r=1,2,,N.
(2.14)

Now, when we assume a r ( k ) =0 for r>N, the system (2.14) can be transformed into the matrix form,

A ( k + 1 ) =D A ( k ) ,k=0,1,,n.
(2.15)

Thus, using equality (2.15) allows us to write

A ( 1 ) = D A , A ( 2 ) = D A ( 1 ) = D 2 A , A ( 3 ) = D A ( 2 ) = D 3 A , A ( k ) = D k A ,

where A ( 0 ) =A. □

Corollary From equations (2.9) and (2.11), it is clear that the kth order derivative of the function can be expressed in terms of the Fibonacci coefficients as follows

f ( k ) (x)=F(x) D k A,k=0,1,,n.
(2.16)

3 Solution procedure for the ODE’s

Consider the general linear homogeneous differential equation of n th order,

k = 0 n q k (x) y ( k ) (x)=g(x).
(3.1)

To apply our proposed procedure to the problem, we assumed that the unknown function y(x) and its derivatives have similar forms as given in (2.16). Then, we define the collocation points so that

x i =a+ b a N 1 (i1),i=1,2,,N,a x i b.
(3.2)

Substituting these points (3.2) into the problem (3.1) gives

k = 1 n q k ( x i ) y ( k ) ( x i )=g( x i ),i=1,2,,N.
(3.3)

The system (3.3) can be, alternatively, written in the matrix form

k = 1 n Q k Y ( k ) =G,nN,
(3.4)

where

Q k = [ Q k ( x 1 ) 0 0 0 Q k ( x 2 ) 0 0 0 Q k ( x N ) ] andG= [ g ( x 1 ) g ( x 2 ) g ( x N ) ] T .

Therefore, k th order derivatives of the unknown function at the collocation points can be written in the matrix form as

[ y ( k ) ( x i ) ] =F( x i ) D k A,i=1,2,,N

or, equivalently,

Y ( k ) = [ y ( k ) ( x 1 ) y ( k ) ( x 2 ) y ( k ) ( x N ) ] =F D k A.
(3.5)

Consequently, substituting (3.5) in equation (3.4), yields the fundamental matrix equation for problem (3.1),

k = 1 n ( Q k F D k ) A=G,nN,
(3.6)

which corresponds to a system of (N) algebraic equations for the unknown Fibonacci coefficients a r , r=1,2,,N. In other words, when we denote the expression in the sum by W=[ w r , s ] for r=1,2,,N and s=1,2,,N, we get

WA=G.
(3.7)

Thus, the augmented matrix of equation (3.7) becomes

[W:G].
(3.8)

When the initial or boundary conditions are considered to be

y ( l ) ( c j )= λ j , j = 1 , 2 , , n 1 l = 1 , 2 , , n 1 ,a c j b,
(3.9)

it is seen from the relation (2.16), that

U j = [ y ( l ) ( c j ) ] =[ λ j ],
(3.10)

where

U j = [ u ρ , σ ] = F c j D l A and F c j = [ F 1 ( c j ) F 2 ( c j ) F N ( c j ) ] .
(3.11)

Therefore, the augmented matrix of the specified conditions is

[ U j : λ j ]=[ u j 1 u j 2 u j N : λ j ].
(3.12)

Consequently, (3.8) together with (3.12) can be written in the new augmented matrix form

[ W : G ] .
(3.13)

This form can also be achieved by replacing some rows of the matrix (3.8) by the rows of (3.12) or adding those rows to the matrix (3.8), provided that det( W )0. Finally, the vector A (thereby vector of the coefficients a r ) is determined by applying some numerical methods designed especially to solve the system of linear equations. On the other hand, when the singular case det( W )=0 appears, the least square methods are inevitably available to reach the best possible approximation. Therefore, the approximated solution can be obtained. This would be the Fibonacci series expansion of the solution to the problem (3.1) with specified conditions.

4 Numerical results

In this part, three illustrative examples have been shown in order to clarify the findings of the previous section. Then, the solutions y a (x) of the proposed method are compared with the exact solutions y e (x) in the tables and in the corresponding figures. It is noted here that the number of collocation points in the examples is indicated by the capital letter N.

Example 1 Consider the linear nonhomogeneous IVP [36],

y (x)+x y (x)2y(x)=xcosx3sinx
(4.1)

with the initial conditions

y(0)=0and y (0)=1

for which the exact solution is y e (x)=sinx.

Table 1 shows the absolute errors of the proposed method for N=7 and N=9. The approximation for N=6 and the exact solution are also plotted in Figure 1.

Figure 1
figure 1

The proposed method solution for N=6 and the exact solutions of Example 1.

Table 1 Absolute errors of Example 1 at different points

Example 2 Consider now a linear homogeneous BVP

y = ( 2 4 x 2 ) y
(4.2)

with Neumann boundary conditions

y (0)=0and y (1)=2/e,

which is known to have the exact solution y e (x)= e x 2 .

Table 2 shows the comparison of the L errors of the proposed approach, B-spline wavelet based algorithm [38] and Haar wavelet based algorithm [37]. The graphical representation of the approximation y a with the exact solution y e is also presented in Figure 2. It is very promising to note that although L errors of the solutions to the problem (4.2) for N=64 in [37, 38] are given 2.5E−05 and 5.9E−06, respectively, almost the same level of error has been achieved by the Fibonacci approach as 9.22035E−05 only for N=9.

Figure 2
figure 2

The proposed method solution for N=9 and exact solution of Example 2.

Table 2 L Errors of Example 2 for different N values

Example 3 Consider a linear nonhomogeneous BVP

y (x)+4y(x)=2,x[0,1]
(4.3)

with boundary conditions

y (0)=0, y (1)=sin(2),

whose exact solution is y e (x)= sin 2 (x). A comparison of L errors of our approach and B-spline wavelet algorithm [38] has been shown in Table 3 for different values of N. The exact and the approximate solutions of Example 3 for N=9 are plotted in Figure 3.

Figure 3
figure 3

The proposed method solution for N=9 and exact solution of Example 3.

Table 3 L Errors of Example 3

5 Conclusion

In this study, our aim is to propose a novel matrix method, based on the Fibonacci polynomials. Therefore, the operational matrices of derivative D and Fibonacci coefficient matrix F are introduced in the main body of the study. The matrix D is computationally very attractive, since it has few nonzeros above the main diagonal. Additionally, unlike the Chebyshev polynomial method, the Fibonacci approach does not require interval translation of the problem to an appropriate domain. Then, the reliability and efficiency of the method are verified by some illustrative examples of the boundary value problems. When the results are compared with some existing methods, the proposed method demonstrates its power in accuracy.