[go: up one dir, main page]

0% found this document useful (0 votes)
79 views18 pages

Paper30 PDF

This document presents a numerical method for solving variational problems using a hybrid of block-pulse functions and Bernoulli polynomials. The properties of these hybrid functions are described. Operational matrices are utilized to integrate and take the product of the hybrid functions, allowing variational problems to be reduced to solving algebraic equations. Examples are provided to demonstrate the validity and applicability of the technique.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views18 pages

Paper30 PDF

This document presents a numerical method for solving variational problems using a hybrid of block-pulse functions and Bernoulli polynomials. The properties of these hybrid functions are described. Operational matrices are utilized to integrate and take the product of the hybrid functions, allowing variational problems to be reduced to solving algebraic equations. Examples are provided to demonstrate the validity and applicability of the technique.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/265159593

Direct method for variational problems by using hybrid of block-pulse and


Bernoulli polynomials

Article · January 2012

CITATIONS READS

8 120

3 authors, including:

Mohsen Razzaghi Yadollah Ordokhani


Mississippi State University Alzahra University
213 PUBLICATIONS   4,510 CITATIONS    146 PUBLICATIONS   1,393 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Wavelet method View project

fractional partial differential equations View project

All content following this page was uploaded by Yadollah Ordokhani on 22 April 2020.

The user has requested enhancement of the downloaded file.


Direct method for variational problems by hybrid of
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

block-pulse and Bernoulli polynomials


∗† ‡ ‡
M. Razzaghi, Y. Ordokhani, N. Haddadi

Abstract
In this paper, a numerical method for solving variational problems is presented.
The method is based upon hybrid functions approximation. The properties of hy-
brid functions consisting of block-pulse functions and Bernoulli polynomials are
presented. The operational matrices of integration and product and the integra-
tion of the cross product of two hybrid functions of block-pulse and Bernoulli
polynomials vectors are then utilized to reduce the variational problems to the
solution of algebraic equations. Illustrative examples are included to demonstrate
the validity and applicability of the technique.

Mathematics Subject Classication: 33F05; 41A30; 49M30


Keywords: Hybrid; Bernoulli polynomials; block-pulse; variational; numerical
solution

1 Introduction
In the large number of problems arising in analysis, mechanics, geometry, etc., it is nec-
essary to determine the maximal and minimal of a certain functional. Such Problems
are called variational problems [28]. The direct method of Ritz and Galerkin in solving
variational problems has been of considerable concern and is well covered in many text-
books [7, 8, 9].
The available sets of orthogonal functions can be divided into three classes. The first
class includes sets of piecewise constant basis functions (PCBF’s)(e.g., block-pulse, Haar,
Walsh, etc.). The second class consists of sets of orthogonal polynomials (e.g., Cheby-
shev, Laguerre, Legendre, etc.). The third class is the set of sine-cosine functions in the

Corresponding author: razzaghi@math.msstate.edu

Department of Mathematics and Statistics Mississippi State University, USA Mississippi State, MS
39762

Department of Mathematics, Alzahra University, Tehran, Iran
Fourier series. Orthogonal functions have been used when dealing with various prob-
lems of the dynamical systems. The main advantage of using orthogonal functions is that
they reduce the dynamical system problems to those of solving a system of algebraic
equations. The approach is based on converting the underlying differential equation
into an integral equation through integration, approximating various signals involved
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

in the equation by truncated orthogonal functions, and using the operational matrix of
integration P to eliminate the integral operations. Special attention has been given to
applications of Walsh functions [4], Chebyshev polynomials [10], Laguerre polynomials
[13], Legendre polynomials [3] and Fourier series [24]. Among orthogonal polynomials,
the shifted Legendre polynomials pm (t), m = 0, 1, 2, ..., where 0 ≤ t ≤ 1, is computation-
ally more effective [21]. The Bernoulli polynomials and Taylor series are not based on
orthogonal functions, nevertheless, they possess the operational matrix of integration.
However, since the integration of the cross product of two Taylor series vectors is given
in terms of a Hilbert matrix [25], which are known to be ill-posed, the applications of
Taylor series are limited.
For approximating an arbitrary time function the advantages of Bernoulli polyno-
mials βm (t), m = 0, 1, 2, ..., M, where 0 ≤ t ≤ 1, over shifted Legendre polynomials
pm (t), m = 0, 1, 2, ..., M, are:

