1 s2.0 S0895717701000486 Main

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

MATHEMATICAL

COMPUTER
MODELLING
PERGAMON Mathematical and Computer Modellmg 34 (2001) 45-54
www elsevier nl/locate/mcm

Legendre Wavelets Method


for the Solution of Nonlinear Problems
in the Calculus of Variations
M RAZZAGHI
Department of Mathematrcs and Statlstrcs, Mrssrssrppl State Unrversrty
Mrssrssrppl State, MS 39762, U S A
and
Department of Mathematics, Amnkabn Unrversrty, Tehran, Iran
S YOUSEFI
Department of Mathematics, Amnkabn Umversrty, Tehran, ban

(Receaved November 1999, rewed and accepted July 2000)

Abstract-A numerical technique for solvmg the nonlinear problems of the calculus of varlatlons
IS presented Two nonlinear examples are consldered In the first example, the brachlstochrone
problem IS formulated as a nonlinear optimal control problem, and m the second example, a hlgher-
order nonlinear problem IS given An operational matrix of Integration 1s Introduced and 1s utlhzed
to reduce the calculus of varlatlons problems to the solution of algebraic equations The method 1s
general, easy to Implement, and yields very accurate results @ 2001 Elsevler Science Ltd All rights
reserved

Keywords-Brachlstochrone problem, Calculus of varlatlons, Numerical methods, Legendre wave-


lets

1. INTRODUCTION

There has been a consrderable renewal of interest m the classrcal problems of the calculus of
varratrons both from the pomt of view of mathematics and of apphcatrons m physics, engmeermg,
and applied mathematics
Fmdmg the brachrstochrone, or path of quickest decent, 1s a hrstorrcally interesting problem
that 1s discussed m virtually all textbooks dealing with the calculus of varratrons In 1696, the
brachrstochrone problem was posed as a challenge to mathematrcrans by John Bernoulli The
solutron of the brachrstochrone problem 1s often cited as the orrgm of the calculus of varlatrons
as suggested m [l].
The classical brachrstochrone problem deals with a mass moving along a smooth path m a
uniform gravrtatronal field A mechanical analogy 1s the matron of a bead shdmg down a frrc-
tronless wire The solutron to thus problem was obtained by various methods such as the gradient

The authors wish to express therr smcere thanks to the reviewers for valuable suggestions that Improved the final
manuscript

0895-7177/01/$ - see front matter @ 2001 Elsevler Science Ltd All rights reserved Typeset by J&&W
PI1 SO895-7177(01)00048-6
46 hl RAZZAGHI AND S YOU~EFI

method [2], successive sweep algorithm m [3,4], the classical Chebyshev method [5] and multistage
Monte Carlo method [6]
Orthogonal functions (OFs) have received consldelable attention m dealmg with various prob-
lems of dynamic systems The mam characterlstlc of this technique 1s that it reduces these prob-
lems to those of solving a system of algebraic equations, thus , greatly sm~pllfymg the problem
The approach IS based on converting the underlying differential equations mto mtegral equations
through integration, approxlmatmg various signals mvolved m the equation by truncated olthog-
onal series and using the operational matrix of mtegratlon P, to ehmmate the mtegral operations
The form of P depends on the particular choice of the orthogonal functions Special attention has
been given to apphcatlons of Walsh functions 171, block-pulse functions [8], Laguerre series [9],
shifted Legendre polynomials [lo] and shifted Chebyshev polynomials [ll] Among these orthog-
onal functions, the shifted Legendre, which 1s obtained from Legendre polynomials by shifting
the defining interval [-1, l] to [0, CL],1s computatlonally more effective This 1s because [12]
(1) the defining domain IS finite,
(11) the operational matrix of integration 1s tndlagonal,
(111) the weight function of orthogonahty 1s unity,
(iv) the convergence rate 1s rapid
There are three classes of sets of OFs which are widely used The first includes sets of piecewise
constant basis functions (PCBFS) ( e g , Walsh, block-pulse, etc ) The second consists of sets
of orthogonal polynomials (OPs) (e g , Laguelre, Legendre, Chebyshev, etc ) The third 1s the
widely used sets of sine-cosine functions (SCFs) m Fourier series While OPs and SCFs together
form a class of contmuous basis functions, PCBFs have inherent dlscontmultles OI Jumps The
inherent features (contmmty or dlscontmultles) of a set of OFs largely determine their merit
for apphcatlon m a given situation Moulden and Scott [13] and Razzaghl and Nazarzadeh [14]
have demonstrated the advantages of PCBF spectral methods over Fomler spectral techmques
If a contmuous function 1s approximated by PCBFs, the resulting approxlmatlon 1s piecewise
constant On the other hand, if a dlscontmuous function 1s dpproxlmated by contmuous basis
functions, the dlscontmultles are not properly modeled
Wavelet analysis possesses several useful properties, such as orthogonahty, compact support,
exact representation of polynomials to a certain degree, and ablhty to represent functions at
different levels of resolution [15]
In the present paper, we mtloduce a new numerlcal method to solve the nonlinear problems
of the calculus of variations Two examples are considered In Example 1, the brachlstochrone
problem 1s first formulated as an optimal control problem, and m the second example, a hlgher-
order nonlinear problem 1s given The method consists of reducing the calculus of variations
problems to a set of algebraic equations by expandmg the candidate function as a Legendre
wavelets with unknown coefficients The Legendre wavelets are first introduced The operational
matrix of integration 1s then used to evaluate the coefficients of Legendre wavelets m such a way
that the necessary condltlons for extremlzatlon are Imposed The paper 1s organized as follows
In Section 2, we describe the formulation of the wavelets and Legendre wavelets required for
OUI subsequent development Section 3 1s devoted to numerical examples In Section 3 1, the
brachlstochrone problem 1s considered In Sectlons 3 1 l-3 1 3, the proposed method 1s used to ap-
proximate the solution of the blachlstochrone problem In Sectlon 3 2, we consider a higher-order
nonlinear problem In both examples, we demonstrate the accuracy of the proposed numerical
scheme by comparing our numerical finding with the exact solutions

