Open Access

The application of block pulse functions for solving higher-order differential equations with multi-point boundary conditions

Advances in Difference Equations20162016:93

https://doi.org/10.1186/s13662-016-0822-6

Received: 10 January 2016

Accepted: 30 March 2016

Published: 5 April 2016

Abstract

In this paper, the block pulse function method is proposed for solving high-order differential equations associated with multi-point boundary conditions. Although the orthogonal block pulse functions frequently have been applied to approximate the solution of ordinary differential equations associated with the initial conditions, the presented method provides the flexibility with respect to multi-point boundary conditions in separated or non-separated forms. This technique, which may be named the augmented block pulse function method, reduces a system of high-order boundary value problems of ordinary differential equations to a system of algebraic equations. The illustrated results confirm the computational efficiency, reliability, and simplicity of the presented method.

Keywords

ordinary differential equations block pulse functions boundary value problem multi-point value problem separated or non-separated boundary conditions

MSC

65Lxx 94A11 34k28

1 Introduction

The systems of ordinary differential equations (ODEs) with different boundary conditions are well known for their applications in biology, chemistry, physics, engineering, and sciences [14]. There are many different reliable methods which can find the solution of ODEs for simple forms of boundary conditions. But the mathematical models of many phenomena in the real world are enforced by more difficult forms of boundary conditions such as multi-point boundary conditions in separated or non-separated forms.

Because of the importance, the boundary value problems have been solved several times by many different methods such as the finite difference method, the spline method, the radial basis functions, the wavelet method, and many other numerical and analytical methods; see [510] and the references therein. We recall that boundary conditions that are more difficult imply developing numerical methods to find the solution of the ordinary differential systems. However, some of these methods are reliable and applicable for solving ordinary differential equations; the most of these methods provide the solution only for a particular kind of differential equations or a particular kind of boundary conditions. In this study, we describe the application of the block pulse function method for solving arbitrary-order differential equations.

Recently, orthogonal block pulse functions have been widely discussed and applied to approximate the solutions of some difficult systems defined in engineering and science [1122]. The most important properties of BPFs are disjointness, orthogonality, and completeness which cause the popularity among the computational methods.