a) the operational matrix P , in Bernoulli polynomials has less errors than P for shifted
Legendre polynomials for 1 < M < 10. This is because for P in βm (t) we ignore the
term βMM+1
+1
(t) pM +1 (t)
while for P in pm (t) we ignore the term 2(2M +1)
;

b) the Bernoulli polynomials have less terms than shifted Legendre polynomials. For
example β6 (t), has 5 terms while p6 (t), has 7 terms, and this difference will increase by
increasing m. Hence for approximating an arbitrary function we use less CPU time by
applying Bernoulli polynomials as compared to shifted Legendre polynomials;

c) the coefficient of individual terms in Bernoulli polynomials βm (t), are smaller than
the coefficient of individual terms in the shifted Legendre polynomials pm (t). Since the
computational errors in the product are related to the coefficients of individual terms,
the computational errors are less by using Bernoulli polynomials.

In recent years the hybrid functions consisting of the combination of block-pulse


functions with Chebyshev polynomials [14, 23, 29], Legendre polynomials [12, 17, 22], or
Taylor series [16, 18, 19] have been shown to give excellent results for discretization of
selected problems. Among these three hybrid functions, the hybrid functions of block-
pulse and Legendre polynomials have shown to be computationally more effective.

The outline of this paper is as follows: In sections 2 we introduce properties of hybrid


functions. Section 3 is devoted to the problem statement. In section 4 the numerical

2
method is used to approximate the variational problems and in Section 5 we report our
numerical findings and demonstrate the accuracy of the proposed numerical scheme by
considering four numerical examples.
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

2 Properties of Hybrid Functions


2.1 Hybrid of block-pulse and Bernoulli polynomials
Hybrid functions bnm (t), n = 1, 2, . . . , N, m = 0, 1, . . . , M are defined on the interval
[0, tf ) as

βm ( tNf t − n + 1), t ∈ [ n−1 t , n t ),



N f N f
bnm (t) = (1)
0, otherwise,
where n and m are the order of block-pulse functions and Bernoulli polynomials, respec-
tively. In Eq. (1), βm (t), m = 0, 1, 2, ... are the Bernoulli polynomials of order m, which
can be defined by [5]
Xm  
m
βm (t) = k αk tm−k ,
k=0

where αk , k = 0, 1, ..., m are Bernoulli numbers. These numbers are a sequence of


signed rational numbers which arise in the series expansion of trigonometric functions
[1] and can be defined by the identity

X tn ∞
t
= αn .
et − 1 n=0 n!

The first few Bernoulli numbers are


α0 = 1,
α1 = −1
2
,
1
α2 = 6,
α4 = −1
30
,

with α2k+1 = 0, k = 1, 2, 3, . . ..

The first few Bernoulli polynomials are

β0 (t) = 1,
β1 (t) = t − 12 ,
β2 (t) = t2 − t + 16 ,
β3 (t) = t3 − 23 t2 + 12 t.

3
These polynomials satisfy the following formula [1]

βm (0) = αm , m ≥ 0, (2)
Z x
βm+1 (x) − βm+1 (a)
βm (t)dt = , (3)
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

a m+1
Z 1
m!n!
βn (t)βm (t)dt = (−1)n−1 αn+m , m, n ≥ 1. (4)
0 (m + n)!
According to [15], Bernoulli polynomials, form a complete basis over the interval [0,1].

2.2 Function approximation


Suppose that H = L2 [0, 1] and {b10 (t), b20 (t), ..., bN M (t)} ⊂ H be the set of hybrid of
block-pulse and Bernoulli polynomials and

Y = span{b10 (t), b20 (t), ..., bN 0 (t), b11 (t), b21 (t), ..., bN 1 (t), ..., b1M (t), b2M (t), ..., bN M (t)},

