Research Article  Open Access
M. Zarebnia, M. Birjandi, "The Numerical Solution of Problems in Calculus of Variation Using BSpline Collocation Method", Journal of Applied Mathematics, vol. 2012, Article ID 605741, 10 pages, 2012. https://doi.org/10.1155/2012/605741
The Numerical Solution of Problems in Calculus of Variation Using BSpline Collocation Method
Abstract
A Bspline collocation method is developed for solving boundary value problems which arise from the problems of calculus of variations. Some properties of the Bspline procedure required for subsequent development are given, and they are utilized to reduce the solution computation of boundary value problems to some algebraic equations. The method is applied to a few test examples to illustrate the accuracy and the implementation of the method.
1. Introduction
Minimization problems that can be analyzed by the calculus of variations serve to characterize the equilibrium configurations of almost all continuous physical systems, ranging between elasticity, solid and fluid mechanics, electromagnetism, gravitation, quantum mechanics, string theory, many, many others. Many computational methods as motivated by optimization problems use the technique of minimization. Methods of search, finite elements, and iterative schemes are part of optimization theory. The classical calculus of variation [1, 2] answers the question: what conditions must the minimizer satisfy? while the computational techniques are concerned with the question: how to find or approximate the minimizer? The list of main contributors to the calculus of variations includes the most distinguished mathematicians of the last three centuries such as Leibnitz, Newton, Bernoulli, Euler, Lagrange, Gauss, Jacobi, Hamilton, and Hilbert. In recent years, many different methods have been used to estimate the solution of problems in calculus of variations [3โ12]. In this work, we consider collocation method based on using Bspline basis functions, for finding approximate solution of differential equations which arise from problems of calculus of variations. The application of the method to differential equations leads to an algebraic system.
The organization of this paper is as follows: in Section 2, we introduce the general form of problems in calculus of variations, and their relations with ordinary differential equations are highlighted. In Section 3, we describe the cubic Bspline function and basic formulation of Bspline collocation method required for our subsequent development and present a clear overview of this method. Also in this section, we illustrate how the cubic Bspline method may be used to replace boundary value problems by explicit systems of algebraic equations. In Section 4, we report our numerical results and demonstrate the efficiency and accuracy of the proposed numerical scheme by considering some numerical examples. Section 5 ends this paper with a conclusion. Note that we have computed the numerical results by Mathematica programming.
2. Calculus of Variation Problems and Their Relations with BVPs
The general form of a variational problem can be considered as finding the extremum of the functional
To find the extreme value of , the boundary points of the admissible curves are known in the following form:
The necessary condition for (2.1) to extremize is that it should satisfy the EulerLagrange equations with boundary conditions given in (2.2). The system of boundary value problems (2.3) does not always have a solution, and if the solution exists, it may not be unique. Note that in many variational problems, the existence of a solution is obvious from the physical or geometrical meaning of the problem, and if the solution of Euler's equation satisfies the boundary conditions, it is unique. Also this unique extremal will be the solution of the given variational problem [2]. Thus, another approach for solving the variational problem (2.1) is finding the solution of the system of ordinary differential equations (2.3) which satisfies the boundary conditions (2.2). The simplest form of the variational problem (2.1) is with the given boundary conditions Here, the necessary condition for the extremum of the functional (2.4) is to satisfy the following secondorder differential equation: with boundary conditions given in (2.5). In the present work, we find the variational problems by applying cubic Bspline collocation method on the EulerLagrange equations.
3. Cubic BSpline Method
3.1. BSpline Preliminaries
Consider the partition of . Let denote the set of piecewise polynomials of degree on subinterval of partition . In this work, we consider cubic Bspline method for finding approximate solution of variational problems. Bspline functions are discussed thoroughly in [13].
Consider the grid points on the interval as follows: where . Let be the Bspline function of degree , where , and satisfy the following conditions: (i), (ii), (iii).
The zeroorder polynomial Bspline is defined as and also, the generalorder Bspline is given by
Note that this definition means that is nonzero only in the range . The cubic Bsplines , at the grid points , are defined as
3.2. Approximate Solution of the Problems in Calculus of Variation
Now let us consider the general form of the variational problem (2.1). Finding the solution of the problem (2.1) needs to solve the corresponding ordinary differential equations (2.3) with boundary conditions (2.2). We assume be the exact solution of the boundary value problem (2.3). By considering (3.5), the functions defined over the interval are approximated by the following linear combinations of the cubic Bspline functions: where are unknown coefficients and are cubic Bspline functions which are defined in (3.5). For convenience, consider the secondorder boundary value problem (2.3) as follows: and also consider . By using (3.6)โ(3.8), we can approximate , and as follows:
By substituting in (3.9) and setting , as collocation points, we obtain the system (3.11) consists of equations with unknowns . Now, consider the equations from boundary conditions (2.2) as follows:
Adding (3.12) and (3.13) to the system of (3.11), we obtain equations with unknowns . Solving the system (3.11)โ(3.13), the coefficients are obtained. Then, we can obtain an approximation to the solution of (3.9) that is equivalent to the solution of the variational problem (2.1) as
4. Numerical Examples
In order to illustrate the performance of the cubic Bspline collocation method and the efficiency of the method, the following examples are considered. The examples have been solved by the presented method with different values of . We define the error function where and denote exact and approximate solutions, respectively. The errors are reported on the set of uniform grid points with step size , The error on this grid is Tables 1โ3 exhibit the absolute errors.