In this work, we proposed the augmented block pulse function method for solving a system of arbitrary-order boundary value problem associated with initial conditions or multi-point boundary conditions in separated or non-separated forms. Let us consider the following nth-order differential equations with assumption of the existence and uniqueness of the solution:
$$ \mathcal{L} \bigl(F(x),x \bigr)=0,\quad x\in[a,b], $$
(1)
associated with n equality conditions and
$$ F(x)= \bigl(f^{(n)}(x),f^{(n-1)}(x), \ldots,f'(x),f(x) \bigr). $$
(2)
Since the differential equation may be enforced by many different conditions, we consider the general form including separated and non-separated boundary conditions but we also can consider boundary conditions or the set of conditions including some or all of these mentioned types. Let us assume
$$ \begin{aligned} &\mathcal{L}_{1} \bigl(f(x_{0}),f(x_{1}), \ldots,f(x_{k}) \bigr)=0, \\ &\mathcal{L}_{2} \bigl(f(x_{0}),f(x_{1}), \ldots,f(x_{k}) \bigr)=0, \\ &\vdots \\ &\mathcal{L}_{n} \bigl(f(x_{0}),f(x_{1}), \ldots,f(x_{k}) \bigr)=0, \end{aligned} $$
(3)
and \(x\in\mathbb{R}\) and \(x_{0}, x_{1},\ldots,x_{k}\) (not necessarily distinct) are given real finite constants. If \(k=0\) the problem becomes the initial value problem and for \(k=1\) the problem will be called a two-point boundary value problem. It is also called a multi-point boundary value problem if \(k>1\). In the particular case of distinct \(x_{0}, x_{1},\ldots,x_{n}\), the boundary conditions of the following type:
$$\begin{aligned} & \mathcal{L}_{1} \bigl(f(x_{0}) \bigr)=0, \\ & \mathcal{L}_{2} \bigl(f(x_{1}) \bigr)=0, \\ &\vdots \\ & \mathcal{L}n \bigl(f(x_{n}) \bigr)=0, \end{aligned}$$
may be called separated and if the conditions are not separated will be called of non-separated type. In a more general form, the condition may also include the value of the derivatives of \(f(x)\) so
$$\begin{aligned} \begin{aligned} &\mathcal{L}_{1} \bigl(F(x_{0}),F(x_{1}), \ldots,F(x_{k}) \bigr)=0, \\ &\mathcal{L}_{2} \bigl(F(x_{0}),F(x_{1}), \ldots,F(x_{k}) \bigr)=0, \\ &\vdots \\ &\mathcal{L}_{n} \bigl(F(x_{0}),F(x_{1}), \ldots,F(x_{k}) \bigr)=0. \end{aligned} \end{aligned}$$
(4)
However, these types of systems arising in engineering and sciences have important applications but it is not possible to solve them analytically for arbitrary choices of \(\mathcal{L}(x)\) and \(\mathcal {L}_{i}(x)\), \(i=1,2,\ldots,n\). Therefore, the numerical methods for obtaining an approximated solution of (1) with higher accuracy still is of interest for researchers.

To make the article self-contained in Section 2 a short description on block pulse functions is added. In Section 3 the description of the method shows BPFs how can be applied to solve the high-order differential equations with a different kind of boundary conditions. The numerical results are illustrated in Section 4 to clarify more details of the proposed method and expectedly confirm the convergence and applicability of the method. Finally, a brief conclusion is stated in Section 5.

2 Block pulse functions

An m-set of BPFs over the interval \(t \in[0,1)\) is defined as follows [22]:
$$\begin{aligned} \beta_{i}(x)= \textstyle\begin{cases} 1, & x \in[\frac{i}{m},\frac{i+1}{m}),\\ 0, & \mbox{otherwise}, \end{cases}\displaystyle \end{aligned}$$
(5)
where \(i=0,1,\ldots,m-1 \) is the translation parameter and \(\beta _{i}(x)\) is called the ith BPF.
There are some properties for BPFs which make them popular for approximation such as orthogonality, disjointness, and completeness [22]. A function \(f(x)\) over the interval \([0,1)\), can be expanded in a BPFs series with an infinite number of terms
$$ {f(x)=}\sum_{i=0}^{\infty}c_{i}\beta_{i}(x),\quad x\in[0,1), $$
(6)
where the coefficients are calculated as follows:
$$ c_{i}={m} \int_{0}^{1}f(x)\beta_{i}(x)\,dx,\quad i=0,1,\ldots. $$
(7)
In fact, the series expansion (6) contains an infinite number of terms for smooth \(f(x)\). If \(f(x)\) is a piecewise constant or may be approximated by a piecewise constant, the sum in (6) will be terminated after m terms, that is,
$$ f(x)\simeq\sum_{i=0}^{m-1} c_{i}\beta_{i}(x)={\mathbf{C}_{m}^{T}} \boldsymbol {\Phi}_{m}(x),\quad x \in[0,1), $$
(8)
where
$$ \mathbf{C}_{m}={[c_{0}, c_{1}, \ldots,c_{m-1}]^{T}} \quad\mbox{and}\quad \boldsymbol {\Phi }_{m}(x)={ \bigl[\beta_{0}(x),\beta_{1}(x), \ldots, \beta_{m-1}(x) \bigr]^{T}}. $$
(9)
Also, the collocation points can be defined in the following form:
$$ \xi_{l}=\frac{2l-1}{2m},\quad l=1,2,\ldots,m, $$
(10)
Now substituting the collocation points leads to
$$ f(\xi_{l})\simeq\sum_{i=0}^{m-1} c_{i}\beta_{i}(\xi_{l})={\mathbf {C}_{m}^{T}\boldsymbol {\Phi}_{m}( \xi_{l})},\quad l=1,2,\ldots,m. $$
(11)
The above equations can be rewritten in the following matrix form:
$$ \mathbf{F}^{T}=\mathbf{C}_{m}^{T}\boldsymbol { \Phi}_{m},\quad \mbox{where } \mathbf{F}= \bigl[f(\xi_{0}), f(\xi_{1}),\ldots,f(\xi_{m-1}) \bigr]^{T}, $$
(12)
and \(\boldsymbol {\Phi}_{m}\) is the BPF matrix of order m defined by
$$ \boldsymbol {\Phi}_{m}=\mathbf{I}_{m}= \operatorname{diag} (1, 1, \ldots,1 ). $$
(13)

Theorem 2.1

[15, 23]

Suppose that \(f(x)\) is an arbitrary real bounded function, which is square integrable in the interval \([0,1)\), and
$${e_{m}(x)=}f(x)- \sum_{i=0}^{m-1} c_{i}\beta_{i}(x),\quad x \in[0,1). $$
(14)
Then
$$ \bigl\| e_{m}(x)\bigr\| _{2}\leq\frac{1}{2\sqrt{3}m}\sup _{x\in[0,1)}\bigl|f'(x)\bigr|. $$
(15)
We consider the solution of nth-order system (1) to need at least nth-order differentiability to be able to approximate the highest-order derivative of the unknown function and prevent the discontinuity seen in (8). So we first define
$$\begin{aligned} &\mathbf{P}_{1}(x)= \biggl[ \int_{0}^{x} \beta_{0}(s)\mbox{d}s, \int_{0}^{x} \beta_{1}(s)\,ds, \ldots, \int _{0}^{x} \beta_{m-1}(s)\,ds \biggr]^{T}, \end{aligned}$$
(16)
$$\begin{aligned} &\mathbf{P}_{2}(x)= \biggl[ \int_{0}^{x} \int_{0}^{x} \beta_{0}(s) \,ds^{2}, \int_{0}^{x} \int_{0}^{x} \beta_{1}(s) \,ds^{2}, \ldots, \int_{0}^{x} \int_{0}^{x} \beta_{m-1}(s)s^{2} \biggr]^{T}, \end{aligned}$$
(17)
$$\begin{aligned} &\mathbf{P}_{3}(x)= \biggl[ \int_{0}^{x} \int_{0}^{x} \int_{0}^{x} \beta_{0}(s) \,ds^{3}, \int_{0}^{x} \int _{0}^{x} \int_{0}^{x} \beta_{1}(s)\,ds^{3}, \ldots, \int_{0}^{x} \int_{0}^{x} \int_{0}^{x} \beta_{m-1}(s) \,ds^{3} \biggr]^{T}, \end{aligned}$$
(18)
$$\begin{aligned} &\vdots \\ &\mathbf{P}_{n}(x)= \bigl[\mathbf{P}_{0n}(x), \mathbf{P}_{1n}(x), \ldots ,\mathbf{P}_{m-1,n}(x) \bigr]^{T}, \end{aligned}$$
(19)
where
$$ \mathbf{P}_{in}(x)=\underbrace{ \int_{0}^{x} \int_{0}^{x}\cdots \int _{0}^{x}}_{n\mbox{-}\mathrm{times}} \beta_{i}(s) \,ds^{n} =\frac{1}{(n-1)!} \int_{0}^{x}(x-s)^{n-1} \beta_{i}(s)\,ds,\quad i=0,1,\ldots,m-1. $$
(20)
These integrals can be evaluated using the definition of BPFs for \(i=0,1,\ldots,m-1\) and are given as follows:
$$\begin{aligned} \mathbf{P}_{in}(x)= \textstyle\begin{cases} 0, & x \in [0,\frac{i}{m} ),\\ \frac{1}{n!} (x-\frac{i}{m} )^{n}, & x \in [\frac{i}{m},\frac{i+1}{m} ),\\ \frac{1}{n!} [ (x-\frac{i}{m} )^{n}- (x-\frac {i+1}{m} )^{n} ], & x \in [\frac {i+1}{m},1 ). \end{cases}\displaystyle \end{aligned}$$
(21)

Remark 2.2

More generally, we define the BPFs over the interval \([a,b)\) as
$$\begin{aligned} \bar{\beta}_{i}(x)= \textstyle\begin{cases} 1, & x \in[\alpha_{i},\beta_{i}),\\ 0, & \mbox{otherwise}, \end{cases}\displaystyle \end{aligned}$$
(22)
where
$$\begin{aligned} \alpha_{i}=a+\frac{i(b-a)}{m}, \qquad\beta_{i}=a+ \frac{(i+1)(b-a)}{m},\quad i=0,1,\ldots,m-1. \end{aligned}$$
(23)
Also, the integrals of \(\bar{\beta}_{i}(x)\) can be evaluated as
$$\begin{aligned} \widetilde{\mathbf{P}}_{in}(x)= \textstyle\begin{cases} 0, & x \in [a,\alpha_{i} ),\\ \frac{1}{n!} (x-\alpha_{i} )^{n},& x \in [\alpha_{i},\beta_{i} ),\\ \frac{1}{n!} [ (x-\alpha_{i} )^{n}- (x-\beta_{i} )^{n} ], & x \in [\beta_{i},b ). \end{cases}\displaystyle \end{aligned}$$
(24)
Note that if we assume
$$ f^{(n)}(x)\simeq\sum_{i=0}^{m-1} c_{i}\beta_{i}(x)=\mathbf{C}_{m}^{T} \boldsymbol {\Phi}_{m}(x),\quad x \in[0,1), $$
(25)
then \(f(x)\) can be approximated using \(\mathbf{P}_{in}(x)\), \(i=0,1,2,\ldots,m-1\), as follows:
$$f(x)\simeq\sum_{i=0}^{m-1} c_{i}\mathbf{P}_{in}(x)+\frac {f^{(n-1)}(0)}{(n-1)!}x^{n-1}+ \cdots+\frac {f''(0)}{2!}x^{2}+f'(0)x+f(0),\quad x \in[0,1). $$
(26)
Similarly, by using the collocations points (10) we have
$$\begin{aligned} &f(\xi_{l})\simeq\sum_{i=0}^{m-1} c_{i}\mathbf{P}_{in}(\xi_{l})+\frac {f^{(n-1)}(0)}{(n-1)!} \xi_{l}^{n-1}+\cdots+\frac{f''(0)}{2!}\xi _{l}^{2}+f'(0)\xi_{l}+f(0), \\ &\quad l=1,2,\ldots,m, \end{aligned}$$
(27)
and the matrix form of the above linear system is
$$\begin{aligned} \mathbf{F}^{T}&=\mathbf{C}^{T}_{m}{\boldsymbol { \Psi}^{(n)}_{m}}+\frac {f^{(n-1)}(0)}{(n-1)!}\mathbf{T}^{T}_{(n-1)}+ \cdots+\frac {f''(0)}{2!}\mathbf{T}^{T}_{2}+f'(0) \mathbf{T}^{T}_{1}+f(0)\mathbf {T}^{T}_{0} \\ &=\mathbf{C}^{T}_{m}{\boldsymbol {\Psi}^{(n)}_{m}}+ \sum_{j=0}^{n-1}\frac {f^{(j)}(0)}{j!} \mathbf{T}^{T}_{j}, \end{aligned}$$
(28)
where
$$\begin{aligned} &\boldsymbol {\Psi}^{(n)}_{m}= \begin{bmatrix} \varphi_{0,0}& \varphi_{0,1}&\varphi_{0,2}& \ldots&\varphi_{0,m-1} \\ 0& \varphi_{1,1}& \varphi_{1,2}&\ldots&\varphi_{1,m-1} \\ 0& 0& \varphi_{2,2}&\ldots&\varphi_{2,m-1} \\ \vdots&\vdots&\vdots&\ddots&\vdots\\ 0&0&0& \ldots&\varphi_{m-1,m-1} \end{bmatrix}, \end{aligned}$$
(29)
$$\begin{aligned} &\varphi_{i,k}=\mathbf{P}_{in}(\xi_{k+1}),\quad i=0,1,\ldots,m-1, k=i,i+1,\ldots,m-1, \end{aligned}$$
(30)
is the nth BPFs integral matrix and
$$ \mathbf{T}_{j}= \bigl[\xi_{1}^{k}, \xi_{2}^{k},\ldots,\xi_{m}^{k} \bigr]^{T},\quad j=0,1,\ldots,n-1. $$
(31)
For example, the matrix of the first time integration is
$$ \boldsymbol {\Psi}_{m}^{(1)} =\frac{1}{2m} \begin{bmatrix} 1&2&2&\ldots&2\\ 0&1&2&\ldots&2\\ 0&0&1&\ldots&2\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ 0&0&0&\ldots&1 \end{bmatrix}, $$
(32)
and the second time integration is
$$ \boldsymbol {\Psi}_{m}^{(2)}=\frac{1}{m^{2}} \begin{bmatrix} 2^{-3}&1&2&3&\ldots&m-2&m-1\\ 0&2^{-3}&1&2&\ldots&m-3&m-2\\ 0&0&2^{-3}&1&\ldots&m-4&m-3\\ \vdots&\vdots&\vdots&\vdots&\ddots&\vdots&\vdots\\ 0&0&0&0&\ldots&2^{-3}&1\\ 0&0&0&0&\ldots&0&2^{-3} \end{bmatrix}. $$
(33)
The integration of BPFs has the important role to approximate differential terms and the described matrices in (13), (32), and (33) show the sparsity of the systems made by using BPFs, which affects the computational efficiency.

3 Description of the method

First we describe the method for general form of (1) and then some particular cases will be taken to show more features of the method. Assume \(f^{(n)}(x)\) is expanded in a series as follows:
$$ f^{(n)}(x)=\sum_{i=0}^{m-1} c_{i}\bar{\beta}_{i}(x),\quad x \in[a,b], $$
(34)
which gives
$$\begin{aligned} &f^{(n-1)}(x) = \sum_{i=0}^{m-1} c_{i}{\widetilde{\mathbf {P}}}_{i1}(x)+f^{(n-1)}(a), \\ &f^{(n-2)}(x) = \sum_{i=0}^{m-1} c_{i}{\widetilde{\mathbf {P}}}_{i2}(x)+f^{(n-1)}(a)x+f^{(n-2)}(a) \\ &f^{(n-3)}(x) = \sum_{i=0}^{m-1} c_{i}{\widetilde{\mathbf {P}}}_{i3}(x)+\frac{f^{(n-1)}(a)}{2}x^{2}+f^{(n-2)}(a)x+f^{(n-3)}(a), \\ &\vdots \\ &f(x)=\sum_{i=0}^{m-1} c_{i}{ \widetilde{\mathbf{P}}}_{in}(x)+\frac {f^{(n-1)}(a)}{(n-1)!}x^{n-1}+ \frac{f^{(n-2)}(a)}{(n-2)!}x^{n-2}+\cdots +f'(a)x+f(a). \end{aligned}$$
Without loss of generality, we may assume the values of \(f^{k}(a)\), \(k=0,1,\ldots,n-1\), are unknowns such that
$$\begin{aligned} &f^{(n-1)}(x) = \sum_{i=0}^{m-1} c_{i}{\widetilde{\mathbf {P}}}_{i1}(x)+c_{m}, \\ &f^{(n-2)}(x) = \sum_{i=0}^{m-1} c_{i}{\widetilde{\mathbf {P}}}_{i2}(x)+c_{m}x+c_{m+1}, \\ &f^{(n-3)}(x) = \sum_{i=0}^{m-1} c_{i}{\widetilde{\mathbf {P}}}_{i3}(x)+\frac{c_{m}}{2}x^{2}+c_{m+1}x+c_{m+2}, \\ &\vdots \\ &f(x)= \sum_{i=0}^{m-1} c_{i}{ \widetilde{\mathbf{P}}}_{in}(x)+\frac {c_{m}}{(n-1)!}x^{n-1}+ \cdots+c_{m+n-2}x+c_{m+n-1}. \end{aligned}$$
In closed form we can write
$$f(x)= \sum_{i=0}^{m-1} c_{i}{\widetilde{\mathbf{P}}}_{in}(x)+\sum _{k=0}^{n-1}\frac{f^{(k)}(a)}{k!}x^{k},\quad x \in[a,b], $$
(35)
or
$$ f(x)= \sum_{i=0}^{m-1} c_{i}{\widetilde{\mathbf{P}}}_{in}(x)+\sum _{k=0}^{n-1}\frac{c_{m+k}}{k!}x^{k},\quad x \in[a,b], $$
(36)
where \(c_{m+k}=f^{(n-k-1)}(a)\), \(k=0,1,\ldots,n-1\).
This assumption leads to the technique which we named the augmented block pulse function (ABPF) method. In fact, we develop the BPF method to be flexible for an approximation of the differential equations with different boundaries. We replace the expansion of \(f^{(i)}(x)\), \(i=0,1,\ldots,n\), into the system of (1) and (4) and then substitute the collocation points defined in (10) as follows:
$$ \mathcal{L} \bigl(F(\xi_{l}),\xi_{l} \bigr)=0, \quad l=1,2\ldots,m, $$
(37)
and
$$ \begin{aligned} &\mathcal{L}_{1} \bigl(F(x_{0}),F(x_{1}), \ldots,F(x_{k}) \bigr)=0, \\ &\mathcal{L}_{2} \bigl(F(x_{0}),F(x_{1}), \ldots,F(x_{k}) \bigr)=0, \\ &\vdots \\ &\mathcal{L}_{n} \bigl(F(x_{0}),F(x_{1}), \ldots,F(x_{k}) \bigr)=0, \end{aligned} $$
(38)
where
$$ F(\xi_{l})= \bigl(f^{(n)}(\xi_{l}),f^{(n-1)}( \xi_{l}),\ldots,f'(\xi_{l}),f( \xi_{l}) \bigr),\quad l=1,2,\ldots,m. $$
(39)
From equations (37) and (38), a nonlinear system of \((m+n)\) equations and \((m+n)\) unknown coefficients results. Solving this system, we can obtain the unknown coefficients \(c_{i}\), \(i=0,1,\ldots,(m+n-1)\) and therefore the functions \(f^{(j)}(x)\), \(j=0,1,\ldots,n\) are identified.

Remark 3.1

It is worth noting here that we can do a few simple modifications when some of \(f^{(i)}(a)\), \(i=0,1,\ldots,n-1\), are given. Particularly if \(f^{(i)}(a)\), \(i=0,1,\ldots,n-1\), all are given, the system becomes an initial value problem and there is no need to consider any \(c_{i}\), \(i=m,\ldots,m+n-1\). In addition, we can keep the structure of the algorithm and input the given initial value into the described scheme. Obviously, the first state considers the value of \(f^{(i)}(a)\), \(i=0,1,\ldots,n-1\), precisely and the second state find them approximately such that there are good agreement between precise and approximated values. In this paper, the reported results are based on the second assumption.

Remark 3.2

Definitely we need \((n+m)\) equations which are linear independent to find a unique solution including \((n+m)\) unknown coefficients. Note that the intersection of \(\{x_{0}, x_{1},\ldots,x_{k}\}\) defined in (3), and the collocation points defined (10) should be an empty set. If there exists any common point, we can simply change the collocation points non-uniformly such that every collocation point may be chosen from \([\frac{i}{m},\frac{i+1}{m} )\), \(i=0,1,2,\ldots, m-1\) in order to include all basis functions and keep the structure of constructed matrices demonstrated in (13), (32), and (33) and for higher order. Obviously, there are many sets of points that are appropriate candidates for leading to the independent algebraic equations.

4 Numerical examples

In order to assess the accuracy of block pulse function method for solving higher-order differential equations with multi-point boundary conditions we will consider the following examples. The associated computations with the examples were performed using MAPLE 17 with 64 digits precision on a personal computer.

Example 1

Consider the following ordinary differential equation [7, 24]:
$$ y^{(6)}(x)+y(x)=6 \bigl(2x\cos(x)+5\sin(x) \bigr),\quad x\in[-1,1], $$
with the separated boundary conditions
$$\begin{aligned}[b] &y(-1)=y(1)=0, \\ &y''(-1)=-4\cos(-1)+2\sin(-1), \\ &y''(1)=4\cos(1)+2\sin(1), \\ &y^{(4)}(-1)=8\cos(-1)-12\sin(-1), \\ &y^{(4)}(1)=-8\cos(1)-12\sin(1), \end{aligned} $$
and the exact solution
$$ y(x)= \bigl(x^{2}-1 \bigr)\sin(x). $$
According to the algorithm, we first approximate \(y^{(6)}(x)\) as follows:
$$ y^{(6)}(x)\simeq\sum_{i=0}^{m-1} c_{i}\bar{\beta}_{i}(x),\quad t \in[-1,1], $$
where \(\bar{\beta}_{i}(x)\) are the BPFs defined in (22) on \([a,b]=[-1,1]\). Let us assume \(m=6\), by integration one can find \(y^{(j)}(x)\), \(j=0,1,\ldots,5\), as follows:
$$\begin{aligned} &y^{(5)}(x) = \sum_{i=0}^{5} c_{i}\widetilde{\mathbf{P}}_{i1}(x)+c_{6}, \\ &y^{(4)}(x) = \sum_{i=0}^{5} c_{i}\widetilde{\mathbf{P}}_{i2}(x)+xc_{6}+c_{7}, \\ &y^{(3)}(x) = \sum_{i=0}^{5} c_{i}\widetilde{\mathbf{P}}_{i3}(x)+\frac {x^{2}}{2} c_{6}+ xc_{7}+c_{8}, \\ &y^{(2)}(x) = \sum_{i=0}^{5} c_{i}\widetilde{\mathbf{P}}_{i4}(x)+\frac {x^{3}}{6}c_{6}+ \frac{x^{2}}{2}c_{7}+x c_{8}+c_{9}, \\ &y^{(1)}(x) =\sum_{i=0}^{5} c_{i}\widetilde{\mathbf{P}}_{i5}(x)+\frac {x^{4}}{24}c_{6}+ \frac{x^{3}}{6}c_{7}+\frac{x^{2}}{2}c_{8}+x c_{9}+c_{10}, \\ &y(x) =\sum_{i=0}^{5} c_{i} \widetilde{\mathbf{P}}_{i6}(x)+\frac {x^{5}}{120}c_{6}+ \frac{x^{4}}{24}c_{7}+\frac{x^{3}}{6}c_{8}+ \frac {x^{2}}{2}c_{9}+x c_{10}+c_{11}. \end{aligned}$$
The chosen uniform collocation points, \(-\frac{5}{6}\), \(-\frac{1}{2}\), \(-\frac{1}{6}\), \(\frac{1}{6}\), \(\frac{1}{2}\), and \(\frac{5}{6}\), should be substituted into the following equation:
$$\begin{aligned} &\sum_{i=0}^{5} c_{i}\bar{ \beta}_{i}(x)+\sum_{i=0}^{5} c_{i}\widetilde{\mathbf {P}}_{i6}(x)+\frac{x^{5}}{120}c_{6}+ \frac{x^{4}}{24}c_{7}+\frac {x^{3}}{6}c_{8}+ \frac{x^{2}}{2}c_{9}\\ &\quad{}+x c_{10}+c_{11}-6 \bigl(2x \cos(x)+5\sin(x) \bigr)=0, \end{aligned}$$
which gives sixalgebraic linear equations. Also, we will get other six linear equations as follows:
$$\begin{aligned}[b] &\sum_{i=0}^{5} c_{i} \widetilde{\mathbf{P}}_{i6}(-1)-\frac {1}{120}c_{6}+ \frac{1}{24}c_{7}-\frac{1}{6}c_{8}+ \frac{1}{2}c_{9}- c_{10}+c_{11}=0, \\ &\sum_{i=0}^{5} c_{i} \widetilde{\mathbf{P}}_{i6}(1)+\frac{1}{120}c_{6}+ \frac {1}{24}c_{7}+\frac{1}{6}c_{8}+ \frac{1}{2}c_{9}+ c_{10}+c_{11}=0, \\ &\sum_{i=0}^{5} c_{i} \widetilde{\mathbf{P}}_{i4}(-1)-\frac{1}{6}c_{6}+ \frac {1}{2}c_{7}-c_{6}+c_{8}+4\cos(-1)-2 \sin(-1)=0, \\ &\sum_{i=0}^{5} c_{i} \widetilde{\mathbf{P}}_{i4}(1)+\frac{1}{6}c_{6}+ \frac {1}{2}c_{7}+c_{6}+c_{8}-4\cos(1)+2 \sin(1)=0, \\ &\sum_{i=0}^{5} c_{i} \widetilde{\mathbf{P}}_{i2}(-1)-c_{6}+c_{7}-8\cos (-1)+12\sin(-1)=0, \\ &\sum_{i=0}^{5} c_{i} \widetilde{\mathbf{P}}_{i2}(1)+c_{6}+c_{7}+8\cos (1)+12\sin(1)=0, \end{aligned} $$
inwhich are included12 unknown coefficients. Solving the obtained system gives
$$\begin{aligned}& c_{0}=-29.156, \qquad c_{1}=-20.008,\qquad c_{2} =-7.110,\\& c_{3} =7.110,\qquad c_{4}=20.008, \qquad c_{5}=29.156,\\& c_{6}=-2.592,\qquad c_{7}=11.828,\qquad c_{8}=11.323, \\& c_{9} =1.133, \qquad c_{10}=-0.767, \qquad c_{11} =0.039, \end{aligned}$$
and Table 1 includes the observed absolute error by these values. The plots of the numerical solution by the proposed method with \(m=64\) versus the exact solution and the absolute error function are depicted in Figures 1 and 2, respectively, showing higher accuracy. The graph of the sixth derivative of the numerical solution by BPFs versus the exact solution for \(m=64\) is given in Figure 3. This example with other boundary conditions [7, 24] also can be reduced to a system of linear equations as described.
Figure 1

Plots of the numerical solution by BPFs versus the exact solution (solid-circle) of y , \(\pmb{y'}\) , \(\pmb{y''}\) , \(\pmb{y^{(3)}}\) , \(\pmb{y^{(4)}}\) , \(\pmb{y^{(5)}}\) in (a)-(f), respectively, when \(\pmb{m=64}\) for Example 1 .

Figure 2

Plots of the absolute error functions of y , \(\pmb{y'}\) , \(\pmb{y''}\) , \(\pmb{y^{(3)}}\) , \(\pmb{y^{(4)}}\) , \(\pmb{y^{(5)}}\) in (a)-(f), respectively, when \(\pmb{m=64}\) for Example 1 .

Figure 3

Sixth derivative of the numerical solution by BPFs versus the exact solution when \(\pmb{m=64}\) for Example 1 .

Table 1

The observed maximum absolute error for different values of m for Example 1

\(\boldsymbol {y^{(j)}}\)

m  = 6

m  = 10

m  = 16

m  = 32

y

1.8 × 10−4

7.1 × 10−5

2.8 × 10−5

7.1 × 10−6

\(y^{(1)}\)

5.7 × 10−4

2.2 × 10−4

8.7 × 10−5

2.3 × 10−5

\(y^{(2)}\)

1.8 × 10−3

6.8 × 10−4

2.7 × 10−4

6.8 × 10−5

\(y^{(3)}\)

5.8 × 10−3

2.3 × 10−3

9.3 × 10−4

2.4 × 10−4

\(y^{(4)}\)

2.6 × 10−2

8.8 × 10−3

3.3 × 10−3

7.5 × 10−4

\(y^{(5)}\)

3.5 × 10−1

1.2 × 10−1

4.9 × 10−2

1.2 × 10−2

\(y^{(6)}\)

7.2

4.3

2.7

1.3

Example 2

Consider the following linear fourth-order nonlocal boundary value problem [25]:
$$ y^{(4)}(x)+e^{x}y^{(3)}(x)+y(x)=1-e^{x} \cosh(x)+2\sinh(x),\quad x\in[0,1], $$
with the non-separated boundary conditions
$$\begin{aligned} &y \biggl(\frac{1}{4} \biggr)=1+\sinh \biggl(\frac{1}{4} \biggr), \qquad y' \biggl(\frac{1}{4} \biggr)=\cosh \biggl( \frac{1}{4} \biggr), \\ &y'' \biggl(\frac {1}{4} \biggr)=\sinh \biggl( \frac{1}{4} \biggr),\qquad y \biggl(\frac{1}{2} \biggr)-y \biggl( \frac{3}{4} \biggr)=\sinh \biggl(\frac{1}{2} \biggr)-\sinh \biggl( \frac{3}{4} \biggr), \end{aligned}$$
and the exact solution
$$ y(x)=1+\sinh(x). $$
Plotsof the numericalsolution by the proposed method with \(m=64\) versus the exact solution and the absolute error function are depicted in Figures 4 and 5, respectively. The graph of the fourth derivative of the numerical solution by BPFs versus the exact solution for \(m=64\) is given in Figure 6. Also, Table 2 presents the observed maximum absolute error for \(m=10\) and \(m=16\), using the proposed together with the results obtained by reproducing kernel method (RKM), given in [25]. By the comparison of the results obtained using the presented method in Table 2 with the RKM, it is easily found that the present approximations are more efficient.
Figure 4

Plots of the numerical solution by BPFs versus the exact solution (solid-circle) of y , \(\pmb{y'}\) , \(\pmb{y''}\) , \(\pmb{y^{(3)}}\) in (a)-(d), respectively, when \(\pmb{m=64}\) for Example 2 .

Figure 5

Plots of the absolute error functions of y , \(\pmb{y'}\) , \(\pmb{y''}\) , \(\pmb{y^{(3)}}\) in (a)-(d), respectively, when \(\pmb{m=64}\) for Example 2 .

Figure 6

Fourth derivative of the numerical solution by BPFs versus the exact solution when \(\pmb{m=64}\) for Example 2 .

Table 2

The observed maximum absolute error for different values of m for Example 2

x

m  = 10

m  = 16

RKM ( m  = 151) [25]

0.0

2.9 × 10−7

9.8 × 10−8

1.1 × 10−6

0.1

6.8 × 10−8

1.6 × 10−8

2.0 × 10−7

0.2

7.8 × 10−9

6.9 × 10−10

5.9 × 10−9

0.3

7.5 × 10−9

7.7 × 10−10

4.4 × 10−9

0.4

4.4 × 10−8

7.6 × 10−9

8.5 × 10−8

0.5

1.2 × 10−7

3.1 × 10−8

2.6 × 10−7

0.6

1.9 × 10−7

5.8 × 10−8

4.3 × 10−7

0.7

1.9 × 10−7

5.7 × 10−8

4.1 × 10−7

0.8

2.3 × 10−8

2.1 × 10−8

2.7 × 10−8

0.9

6.1 × 10−7

2.4 × 10−7

1.2 × 10−6

1.0

1.8 × 10−6

6.9 × 10−7

3.4 × 10−6

Example 3

Consider the following nonlinear second-order four-point boundary value problem:
$$ y''(x)-\sin^{2}(x)y'(x)+y^{2}(x)= \frac{2\sin(x)}{\cos^{3}(x)},\quad x\in[0,1], $$
with the non-separated boundary conditions
$$\begin{aligned} y (0 )=0,\qquad y(1)-\sum_{i=1}^{4} \biggl(\frac{1}{1+i} \biggr)y \biggl(\frac{i}{5} \biggr)=0.93816, \end{aligned}$$
and the exact solution
$$ y(x)=\tan(x). $$
The plots of the numerical solution by the proposed method with \(m=32\) versus the exact solution and the absolute error function are depicted in Figures 7 and 8, respectively. The graph of second derivative of the numerical solution by BPFs versus the exact solution for \(m=32\) is given in Figure 9.
Figure 7

Plots of the numerical solution by BPFs versus the exact solution (solid-circle) of y , \(\pmb{y'}\) in (a) and (b), respectively, when \(\pmb{m=32}\) for Example 3 .

Figure 8

Plots of the absolute error functions of y , \(\pmb{y'}\) in (a) and (b), respectively, when \(\pmb{m=32}\) for Example 3 .

Figure 9

Second derivative of the numerical solution by BPFs versus the exact solution when \(\pmb{m=32}\) for Example 3 .

5 Conclusion

The block pulse functions provide the efficient method to solve high-order ODEs associated with the general type of multi-point boundary conditions. According to the presented method, the nth-order ODE defined in (1), which can be linear or nonlinear system with separated and non-separated boundary conditions, will be reduced to the algebraic equations by using block pulse functions and a polynomial function of degree \(n-1\). The most important privileges of the proposed method are computational efficiency due to sparse matrices, simplicity, and reliability, so one may increase the number of basis functions and consequently the accuracy will be improved.

Declarations

Acknowledgements

Z Avazzadeh wish to thank Natural Science Foundation of Jiangsu Province (Project No. BK20150964) and gratefully acknowledges ‘A Project Funded by the Priority Academic Program Development of Jiangsu Higher Education Institutions’.

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Authors’ Affiliations

(1)
Institute of Mathematics, School of Mathematical Sciences, Nanjing Normal University
(2)
Department of Mathematics, Yazd University

References

  1. Agarwal, RP: Boundary Value Problems for High Order Differential Equations. World Scientific, Singapore (1986) View ArticleGoogle Scholar
  2. Ang, WT, Park, YS: Ordinary Differential Equations: Methods and Applications. Universal-Publishers, Boca Raton (2008) View ArticleGoogle Scholar
  3. Hsu, S-B: Ordinary Differential Equations with Applications. World Scientific, Singapore (2006) MATHGoogle Scholar
  4. Roberts, C: Ordinary Differential Equations: Applications, Models, and Computing. CRC Press, Boca Raton (2011) Google Scholar
  5. Loghmani, GB, Ahmadinia, M: Numerical solution of sixth order boundary value problems with sixth degree B-spline functions. Appl. Math. Comput. 186, 992-999 (2007) MathSciNetMATHGoogle Scholar
  6. Loghmani, GB, Alavizadeh, SR: Numerical solution of fourth-order problems with separated boundary conditions. Appl. Math. Comput. 191, 571-581 (2007) MathSciNetMATHGoogle Scholar
  7. Siddiqi, SS, Akram, G: Septic spline solutions of sixth-order boundary value problems. J. Comput. Appl. Math. 215, 288-301 (2008) MathSciNetView ArticleMATHGoogle Scholar
  8. Temimi, H, Ansari, AR: A new iterative technique for solving nonlinear second order multi-point boundary value problems. Appl. Math. Comput. 218, 1457-1466 (2011) MathSciNetMATHGoogle Scholar
  9. Vedat, SE: Solving nonlinear fifth-order boundary value problems by differential transformation method. Selçuk J. Appl. Math. 8(1), 45-49 (2007) MathSciNetMATHGoogle Scholar
  10. Wazwaz, AM: The numerical solution of fifth-order boundary value problems by the decomposition method. J. Comput. Appl. Math. 136, 259-270 (2001) MathSciNetView ArticleMATHGoogle Scholar
  11. Datta, KB, Mohan, BM: Orthogonal Functions in Systems and Control. World Scientific, Singapore (1995) View ArticleMATHGoogle Scholar
  12. Deb, A, Sarkar, G, Bhattacharjee, M, Sen, SK: All-integrator approach to linear SISO control system analysis using block pulse functions (BPF). J. Franklin Inst. 334(2), 319-335 (1997) View ArticleMATHGoogle Scholar
  13. Deb, A, Sarkar, G, Sen, SK: Block pulse functions, the most fundamental of all piecewise constant basis functions. Int. J. Syst. Sci. 25(2), 351-363 (1994) MathSciNetView ArticleMATHGoogle Scholar
  14. Harmuth, HF: Transmission of Information by Orthogonal Functions. Springer Science & Business Media. Springer, Berlin (2013) MATHGoogle Scholar
  15. Hatamzadeh-Varmazyar, S, Masouri, Z, Babolian, E: Numerical method for solving arbitrary linear differential equations using a set of orthogonal basis functions and operational matrix. Appl. Math. Model. (2015). doi:https://doi.org/10.1016/j.apm.2015.04.048 MathSciNetMATHGoogle Scholar
  16. Hatamzadeh-Varmazyar, S, Masouri, Z: Numerical method for analysis of one- and two-dimensional electromagnetic scattering based on using linear Fredholm integral equation models. Math. Comput. Model. 54, 2199-2210 (2011) MathSciNetView ArticleMATHGoogle Scholar
  17. Hatamzadeh-Varmazyar, S, Naser-Moghadasi, M, Masouri, Z: A moment method simulation of electromagnetic scattering from conducting bodies. Prog. Electromagn. Res. 81, 99-119 (2008) View ArticleGoogle Scholar
  18. Hatamzadeh-Varmazyar, S, Naser-Moghadasi, M, Babolian, E, Masouri, Z: Numerical approach to survey the problem of electromagnetic scattering from resistive strips based on using a set of orthogonal basis functions. Prog. Electromagn. Res. 81, 393-412 (2008) View ArticleGoogle Scholar
  19. Jiang, ZH, Schaufelberger, W: Block Pulse Functions and Their Applications in Control Systems. Lecture Notes in Control and Information Sciences, vol. 179. Springer, Berlin (1992) View ArticleMATHGoogle Scholar
  20. Rao, CP: Piecewise Constant Orthogonal Functions and Their Application to Systems and Control. Springer, Berlin (1983) View ArticleMATHGoogle Scholar
  21. Sannuti, P: Analysis and synthesis of dynamic systems via block-pulse functions. Proc. Inst. Electr. Eng. 124(6), 569-571 (1977) View ArticleGoogle Scholar
  22. Wang, C-H: Generalized block-pulse operational matrices and their applications to operational calculus. Int. J. Control 36, 67-76 (1982) MathSciNetView ArticleMATHGoogle Scholar
  23. Maleknejad, K, Khodabin, M, Rostami, M: A numerical method for solving m-dimensional stochastic Itô-Volterra integral equations by stochastic operational matrix. Comput. Math. Appl. 63, 133-143 (2012) MathSciNetView ArticleMATHGoogle Scholar
  24. Siddiqi, SS, Twizell, EH: Spline solutions of linear sixth order boundary value problems. Int. J. Comput. Math. 60, 295-304 (1996) View ArticleMATHGoogle Scholar
  25. Lin, YZ, Lin, JN: Numerical algorithm about a class of linear nonlocal boundary value problems. Appl. Math. Lett. 23, 997-1002 (2010) MathSciNetView ArticleMATHGoogle Scholar

Copyright

© Avazzadeh and Heydari 2016