and f be an arbitrary element in H. Since Y is a finite dimensional vector space, f has


the unique best approximation out of Y such as f0 ∈ Y, that is

∀y ∈ Y, k f − f0 k≤k f − y k .

Since f0 ∈ Y, there exists the unique coefficients c10 , c20 , ..., cN M such that
M X
X N
f ' f0 = cnm bnm (t) = C T B(t), (5)
m=0 n=1

where

B T (t) = [b10 (t), b20 (t), ..., bN 0 (t), b11 (t), b21 (t), ..., bN 1 (t), ..., b1M (t), b2M (t), ..., bN M (t)], (6)

and
C T = [c10 , c20 , ..., cN 0 , c11 , c21 , ..., cN 1 , ..., c1M , c2M , ..., cN M ]. (7)

2.3 Integration of B(t)B T (t)


Using Eq. (5) we obtain
M X
X N M X
X N
fij =< cnm bnm (t), bij (t) >= cnm dij
nm ,
m=0 n=1 m=0 n=1

i = 1, 2, ..., N, j = 0, 1, ..., M,

4
where fij =< f, bij (t) >, dij
nm =< bnm (t), bij (t) >, and <, > denotes inner product.

Therefore

fij = C T [dij ij ij ij ij ij ij ij ij T
10 , d20 , ..., dN 0 , d11 , d21 , ..., dN 1 , ..., d1M , d2M , ..., dN M ] ,
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

i = 1, 2, ..., N, j = 0, 1, ..., M.
So we get
Φ = DT C,
with
Φ = [f10 , f20 , . . . , fN 0 , f11 , f21 , . . . , fN 1 , . . . , f1M , f2M , . . . , fN M ]T ,
and
D = [dij
nm ],

where D is a matrix of order N (M + 1) × N (M + 1) and is given by


Z 1
D= B(t)B T (t)dt. (8)
0

Using Eq. (4) in each interval n = 1, 2, ..., N, we can get matrix D. For example with
N = 2 and M = 3, D is
 
1 0 0 0 0 0 0 0
 0 1 0 0 0 0 0 0 
−1
 1

 0 0 0 0 0 0 
12 120
−1 
 1

1 0 0 0 12
0 0 0 120  .
D=  1
2 0 0 0 0 180
0 0 0 
 0 0 1
 0 0 0 180
0 0 
 0 0 −1 1
120
0 0 0 840
0 
−1 1
0 0 0 120
0 0 0 840
It is seen that the matrix D is a sparse matrix. Furthermore, if we choose large values
of M and N the non zero elements of D will tend to zero.

2.4 Operational matrix of integration


The integration of the B(t) defined in Eq. (6) is given by
Z t
B(t0 )dt0 ' P B(t), (9)
0

where P is the N (M + 1) × N (M + 1) operational matrix of integration and is given by


[20]

5
 
P0 O ...I O
−1 1
 α
2 2
I 2
O
I ... O 
tf 
.. ..
.. . . ..

P = . ,
 
. . . .
N

−1 1
 
α I O O ... I 
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

M M
 M
−1
α
M +1 M +1
I O O ... O
where I and O are N × N identity and zero matrices respectively, and
 
−α1 1 ... 1 1
 0 −α1 ... 1 1 
 
 .. .
. . . .
. .
.
P0 =  . .

. . . .
 
 0 0 ... −α1 1 
0 0 ... 0 −α1

It is seen that P is a sparse matrix.

2.5 The operational matrix of product


The following property of the product of two hybrid function vectors will also be used.
Let
B(t)B T (t)C ' C̃B(t), (10)
where C̃ is a N (M + 1) × N (M + 1) product operational matrix. To illustrate the
calculation procedure we choose M = 2 and N = 3. Thus we have

C = [c10 , c20 , c30 , c11 , c21 , c31 , c12 , c22 , c32 ]T , (11)

B(t) = [b10 (t), b20 (t), b30 (t), b11 (t), b21 (t), b31 (t), b12 (t), b22 (t), b32 (t)]T . (12)
In Eq. (12) we have