Example 4.1. We first consider the following variational problem with the exact solution [11]:
subject to boundary conditions
Considering (4.3), the EulerLagrange equation of this problem can be written in the following form:
By considering (3.6), (3.10), and (3.11) and also substituting in (4.5) and setting , we obtain
where . The linear system (4.6) consists of equations with unknowns . Now, consider the two equations from (3.12) to (3.13) and boundary conditions (4.4) as follows:
Adding (4.7) and (4.8) to the system of (4.6), we obtain equations with unknowns . In order to determine these unknowns, we can now rewrite (4.6)โ(4.8) in the matrix form
where is a square matrix of order and is defined as follows:
Solving the linear system (4.9), the coefficients are obtained. Then, we can obtain an approximation to the solution as
The maximum absolute errors in numerical solution of Example 4.1 are tabulated in Table 1.
These results show the efficiency and applicability of the presented method.
Example 4.2. In this example, we consider the following variational problem [2]:
which satisfies the conditions
The exact solution of this problem is . In this case, the EulerLagrange equation is written in the following form:
Substituting (3.6) into (4.13)(4.14) and evaluating the result at the Bspline grid points (3.2), we obtain
Solving nonlinear algebraic equations (4.15) by Newton's method and substituting the for to (4.11), the approximation solution can be found. In Table 2, we give the maximum absolute errors for different values of .
From Table 2, we see the errors decrease as increases.
Example 4.3. In this example, consider the following problem of finding the extremals of the functional [2, 11]:
with boundary conditions
The system of Euler's differential equations is of the form
The exact solutions of the problem are and . In this example, according to the general form of variational problem (2.1), we have . Thus, we use (3.6) and (3.7) to approximate and . Now substituting and into (4.18) and evaluating the result at the grid points (3.2), we obtain
Solving linear algebraic Equations (4.19) and by substituting the and for to and , the approximate solutions can be found. Suppose that and are the maximum absolute errors for and , respectively. Table 3 shows and for different values of .
5. Conclusions
This paper described an efficient method for finding the minimum of a functional over the specified domain. The main objective is to find the solution of an ordinary differential equation which arises from the variational problem. Our approach was based on the cubic Bspline method. Properties of the Bspline method are utilized to reduce the computation of this problem to some algebraic equations. The method is computationally attractive, and applications are demonstrated through illustrative examples. The obtained results showed that this approach can solve the problem effectively.
Acknowledgment
The authors thank the referees for their valuable comments that helped them in revising this paper.
References
 I. M. Gelfand and S. V. Fomin, Calculus of Variations, PrenticeHall, Englewood Cliffs, NJ, USA, 1963.
 L. Elsgolts, Differential Equations and the Calculus of Variations, Mir Publishers, Moscow, Russia, 1973.
 C. F. Chen and C. H. Hsiao, โA Walsh series direct method for solving variational problems,โ Journal of the Franklin Institute, vol. 300, no. 4, pp. 265โ280, 1975. View at: Publisher Site  Google Scholar  Zentralblatt MATH
 R. Y. Chang and M. L. Wang, โShifted Legendre direct method for variational problems,โ Journal of Optimization Theory and Applications, vol. 39, no. 2, pp. 299โ307, 1983. View at: Publisher Site  Google Scholar  Zentralblatt MATH
 C. Hwang and Y. P. Shih, โLaguerre series direct method for variational problems,โ Journal of Optimization Theory and Applications, vol. 39, no. 1, pp. 143โ149, 1983. View at: Publisher Site  Google Scholar  Zentralblatt MATH
 I. R. Horng and J. H. Chou, โShifted Chebyshev direct method for solving variational problems,โ International Journal of Systems Science, vol. 16, no. 7, pp. 855โ861, 1985. View at: Publisher Site  Google Scholar  Zentralblatt MATH
 O. von Stryk and R. Bulirsch, โDirect and indirect methods for trajectory optimization,โ Annals of Operations Research, vol. 37, no. 1–4, pp. 357โ373, 1992. View at: Publisher Site  Google Scholar  Zentralblatt MATH
 H. Jaddu, โDirect solution of nonlinear optimal control problems using quasilinearization and Chebyshev polynomials,โ Journal of the Franklin Institute, vol. 339, no. 45, pp. 479โ498, 2002. View at: Publisher Site  Google Scholar  Zentralblatt MATH
 P. Williams, โA quadrature discretization for solving optimal control problems,โ in Proceedings of the AAS/AIAA Space Flight Mechanic Meeting, vol. 119 of Advances in the Astronautical Sciences, Spaceflight Mechanics, pp. 703โ722, Maui, Hawaii, USA, February 2004. View at: Google Scholar
 W. Glabisz, โDirect Walshwavelet packet method for variational problems,โ Applied Mathematics and Computation, vol. 159, no. 3, pp. 769โ781, 2004. View at: Publisher Site  Google Scholar  Zentralblatt MATH
 A. Saadatmandi and M. Dehghan, โThe numerical solution of problems in calculus of variation using Chebyshev finite difference method,โ Physics Letters A, vol. 372, pp. 4037โ4040, 2008. View at: Google Scholar
 S. Abbasbandy and A. Shirzadi, โThe series solution of problems in the calculus of variations via the homotopy analysis method,โ Z. Naturforsch, vol. 64a, pp. 30โ36, 2008. View at: Google Scholar
 C. de Boor, A practical Guide to Splines, vol. 27, Springer, New York, NY, USA, 1978.
Copyright
Copyright © 2012 M. Zarebnia and M. Birjandi. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.