Abstract
A B-spline collocation method is developed for solving boundary value problems which arise from the problems of calculus of variations. Some properties of the B-spline 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 B-spline 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 B-spline function and basic formulation of B-spline collocation method required for our subsequent development and present a clear overview of this method. Also in this section, we illustrate how the cubic B-spline 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 Euler-Lagrange 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 second-order differential equation: with boundary conditions given in (2.5). In the present work, we find the variational problems by applying cubic B-spline collocation method on the Euler-Lagrange equations.
3. Cubic B-Spline Method
3.1. B-Spline Preliminaries
Consider the partition of . Let denote the set of piecewise polynomials of degree on subinterval of partition . In this work, we consider cubic B-spline method for finding approximate solution of variational problems. B-spline functions are discussed thoroughly in [13].
Consider the grid points on the interval as follows: where . Let be the B-spline function of degree , where , and satisfy the following conditions: (i), (ii), (iii).
The zero-order polynomial B-spline is defined as and also, the general-order B-spline is given by
Note that this definition means that is nonzero only in the range . The cubic B-splines , 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 B-spline functions: where are unknown coefficients and are cubic B-spline functions which are defined in (3.5). For convenience, consider the second-order 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 B-spline 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 Euler-Lagrange 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 Euler-Lagrange equation is written in the following form:
Substituting (3.6) into (4.13)-(4.14) and evaluating the result at the B-spline 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 B-spline method. Properties of the B-spline 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.