b10 (t) = 1  1
b11 (t) = 3t − 12 0≤t< , (13)
1 3
b12 (t) = 9t2 − 3t +

6

b20 (t) = 1  1 2
b21 (t) = (3t − 1) − 21 ≤t< , (14)
1  3 3
b22 (t) = (3t − 1)2 − (3t − 1) + 6

b30 (t) = 1  2
b31 (t) = (3t − 2) − 21 ≤ t < 1. (15)
1  3
b32 (t) = (3t − 2)2 − (3t − 2) + 6

6
We also get
 
b10 b10 b10 b20 b10 b30 · · · b10 b12 b10 b22 b10 b32

 b20 b10 b20 b20 b20 b30 · · · b20 b12 b20 b22 b20 b32 

 b30 b10 b30 b20 b30 b30 · · · b30 b12 b30 b22 b30 b32 
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

 
T
B(t)B (t) =  .. .. .. .. .. .. ..
. (16)
 
 . . . . . . . 

 b12 b10 b12 b20 b12 b30 · · · b12 b12 b12 b22 b12 b32 

 b22 b10 b22 b20 b22 b30 · · · b22 b12 b22 b22 b22 b32 
b32 b10 b32 b20 b32 b30 · · · b32 b12 b32 b22 b32 b32

From Eqs. (13)-(15) we have

bij bkl = 0, i 6= k,
bi0 bij = bij ,
1
bi1 bi1 = 12 bi0 + bi2 ,
1
bi1 bi2 = 6 bi1 + bi3 ,
1
bi2 bi2 = 180 bi0 + 13 bi2 + bi4 .

Using Eq. (16) we get


 
b10 0 0 ··· b12 0 0
 0 b20 0
 ··· 0 b22 0 

 0
 0 b30 ··· 0 0 b32 

T  .. .. .. .. .. .. ..
B(t)B (t) =  . .

. . . . . .
1
+ 31 b12
 
 b12 0 0 ··· b
180 10
0 0 
1
+ 31 b22
 
 0 b22 0 ··· 0 b
180 20
0 
1
0 0 b32 ··· 0 0 b
180 30
+ 31 b32

From the vector C in Eq. (11), the 9 × 9 matrix C̃ in Eq. (10) is given by
 
C̃0 C̃1 C̃2
1
C̃ =  12 C̃1 C̃0 + 16 C̃2 C̃1 ,
1 1 1

180 2

6 1
C̃0 + 3 C̃2

where C̃i , i = 0, 1, 2 are 3 × 3 matrices given by


 
c1i 0 0
C̃i =  0 c2i 0  .
0 0 c3i

Similarly for other values of M and N , the product operational matrix C̃ in Eq. (10)
can be obtained.

7
3 Problem statement
Consider the following variational problems:
Z 1
J[x(t)] = F (t, x(t), ẋ(t), . . . , x(n) (t))dt, (17)
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

0
with the boundary conditions
x(0) = a0 , ẋ(0) = a1 , . . . , x(n−1) (0) = an−1 , (18)
x(1) = b0 , ẋ(1) = b1 , . . . , x(n−1) (1) = bn−1 . (19)
The problem is to find the extremum of Eq. (17), subject to boundary conditions in
Eqs. (18) and (19). The method consists of reducing the variational problems into a set
of algebraic equations by first expanding x(n) (t) in terms of a hybrid of block-pulse and
Bernoulli polynomials with unknown coefficients.

4 The numerical method


By expanding x(n) (t) in the hybrid of block-pulse and Bernoulli polynomials we have,
x(n) (t) = X T B(t). (20)
where X is vector of order N × (M + 1) given by
X = [x10 , x20 , ..., xN 0 , x11 , x21 , ..., xN 1 , ..., x1M , x2M , ..., xN M ]T ,
By integrating Eq. (20) from 0 to t we get
Z t
x (n−1)
(t) − x (n−1)
(0) = X T B(t0 )dt0 = X T P B(t),
0

where P is operational matrix of integration given in Eq. (9). By using Eq. (18) we get
x(n−1) (t) = an−1 + X T P B(t). (21)
By n − 1 times integrating Eq. (21) from 0 to t and using boundary conditions given in
Eq. (18) we have