2. PROPERTIES OF LEGENDRE WAVELETS

2.1. Wavelets and Legendre Wavelets

In recent years, wavelets have found their way mto many different fields of science and engl-
neermg Wavelets constitute a family of functions constructed from dllatlon and translation of
Legendre Wavelets Method 47

a single function called the mother wavelet When the dilation parameter a and the translation
parameter b vary contmuously, we have the followmg family of contmuous wavelets as [lG]

$&b(t) = lap+ (Y) ) a, bE w, a # 0

If we restrict the parameters a and b to discrete values as a = agk, b = nb,a;“, where a0 > 1,
bo > 0, and n and lc are positive integers, we have the followmg family of discrete wavelets

@k+(t) = I~oI”‘~+
(& - nbo), (2)
which form a wavelet basis for L2(R) In particular, when a0 = 2 and bo = 1, then $Jk,n(t) form
an orthonormal basis [16]
Legendre wavelets $~~~(t) = $~(k,fi,m,t) have four arguments fi = 2n - 1, n = 1,2,3, ,
2k-1, k can assume any positive integer, m 1s the order for Legendre polynomials, and t 1s the
normalized time They are defined on the interval [0,1) by

G-1 ii+1
(2kt - ii) , for2”It<F,
(3)
otherwise

In equation (3), the coefficient dm 1s for orthonormahty, the dllatlon parameter 1s a = 2-k,
and the translation parameter is b = i%2- k Here, P,(t) are the well-known Legendre polynomials
of order m which are orthogonal with respect to the weight function w(t) = 1 on the interval
I-1, l] and satisfy the followmg formulae

PO(t)= 1, PI(t) = t,
P,+l(t) = (5) tP,(t) - ($) Pm-l(t), m = L&3,

2.2. F’unction Approximation

A function f(t) defined over [0,1) may be expanded as