x(n−2) (t) = an−2 + an−1 t + X T P 2 B(t), (22)


..
.
a3 an−1 n−2
ẋ(t) = a1 + a2 t + t2 + · · · + t + X T P n−1 B(t), (23)
2! (n − 2)!

8
a2 2 an−1 n−1
x(t) = a0 + a1 t + t + ··· + t + X T P n B(t). (24)
2! (n − 1)!
Assume that each of ti , i = 1, 2, . . . , n − 1, and each of an−i , i = 1, 2, . . . , n, can be
written in terms of hybrid functions as
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

ti = dTi B(t), i = 1, 2, . . . , n − 1 (25)


an−i = an−i E T B(t), i = 1, 2, . . . , n, (26)
where
E T = [1, 1, ..., 1, 0, 0, ..., 0].
| {z } | {z }
N NM

Substituting Eqs. (25) and (26) into Eqs. (21)-(24) we obtain

x(n) (t) = X T B(t),


x(n−1) (t) = (an−1 E T + X T P )B(t),
..
.
a3 an−1 T
ẋ(t) = (a1 E T + a2 dT1 + dT2 + · · · + d + X T P n−1 )B(t),
2! (n − 2)! n−2
a2 an−1 T
x(t) = (a0 E T + a1 dT1 + dT2 + · · · + d + X T P n )B(t).
2! (n − 1)! n−1
Substituting above equations into Eq. (17) we get
J[x(t)] = J[X], (27)
the boundary conditions in Eq. (19) can be expressed as
qk = x(k) (1) − bk = 0, k = 0, ..., n − 1. (28)
We now find the extremum of Eq. (27) subject to Eq. (28) using the Lagrange multiplier
technique. Let
J ∗ [X, λ] = J[X] + λQ,
where the vector λ represents the unknown Lagrange multipliers and
Q = [q0 , q1 , . . . , qn−1 ]T .
The necessary conditions are given by
 ∂ ∗
 ∂X J [X, λ] = 0,
∂ ∗
J [X, λ] = 0.

∂λ

By solving above equations, we can obtain X.

9
5 Illustrative examples
In this section, four examples are given to demonstrate the applicability and accuracy
of our method. Examples 1 and 2 are the variational problems for which the boundary
conditions are fixed. Example 1 was first considered in [4] and Example 2 was given in
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

[26]. Example 3 is a variational problem that some of its boundary conditions are fixed
and others are unspecified, this example was considered in [2] and [6]. For Examples
1 − 3 we obtain the exact solutions by using the present method. The exact solutions
were not obtained in [2], [4], [6], and [26]. For example 4, we compare our findings with
the numerical results obtained by using hybrid of block-pulse functions and Legendre
polynomials together with the CPU time and exact values.

5.1 Example 1
Consider the extremization of [4]
Z 1
1
J= [ ẋ2 − xg(t)]dt, (29)
0 2
where 
 −1, 0 ≤ t ≤ 14 , 1
2
≤ t ≤ 1,
g(t) = (30)
1
3, ≤ t ≤ 12 ,

4
with the boundary conditions

ẋ(0) = 0, ẋ(1) = 0. (31)

Schechter [27] gave a physical interpretation of this problem by noting an application in


heat conduction. The exact solution is
 1 2

 2
t, 0 ≤ t ≤ 41 ,



3 2
x(t) = 2
t + t − 18 , 41 ≤ t ≤ 12 ,




 1 2
2
t − t + 38 , 21 ≤ t ≤ 1.

Here, we solve this problem by using the hybrid of block-pulse functions and Bernoulli
polynomials, we assume
ẋ(t) = C T B(t),
in view of Eq. (30), we write Eq. (29) as
1 1
Z 1 Z Z Z 1
1 2
4 2
J= ẋ (t)dt + 4 x(t)dt − 4 x(t)dt + x(t)dt,
2 0 0 0 0

10
or
1 1
Z 1 Z Z Z 1
1 T T T
4
T
2
T
J= C B(t)B (t)Cdt + 4C P B(t)dt − 4C P B(t)dt + C P B(t)dt.
2 0 0 0 0
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

Let Z t
V (t) = B(t0 )dt0 , (32)
0

using Eq. (8) we get

1 1 1
J = C T DC + C T P [4V ( ) − 4V ( ) + V (1)], (33)
2 4 2
the boundary conditions in Eq. (31) can be expressed in terms of hybrid functions as

C T B(0) = 0, C T B(1) = 0. (34)

We now find the extremum of Eq. (33) subject to Eq. (34) using the Lagrange multiplier
technique. Suppose
J ∗ = J + λ1 C T B(0) + λ2 C T B(1),
where λ1 and λ2 are two multipliers. Then the necessary condition is given by
∂ ∗ 1 1
J = DC + P [4V ( ) − 4V ( ) + V (1)] + λ1 B(0) + λ2 B(1) = 0. (35)
∂C 4 2

Equations (34) and (35) define a set of simultaneous linear algebraic equations from
which the vector C and the multipliers λ1 and λ2 can be found. By solving above
equations with M = 2 and N = 4 we get the exact solution.

5.2 Example 2
Consider the problem of finding the extremum of the functional [26]
Z 1
J[x(t)] = (ẋ2 (t)f (t))dt, (36)
0

where
−1, 0 ≤ t < 41 ,

f (t) = (37)
1, 14 < t ≤ 1,
with the boundary conditions

x(0) = 0, x(1) = 1. (38)

11
Suppose
ẋ(t) = C T B(t),

in view of Eq. (37), we write Eq. (36) as


ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

1
Z
4
Z 1
2
J = −2 ẋ (t)dt + ẋ2 (t)dt,
0 0

or
1
Z
4
Z 1
T T
J = −2 C B(t)B (t)Cdt + C T B(t)B T (t)Cdt.
0 0

Using Eqs. (8) and (10) we have


Z 1
4
J = −2 C T C̃B(t)dt + C T DC,
0

applying Eq. (32) we get


1
J = −2C T C̃V ( ) + C T DC, (39)
4
the boundary condition in Eq. (38) can be expressed in terms of hybrid functions as

C T P B(1) = 1. (40)

We now find the extremum of Eq. (39) subject to Eq. (40) using the Lagrange multiplier
technique. Suppose
J ∗ = J + λ(C T P B(1) − 1),

where λ is multiplier. Then the necessary conditions are given by



 ∂
∂C
J∗ = 0,

∂ ∗
J = 0.

∂λ

By solving above equations with M = 1 and N = 4, we get

0 ≤ t ≤ 41 ,

−2t,
x(t) =
2t − 1, 14 ≤ t ≤ 1,

which is the exact solution.

12
5.3 Example 3
Find the extremum of the functional [2, 6]
Z 1 Z 1
1
J[x(t)] = [ ẍ2 (t) + 4(1 − t)ẋ(t)]dt = F (t, x(t), ẋ(t), ẍ(t))dt, (41)
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

0 2 0

with the initial conditions


x(0) = 0, ẋ(0) = 0, (42)
and the values of x(1) and ẋ(1) are unspecified.
The exact solution via Euler equation is x(t) = − 61 t4 + 23 t3 − t2 .
The natural boundary conditions are found from following equations [11]
d
Fẋ − dt
(Fẍ )|t=1 = 0,

Fẍ |t=1 = 0,

that imply
x··· (1) = 0, (43)
ẍ(1) = 0. (44)
Suppose
x··· (t) = C T B(t), (45)
by 3 times integrating Eq. (45) from 0 to t and using boundary conditions given in Eq.
(42) we have

ẍ(t) = C T P B(t) + ẍ(0), (46)


ẋ(t) = C T P 2 B(t) + ẍ(0)t, (47)
x(t) = C T P 3 B(t) + ẍ(0)dT1 P B(t), (48)
where t ' dT1 B(t) and P is operational matrix of integration given in Eq. (9). Using
Eqs. (44) and (46) we get
ẍ(0) = −C T P B(1). (49)
Suppose
4(1 − t) = AT B(t), (50)
substituting Eqs. (46), (47) and (50) into Eq. (41) and using Eqs. (8) and (32) we have