(4

where cnm = (f(t), tinm(t)), m which ( , ) denotes the inner product


If the mfimte series m equation (4) IS truncated, then equation (4) can be written as

2"-' M-l

f(t) = c c Gzm?hzm(~) = CTW>, (5)


n=l m=O

where C and Q(t) are 2”-l M x 1 matrlces given by

T
C = [ClO,Cll, >wvf-l,c2ol ,CZM-1, 7CZL-‘07 ,C2'-'M-11 , (6)
W) =[Tho(t),‘bllll(t), ,+11M--l(t)7ti20(t), ,1LzM-l(t), ,h-‘O(t), ,$2"-'M-&)lT (7)

The integration of vector 9(t) defined m equation (5) 1s given by

T
9(t’) dt’ = P*(t), (8)
s0
48 M RAZZAGHI AND S YOUSEFI

where P 1s a (2’“-‘n/r) x (2”-lA4) operatronal matrix for mtegratron and 1s obtained as

-L F F F
OL F F
P=$ 0 7

F
0 0 0 L

where F and L are hl x M matrices grven by

and

1 L
xl+ O O
& fi
-- 0 - 0
3 36
6 6
0 -- 0 -
5A 5J?
fi
0 0 -- 0
7x6
L=

0 0 0 0 - Jm 0 4m
(2M - 3)~mcZ (2M - 3)dm

0 0 0 0 0 - dm 0
(2J!J - l)J_

3. ILLUSTRATIVE EXAMPLES
In this section, two nonlinear problems of the calculus of varratrons are consrdered Example 1
1s the classrcal brachrstochrone problem, whereas Example 2 1s a higher-order nonlinear problem
taken from [17]

3.1. Example 1. The Brachistochrone Problem

3.1.1. The bachistochrone problem as an optimal control problem

As an optrmal control problem, the brachrstochrone problem may be formulated as follows [18]
Mmrmrze the performance index J,

subJect to

w1t11
Legendre Wavelets Method 49

Equations (9)-(11) d escrrbe the motion of a bead shdmg down a frictionless wire in a constant
gravrtatlonal field The mmrmal time transfer expression (9) 1s obtained from the law of conser-
vation of energy Here X and t are drmensronless and they represent, respectively, the vertrcal
and horrzontal coordmates of the shdmg bead
As 1s well known, the exact solutron to the brachrstochrone problem is the cycloid defined by
the parametric equatrons

z = 1 - $(I+ cos2a), t = $ + f(2cz + sm2cu), (12)

where
tancw = $ = U

With the given boundary condrtrons, the mtegratron constants are found to be

,f3= 1 6184891, to = 2 7300631

3.1.2. The numerical method

Suppose the rate varrable X(t) can be expressed approxrmately as

X(t) = CTQ(t) (13)


Usmg equatrons (8) and (ll), X(t) can be represented as

X(t) =
s’
= &a(t)
X(t’) c-it’ + X(0)

Also by usmg equations (10) and (13), we have

u2(t) = cTxiqtpT(t)c 05)


Equation (15) can be srmphfied by using the followmg property of the product of two Legendre
wavelet function vectors
CTxl!(t)xIJT(t) N @(t)C, (16)
where C and Q(t) are grven m equations (6) and (7), respectively, and C 1s a (2”-‘M) x (2k-1M)
product operational matrix To Illustrate the calculatron procedures, we choose M = 3 and k = 2
Thus, we have

c = [C10,C11,C12,C20,C21,C221T, (17)
Q’(t) = [~10,~11,~12,~20~~2~,~221T, W

where
$10 = 45

$11 = &(4t - 1)

$12 = di6 ;(4t - 1)s - ;)


(
and
$20 = fi

ti21 = Jq4t - 3)
(20)
$22 = di6 $4t - 3)s - ;
( >
50 M RAZZAGHI AND 5 YOUSEFI

Usmg equation (18), we get

In equation (21), we have


@1,J$kl = 0, lfz#k

Also usmg equations (19) and (20), we get

If we retam only the elements of equation (18), then we have

By usmg vector C m equation (17), the 6 x 6 matrix 6 m equation (16) can be written as

& [ B1
0 0
B2 1 ’

where B,, 2 = 1,2 are 3 x 3 matrices given by

- &Go Jzc,l xf5A2

&Go + - 20
7flct2
3.1.3. The performance index approximation

Usmg equations (14)-( 16), the performance mdex J can be approximated as follows

l 1+ P(t)&
J=
l-CTPQ(t)
J(0

Dlvldmg the interval [0, l] mto N equal submtervals, we have

z/N l/2
QT(t)CC
(
1+ dt
J=c (22)
z=1
J (z-1)/N 1 - CTP*l(t)
Legendre Wavelets Method 51

In order to use the Gaussian mtegratron formula, we transform the t-mterval ((2 - 1)/N, 2/N)

mto the r mterval (-1,l) by means of the transformation

-$+- 22N- 1
t=f
( >
(23)

The optimal control m equatrons (9)-(11) 1s then restated as follows


Mmrmrze

(24)

subJect to
dx
- = L(T), (25)
dr 2
w&h
X(-l) = 0, X(1) = -0 5 (26)

Using equatrons (22) and (23), we get

1 + QT((1/2)((1/N)r + (22 - 1)/N))& 1’2 d7


(27)
1 - CTP9((1/2)((1/N)r + (22 - 1)/N))

Using Gaussran mtegratron formula, equation (27) can be approxrmated as

1 + QT((1/2)((1/N)~, + (22 - 1)/N)@ 1’2


(28)
1 - CTPQ((1/2)((1/N)~, + (22 - 1)/N)) wJ’

where T~,J = O,l, , s are the s + 1 zeros of Legendre polynomrals P.+r, and wg are the
correspondmg werghts, grven m [19] The idea behind the above approxrmatron 1s the exactness
of the Gaussran mtegratron formula for polynomrals of degree not exceedmg 2s + 1

3.1.4. Evaluating vector C

The optimal control problem has been reduced to a parameter optrmrzatlon problem whrch can
be stated as follows
Fmd G,, n = 1,2, ,2&-l, m = 0, 1, , M - 1 that mmrmrzes equation (28) subject to

x(-l) = 0, 2(l) = -0 5 (29)

We now mmrmrze equation (28) subJect to equatron (29) usmg the Lagrange multlpher techmque
Suppose
J* = J + X1x(-l) + X2[z(l) + 0 51

The necessary condrtrons for mmrmum are

aJ* o ?J,= 1,2, ) 2k-1, m=O,l, ,M-1, (30)


G= ’
and
-aJ* = 0, aJ*
-z() (31)
dA1 8x2

Equatrons (30) and (31) grve (2”-lM + 2) nonhnear equatrons with (2”-lM + 2) which can
be solved for h,, Xr, and Xz usmg Newton’s rteratrve method The mrtral values required to
start Newton’s rteratrve method have been chosen by taking ~(7) as a linear functron between
~(-1) = 0 and z(1) = -0 5
52 M RAZZAGHI AND S YOUSEFI

Table 1 The Legendre wavelets and other solutrons m the hterature

Dynamic Programmmg
-05 -0 7832273 0 9984988
Gradient Method [2]

Dynamic Programmmg
Successrve Sweep Method [3,4] / -0 5 / -0 7834292 / 0 9984989

Chebyshev Solutions [5]


M=4 -05 -0 7844893 0 9984982
hil = 7 -05 -0 7864215 0 99849815
111= 10 -05 -0 7864406 09984981483

Legendre Wavelets k = N = 2, s = 5
h1 = 2 -0 5 -0 7852418 0 9985049
h/l=4 -05 -0 7664397 0 9984980
IVI = 5 -05 -0 7864402 0 9984981

Legendre Wavelets
-05 -0 7864408 099849814829
k = N = 2, s = 8, and M = 5

Exact Solutlon [4] -05 -0 7864408 099849814829

In Table 1, the results for Legendre wavelets approxrmatron wrth k = N = 2, s = 5, and


M = 2, 4,5 together with k = N = 2, s = 8, and M = 5 are listed We compare the solutron
obtained using the proposed method wrth other solutrons m the hterature together with the exact
solution

3.2. Example 2. Higher-Order Nonlinear Problem

Consider the functronal

J(X) = ,e-“X,3(t) + :X,2(t) + :X,4(t) + lemztX:(t)


(32)
+ 48eGtX3(t) - emt&(t)Xl(t) - t&(t) - X2(t) slnt dt

subject to the followmg boundary condrtrons

X(0) = (l,O, l)T, X(1) = (e,sml,e2)T (33)

The problem 1s to find the mmlmum of equatron (32) subject to equatron (33) The exact solutron
to this problem 1s
X(t) = (Xr(t),X~(t),X3(t))~ = (eT,smt,e2t)T

Here we solve this problem with Legendre wavelets Let

xl(t) = C,TW), X2(t) = c,Tw, X3(t) = @J(t) (34)

Using equatrons (8) and (33), we have

xl(t) = C,TPQ@) + 1, X2(t) = C,TPQ@), X3(t) = Cpxqt) + 1 (35)


Legendre Wavelets Method 53

Using equations (32), (34), and (35), we have

J(X) = + f (c;e(t))2 + ; (c:4(t))4 + ;2 (c,Tmqt) + 1)4

+ 48e6t (C,TPQ(t) + 1) - emt (C,TP\k(t) + 1) (C,TP*(t) + 1) - t (CT!@(t)) (36)

- CzPQ(t)smt dt
)

Equation (36) 1s solved srmrlarly to Example 1 In Table 2, a comparrson IS made with Legendre
wavelets approximatrons for k = N = 2, s = 5, and M = 4 together with the exact solutions

Table 2 Estimated and exact values of X,(t), z = 1,2,3, for Example 2

4. CONCLUSION
The arm of thus present work is to develop an efficient and accurate method for solvmg nonlinear
problems of the calculus of variations The problem has been reduced to solving a system of
nonlinear algebraic equations Illustrative examples are included to demonstrate the vahdrty and
apphcabrhty of the techmque The advantages of usmg the Legendre wavelets method are as
follows
(1) The operational matrix P contains many zeros whrch play an important rule m sunplifymg
the performance mdex
(2) The Gaussian mtegratron formula 1s exact for polynomrals of degree not exceeding 2s + 1
(3) Only a small number of k, N, s, and hl are needed to obtain very satisfactory results

REFERENCES
V M Tlkhomnov, Stones About Maxama and Mznzma, American Mathematical Society, Providence, RI,
(1990)
R Bellman, Dynamac Progmmmzng, Prmceton University Press, Lawrencevllle, NJ, (1957)
A V Balakrlshnan and L W Neustadt, Computmg Methods an Optzmzzataon Problems, Academic Press, New
York, (1964)
A E Bryson and Y C Ho, Appleed Optzmal Control, Blalsdell Waltham, (1969)
J Vlassenbroeck and R Van Dooren, A new look at the brachlstochrone problem, Journal of Applzed Math-
ematzcs and Physacs (ZAMP) 31, 785-790, (1980)
D S Szarkowlcz, Investlgatmg the brachlstochrone with a multistage Monte Carlo method, Internatzonal
Journal of Systems Scrence 26, 233-243, (1995)
C F Chen and C H Hsmo, A Walsh series direct method for solvmg varIatIona problems, Journal of the
FVunklan Instatute 300, 265-280, (1975)
C F Chen, Y T Tsay and T T Wu, Walsh operational matrices for fractional calculus and their apphcatlon
to dlstrlbuted-parameter systems, Journal of the Rzznk6zn Instatute 503, 267-284, (1977)
C Hwang and Y P Shah, Solution of Integral equations via Laguerre polynomials, Journal of Computer and
Electracal Enganeemng 9, 123-129, (1982)
54 M RAZZAGHI AND S YOUSEFI

10 R Y Chang and M L Wang, Shlfted Legendre direct method for varlatlonal problems, Journal of Optzmaza-
tzon Theory and Applacataons 39, 299-307, (1983)
11 S C Smha and D H Wu, An efficient computatlonal scheme for the analysis of perlodlc systems, Journal of
Sound and Vzbmtzon 151, 91-117, (1991)
12 J H Chou, Apphcatlon of Legendre series to optImaI control of mtegro-dlfferentlal equations, Internatzonal
Journal of Control 323, 269-277, (1987)
13 T H Moulden and M A Scott, Walsh spectral analysis for ordmary dlfferentlal equations Part 1-Initial
value problems, IEEE tins Czrcuzts Syst 35, 742-745, (1989)
14 M Razzaghl and J Nazarzadeh, Optimum pulse-width modulated patterns m mductlon motors usmg Walsh
functions, Electnc Power Systems Research 35, 87-91, (1995)
15 Q Mmg, C Hwang and Y P Shah, The computation of wavelet-Galerkm approxlmatlon on a bounded
Interval, Internataonal Journal for Numertcal Methods zn Enganeerang 39, 2921-2944, (1996)
16 J S Gu and W S Jlang, The Haar wavelets operational matrix of mtegratlon, Internatzonal Journal of
Systems Sczences 27, 623-628, (1996)
17 J Gregory and R S Wang, Discrete variable methods for the m-dependent variable nonhnear extremal
problems m the calculus of varlatlons, SIAM J Numerical Analysts 2, 470-487, (1990)
18 P Dyer and S R Mcreynolds, The Computatzonal and Theory of Optzmal Control, Academic Press, New
York, (1970)
19 A Constantmldes, Applzed Numerzcal Methods wzth Personal Computers, McGraw-Hill, New York, (1987)

You might also like