J = 12 C T P DP T C − C T P V (1)B T (1)P T C + 12 C T P B(1)B T (1)P T C


(51)
T 2T T T T
+A DP C − A Dd1 B (1)P C.

13
By applying Eq. (45) the boundary condition in Eq. (43) can be written as

C T B(1) = 0. (52)

We now find the extremum of Eq. (51) subject to Eq. (52) using the Lagrange multiplier
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

technique. Suppose
J ∗ = J + λ(C T B(1)),
where λ is multiplier. Then the necessary conditions are given by
 ∂ ∗
 ∂C J = 0,
∂ ∗
J = 0.

∂λ

By solving above equations with M = 5 and N = 1, we obtain

c10 = 2, c11 = −4 , c12 = 0 , c13 = 0 , c14 = 0 , c15 = 0

substituting above values in Eq. (48) the exact solution is obtained.

5.4 Example 4
Find the extremum of the functional
Z π
4 π
J[x(t)] = (x2 (t) − ẋ2 (t))dt, x(0) = 1, ẋ( ) = 0.
0 4

The exact value is x(t) = sin(t) + cos(t). In Table 1, the values of x(t) using the hybrid
of block-pulse and Legendre polynomials (B-P Legendre), the hybrid of block-pulse and
Bernoulli polynomials (B-P Bernoulli), together with CPU time and the exact solution
are listed.

Table 1. Estimated and exact values of x(t)


B-P Legendre B-P Bernoulli B-P Legendre B-P Bernoulli
t N = 4, M = 2 N = 4, M = 2 N = 4, M = 3 N = 4, M = 3 Exact
0 0.999943 1.000000 0.999999 0.999999 1.000000
0.1 1.094835 1.094834 1.094788 1.094838 1.094838
0.3 1.250852 1.250849 1.250709 1.250857 1.250857
0.5 1.357004 1.357005 1.356769 1.357008 1.357008
0.7 1.409056 1.409056 1.407521 1.409059 1.409059

CPU time 0.732 0.578 0.954 0.818

14
6 Conclusion
In the present work the hybrid of block-pulse functions and Bernoulli polynomials are
used to solve variational problems. The variational problems has been reduced to a
problem of solving a system of algebraic equations. For constructing matrices D and P
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

in Eqs. (8) and (9) we use Bernoulli numbers αn which are a sequence of singed rational
numbers and α2n+1 = 0, n = 1, 2, 3, . . .. Thus the matrices P and D have many zero
elements and they are sparse, hence the present method is very attractive and reduces
the CPU time and the computer memory. Illustrative examples are given to demonstrate
the validity and applicability of the proposed method.

References
[1] Arfken, G., “Mathematical methods for physicists”, Third edition, Academic press,
San Diego, 1985

[2] Arsalani, M. and Vali, M.A., “Numerical solution of nonlinear variational problems
with moving boundary conditions by using Chebyshev wavelets”, Applied Mathe-
matical Sciences, 5(20): 947-964, 2011

[3] Chang, R.Y. and Wang, M.L., “Shifted Legendre direct method for variational
problems”, Journal of Optimization Theory and Applications, 39: 299-307, 1983

[4] Chen, C.F. and Hsiao, C.H., “A Walsh series direct method for solving variational
problems”, Journal of the Franklin Institute, 300: 265-280, 1975

[5] Costabile, F., Dellaccio, F. and Gualtieri, M.I., “A new approach to Bernoulli
polynomials”, Rendiconti di Matematica, Serie VII, 26: 1-12, 2006

[6] Dixit, S., Singh, V.K., Singh, A.K. and Singh, O.P., “Bernstein direct method for
solving variational problems”, International Mathematical Forum, 5(48): 2351-2370
2010

[7] Elgolic, L.E., “Calculus of variations”, Pergamon press, Oxford, 1962

[8] Elsgolts, L., “Differential equations and the calculus of variations”, translated from
the Russian by G. Yankovsky, Mir Publisher, Moscow, 1977

[9] Gelfand, I.M. and Fomin, S.V., “Calculus of variations”, Prentice-Hall, Englewood
Cliffs, NJ, 1963

[10] Horng, I.R. and Chou, J.H., “Shifted Chebyshev direct method for solving varia-
tional problems”, International Journal of Systems Science, 16: 855-861, 1985

15
[11] Hsiao, C.H., “Haar wavelet direct method for solving variational problems”, Math-
ematics and Computers in Simulation, 64: 569-585, 2004

[12] Hsiao, C.H., “Hybrid function method for solving Fredholm and Volterra integral
equations of the second kind”, Journal of Computational and Applied Mathematics,
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

230: 59-68, 2009

[13] Hwang, C., and Shih, Y.P., “Laguerre series direct method for variational prob-
lems”, Journal of Optimization Theory and Applications, 39: 143-149, 1983

[14] Kajani, M.T. and Vencheh, A.H., “Solving second kind integral equations with
hybrid Chebyshev and block-pulse functions”, Applied Mathematics and Compu-
tation, 163: 71-77, 2005

[15] Kreyszig, E., “Introductory functional analysis with applications”, John Wiley and
Sons Press, New York, 1978

[16] Maleknejad, K. and Mahmoudi, Y., “Numerical solution of linear Fredholm integral
equation by using hybrid Taylor and block-pulse functions”, Applied Mathematics
and Computation, 149; 799-806, 2004

[17] Marzban, H.R. and Razzaghi, M., “Optimal control of linear delay systems via
hybrid of block-pulse and Legendre polynomials”, Journal of the Franklin Institute,
341: 279-293, 2004

[18] Marzban, H.R. and Razzaghi, M., “Analysis of time-delay systems via hybrid of
block-pulse functions and Taylor series”, Journal of Vibration and Control, 11:
1455-1468, 2005

[19] Marzban, H.R. and Razzaghi, M., “Solution of multi-delay systems using hybrid
of block-pulse functions and Taylor series”, Journal of Sound and Vibration, 292:
954-963, 2006

[20] Mashayekhi, S., Ordokhani, Y. and Razzaghi, M., “Hybrid functions approach for
nonlinear constrained optimal control problems”, Communications in Nonlinear
Science and Numerical Simulation, 17: 1831-1843, 2012

[21] Razzaghi, M. and Elnagar, G., “Linear quadratic optimal control problems via
shifted Legendre state parametrization”, International Journal of Systems Science,
25: 393-399, 1994

[22] Razzaghi, M. and H.R. Marzban, “A hybrid analysis direct method in the calculus
of variations”, International Journal of Computer Mathematics, 75: 259-269, 2000

16
[23] Razzaghi, M. and Marzban, H.R., “Direct method for variational problems via
hybrid of block-pulse and Chebyshev functions”, Mathematical Problems in Engi-
neering, 6: 85-97, 2000

[24] Razzaghi, M. and Razzaghi, M., “Fourier series direct method for variational prob-
ROMANIAN JOURNAL OF MATHEMATICS AND COMPUTER SCIENCE, 2012, VOLUME 1, p.1-17

lems”, International Journal of Control, 48: 887-895, 1988

[25] Razzaghi, M. and Razzaghi, M., “Instabilities in the solution of a heat conduction
problem using Taylor series and alternative approaches”, Journal of the Franklin
Institute, 326: 683-690, 1989

[26] Russak, I.B., “Calculus of Variations”, Ma 4311 Lecture Notes, Monterey, Califor-
nia, 2002

[27] Schechter, R.S., “The Variation Method in Engineering”, McGraw-Hill, New York,
1967

[28] Tikhomirov, V.M., “Stories about Maxima and Minima”, American Mathematica
Society, Providence, RI, 1990

[29] Wang, X.T. and Li, Y.M., “Numerical solutions of integro differential systems by
hybrid of general block-pulse functions and the second Chebyshev polynomials”,
Applied Mathematics and Computation, 209: 266-272, 2009

17

View publication stats

You might also like