1. Introduction
Differential equations with suitable initial and boundary conditions are widely used to describe the physics of the problems. In order to study the physical systems, it is important to understand the differential equations and find their solutions. It is well known that in most of the practical systems, the equations are complex and do not have conventional analytical solutions
[1] | Finlayson, B. A. The Method of Weighted Residuals and Variational Principles, Academic Press; 1972, New York. |
[2] | Gupta, A. S. Calculus of Variations with Applications, PHI Publishing; 1997, New Delhi. ISBN: 978-81-203-1120-6. |
[3] | Kot, M. Chapter 4: Basic Generalization – A First Course in Calculus of Variations; 2014, American Mathematical Society. ISBN: 978-1-4704-1495-5. |
[4] | Borwein, J. M., and Zhu, Q. J. Techniques of Variational Analysis; 2005, Springer – Verlag. |
[1-4]
. In many complex linear second order differential equations, solutions are often obtained with the help of semi–analytical or numerical methods, like a series of expansion of functions
[1] | Finlayson, B. A. The Method of Weighted Residuals and Variational Principles, Academic Press; 1972, New York. |
[2] | Gupta, A. S. Calculus of Variations with Applications, PHI Publishing; 1997, New Delhi. ISBN: 978-81-203-1120-6. |
[1, 2]
. Such obtained solutions warrant in-depth understanding in the view of the physics of the problem and their application to the real problem of physical situations needs analytical study
[3] | Kot, M. Chapter 4: Basic Generalization – A First Course in Calculus of Variations; 2014, American Mathematical Society. ISBN: 978-1-4704-1495-5. |
[4] | Borwein, J. M., and Zhu, Q. J. Techniques of Variational Analysis; 2005, Springer – Verlag. |
[5] | Perera, U., and Bockman, C. Solutions of Sturm Liouville Problems, Mathematics. 2020, 8, p2074. http://doi.org/10.3390/math8112074 |
[3-5]
. Most of the problems in physics arise in the form of boundary value problems (BVP). In this article, the solution of linear second order differential equations with BVP will be studied.
In complex situations, the solution of BVP can be easily made with the help of variational techniques. Such as unsteady state heat and mass transfer problems can be easily converted to the problem of eigenvalue one and in these cases, variational methods are very useful
[1] | Finlayson, B. A. The Method of Weighted Residuals and Variational Principles, Academic Press; 1972, New York. |
[2] | Gupta, A. S. Calculus of Variations with Applications, PHI Publishing; 1997, New Delhi. ISBN: 978-81-203-1120-6. |
[3] | Kot, M. Chapter 4: Basic Generalization – A First Course in Calculus of Variations; 2014, American Mathematical Society. ISBN: 978-1-4704-1495-5. |
[1-3]
. However, very often, variational techniques demand both homogeneous differential equations along homogenous boundary conditions. In many physical systems, homogenous boundary conditions do not prevail particularly in the case of boundary conditions of first kind or Dirichlet boundary conditions. In such situations, it is convenient to choose a suitable variable and reduce the boundary conditions into a homogeneous one. This leads to non-homogeneous differential equations with homogeneous Dirichlet boundary conditions.
In this paper, an elegant method of solving non – homogeneous differential equations with homogeneous Dirichlet boundary conditions are described by seeking a solution as an expansion of eigenfunctions. The method involves converting the second-order differential equation to the Sturm – Liouville eigenvalue problem and equating the homogeneous part of the RSL equation to a multiplier. It is also termed as Lagrange multiplier method
[2] | Gupta, A. S. Calculus of Variations with Applications, PHI Publishing; 1997, New Delhi. ISBN: 978-81-203-1120-6. |
[4] | Borwein, J. M., and Zhu, Q. J. Techniques of Variational Analysis; 2005, Springer – Verlag. |
[5] | Perera, U., and Bockman, C. Solutions of Sturm Liouville Problems, Mathematics. 2020, 8, p2074. http://doi.org/10.3390/math8112074 |
[6] | Altiman, D., and Ugur, O. Variational Iterative Method for Sturm Liouville Differential Equations, Computers and Mathematics with Applications. 2009, 58, 322-328. http://doi.org/10.1016/j.camwa.2009.02.029 |
[7] | Cipu, E. C., and Barbu, C. D. Variational Estimation Methods for Sturm – Liouville Problems, Mathematics. 2022, 10, 3728. http://doi.org/10.3390/math10203728 |
[2, 4-7]
. However, the application of this method and its governing rules in the field of engineering problems are not well documented in the literature. The objective of this article is to find a straight forward approach to solve the RSL equation by deriving Lagrange multipliers and evolving a generalized solution as a set of functions. In this article, the principles of Lagrange Multiplier from a variational perspective are discussed and a deep understanding of the nature of such principles along with their application to basic problems is provided.
2. The Method
It is possible to express any second order differential equation as Sturm – Liouville equation as;
where, L is Sturm – Liouville operator.
In practical systems, non – homogeneous Dirichlet boundary conditions can be reduced to homogeneous ones. This leads the Sturm – Liouville equation to become a non – homogeneous one and can be expressed as,
It may be noted that non – homogeneous Sturm – Liouville problems may also arise when we try to solve non – homogeneous partial differential equations (PDE). This can have two parts – a general solution to the homogenous problem and a particular solution of non – homogeneous part as;
(4)
Any linear second order operator can be converted into an operator with self – adjointedness by carrying out following procedure. The resulting operator is referred to as a Sturm Liouville operator which is expressed as;
Putting equation (
5) into equation (
2), we obtain,
(6)
The functions p(x), p’(x) and q(x) are assumed to be continuous in the range (x1, x2) and p(x) >0 on [x1, x2]. Thus, the Sturm – Liouville equation becomes regular (RSL) in the interval [x1, x2].
A general linear second order differential equation can be expressed as below,
(8)
Both sides of equation (
8) are multiplied by µ(x) and the equation may be written as;
(9)
The first two terms of equation (
9) can be combined into an exact derivative of
if µ(x) satisfies
The equation (
10) can be solved to obtain µ(x) as follows;
Thus, the original equation (
7) can be multiplied by a factor
(12)
to turn it into RSL form of equation (
6). In summary, it may be expressed as follows;
Hence it is possible to transform any linear second order differential equation in the form of Sturm-Liouville equation and can be described as in equation (
2), where Z(x) is to satisfy given homogeneous Dirichlet boundary conditions. The eigenfunction expansion method makes use of eigenfunctions, Φ
n(x), satisfying the eigenvalue problem and can be equated with the left side of equation (
2), subject to the given boundary conditions.
Here, λ is the Lagrange multiplier
[2] | Gupta, A. S. Calculus of Variations with Applications, PHI Publishing; 1997, New Delhi. ISBN: 978-81-203-1120-6. |
[6] | Altiman, D., and Ugur, O. Variational Iterative Method for Sturm Liouville Differential Equations, Computers and Mathematics with Applications. 2009, 58, 322-328. http://doi.org/10.1016/j.camwa.2009.02.029 |
[7] | Cipu, E. C., and Barbu, C. D. Variational Estimation Methods for Sturm – Liouville Problems, Mathematics. 2022, 10, 3728. http://doi.org/10.3390/math10203728 |
[8] | Anjum, N., and He, J-H. Laplace Transform: Making the Variational Iteration Method Easier, Appl. Math Lett. 2019, 92, 134-138. http://doi.org/10.1016/j.aml.2019.01.016 |
[9] | Nadeem, M., and Yao, S-W. Solving System of Partial Differential Equations using Variational Iterative Method with He’sPolynomials, J. Math. Comp. Sci. 2014, 19, 203-211. http://doi.org/10.22436/jmcs.019.03.07 |
[10] | Khan, M., Hassan, Q. M. U., Haq, E. U., Khan, M. Y., Ayub, K., and Ayub, J. Analytical Technique with Lagrange Multiplier for Solving Specific Nonlinear Differential Equations, J. of Science and Arts. 2021, 21, 1(54), 5-14. http://doi.org/10.46939/J.Sci.Arts-21.1-a01 |
[2, 6-10]
and σ(x) is weight function. Then Z(x) of equation (2) can be written as an expansion in the eigenfunctions such as;
Inserting the expansion of equation (
17) into the left part of non-homogeneous differential equation (
16) gives;
(18)
Therefore, the non – homogeneous part of equation (
2), F(x), can be expressed as a series of expansion of eigenfunctions as:
(19)
It is known that inner product of two functions f(x) and g(x) can be defined in the interval [x1, x2] if the integral exists as;
(20)
If Φ
m(x) is the m-th eigenfunction of series
; which constitutes F(x), then the inner product in between F(x) and Φ
m(x) can be expressed by multiplying right part of equation (
19) by Φ
m(x) and integrate over the range [x
1, x
2] as,
(21)
(22)
We consider the inner product of two functions F(x) and Φ
m(x) where F(x) is an expansion series as described in equation (
19) and using the basis of orthogonality, it can be expressed as;
(23)
Where, δn, m is the Kronecker delta and is defined as;
Therefore, applying orthogonality to equation (
22), the following equation is obtained;
(25)
Hence, it is possible to obtain expansion coefficient as follows;
(26)
3. Illustrative Example
In this section, we will present an example that has exact solution as well as an approximate solution can be computed with expansion series of eigenfunctions. We now consider a generalized non-homogeneous differential equation and try to solve it with Lagrange Multiplier method. For example, we try to solve;
Under homogeneous Dirichlet boundary conditions;
It may be noted that this type of differential equation commonly arises in mechanical and electrical engineering, physics, and other fields where the behavior of dynamic systems is analyzed. It may be pointed out that application of the method of separation on unsteady state heat or mass transfer problems often leads into ordinary differential equation which are usually in the form of equation (
27). In many physical problems, the above differential equation (
27) relates to a mass – spring system with an external force. Solving the differential equation would provide the function y(x), giving a displacement of the mass as a function of the external force applied.
Applying equation (
13), (
14) and (
15), it is possible to convert equation (
27) to RSL form as follows:
Where, p(x) = 1, q(x) = k and F(x) = x.
If Φ is the set of eigenfunctions, then LHS of equation (
29) can equated to Lagrange multiplier as follows:
Where, λ is Lagrange Multiplier
[2] | Gupta, A. S. Calculus of Variations with Applications, PHI Publishing; 1997, New Delhi. ISBN: 978-81-203-1120-6. |
[6] | Altiman, D., and Ugur, O. Variational Iterative Method for Sturm Liouville Differential Equations, Computers and Mathematics with Applications. 2009, 58, 322-328. http://doi.org/10.1016/j.camwa.2009.02.029 |
[8] | Anjum, N., and He, J-H. Laplace Transform: Making the Variational Iteration Method Easier, Appl. Math Lett. 2019, 92, 134-138. http://doi.org/10.1016/j.aml.2019.01.016 |
[9] | Nadeem, M., and Yao, S-W. Solving System of Partial Differential Equations using Variational Iterative Method with He’sPolynomials, J. Math. Comp. Sci. 2014, 19, 203-211. http://doi.org/10.22436/jmcs.019.03.07 |
[10] | Khan, M., Hassan, Q. M. U., Haq, E. U., Khan, M. Y., Ayub, K., and Ayub, J. Analytical Technique with Lagrange Multiplier for Solving Specific Nonlinear Differential Equations, J. of Science and Arts. 2021, 21, 1(54), 5-14. http://doi.org/10.46939/J.Sci.Arts-21.1-a01 |
[2, 6, 8-10]
, σ(x) is weight function and σ(x) > 0. In this case, we consider σ(x) = 1 and rewrite the equation (
30) as;
Here, we assume λ > - k, so that the eigenfunctions become expansion series of trigonometric functions. It may be mentioned that k may a constant or a function of x. Therefore, the solution can be written as:
(32)
Putting the first part of boundary conditions (
28), we obtain A = 0 and, therefore;
If B = 0, then the solution becomes trivial one. Hence, we assume,
The equation (
34) can lead the solution of equation (
30) to some meaningful solution and the equation (
34) is only valid when
. Therefore, the solution can be expressed as;
In order to find out B, it is often useful to normalize the eigenfunctions. Thus, we have
Since, σ(x) = 1, the equation becomes;
Thus, we obtain and the solution becomes;
Now, we first expand the unknown solution in terms of eigenfunctions and equate with non – homogeneous part of equation (
29).
(39)
Applying orthogonality and equations (
22) to (
25) and equation (
39), it can be easily derived as;
(40)
Since, we considered σ(x) = 1, each coefficient can easily be derived as follows:
(41)
The above equations (
40) and (
41) is true when k is constant. If k is a function of x, then equation (
41) should be rewritten as;
(42)
4. Results
4.1. Analysis with Constant k
In this section, a reasonably simple form of the differential equation for the solution is chosen with constant k so that it is possible to compare the results with that of the exact solution.
Figure 1 shows the comparison of results between the exact solution and solutions obtained from equation (
38) in the interval [0, 1]. It is clear that the solution of equation (
29) in the Lagrange multiplier method with even 2 terms almost matches the exact solution. The variation of each term with x is illustrated in
Figure 2.
Figure 3 displays the behavior of each eigenfunction by computing variations after derivation of n-th term Lagrange multiplier and shows the variational approach to estimate the solution with increasing eigenvalues
[4] | Borwein, J. M., and Zhu, Q. J. Techniques of Variational Analysis; 2005, Springer – Verlag. |
[5] | Perera, U., and Bockman, C. Solutions of Sturm Liouville Problems, Mathematics. 2020, 8, p2074. http://doi.org/10.3390/math8112074 |
[6] | Altiman, D., and Ugur, O. Variational Iterative Method for Sturm Liouville Differential Equations, Computers and Mathematics with Applications. 2009, 58, 322-328. http://doi.org/10.1016/j.camwa.2009.02.029 |
[8] | Anjum, N., and He, J-H. Laplace Transform: Making the Variational Iteration Method Easier, Appl. Math Lett. 2019, 92, 134-138. http://doi.org/10.1016/j.aml.2019.01.016 |
[9] | Nadeem, M., and Yao, S-W. Solving System of Partial Differential Equations using Variational Iterative Method with He’sPolynomials, J. Math. Comp. Sci. 2014, 19, 203-211. http://doi.org/10.22436/jmcs.019.03.07 |
[10] | Khan, M., Hassan, Q. M. U., Haq, E. U., Khan, M. Y., Ayub, K., and Ayub, J. Analytical Technique with Lagrange Multiplier for Solving Specific Nonlinear Differential Equations, J. of Science and Arts. 2021, 21, 1(54), 5-14. http://doi.org/10.46939/J.Sci.Arts-21.1-a01 |
[11] | Razdan, A. K., and Ravichandran, V. Fundamentals of Partial Differential Equations, Springer; 2022, Singapore. |
[4-6, 8-11]
.
Figure 1. Comparison of exact solution y = f(x) with solutions obtained from Lagrange Multiplier method with different number of terms computed (k = 2).
Figure 2. Variation ynth term with x (k = 2).
Figure 3. The variation of eigenfunctions at different eigenvalues (λn) with x (k = 2).
4.2. Analysis with k as a Function of x
When k of equation (
29) is a function of x, equation (
42) should be used to determine the coefficients and solve the differential equation. We have considered k = x and the equation becomes:
The equation (
43) has been solved under the boundary condition (
28) using equation (
42) and the results are illustrated in
figure 4.
Figure 4. Variation of yn(x) with x at different number of terms when k = x.
The results are compared with one, two and three terms of Lagrange multiplier solution. It may be noted that the equation (
43) under homogenous Dirichlet boundary conditions does not have exact solution. However, it is evident from the
figure 4 that the solution with n = 3 approaches to desired accuracy and this will be separately emphasized in the next section.
4.3. Remarks
It should be noted that one must take a sufficiently large number of coefficients of y
n(x) so that the solution converges and approaches to very near exact value. The conditions for the convergence of the solution broadly are discussed in the literature. However, these estimates are so complicated that they are impractical in actual situations
[1] | Finlayson, B. A. The Method of Weighted Residuals and Variational Principles, Academic Press; 1972, New York. |
[2] | Gupta, A. S. Calculus of Variations with Applications, PHI Publishing; 1997, New Delhi. ISBN: 978-81-203-1120-6. |
[11] | Razdan, A. K., and Ravichandran, V. Fundamentals of Partial Differential Equations, Springer; 2022, Singapore. |
[1, 2, 11]
. For this reason, it is convenient to calculate y
n(x) and y
n+1(x) and compare the results. If the two successive terms coincide within the limits of desired accuracy, then the solution of the variational problem can be taken as y
n(x) and the corresponding value of λ is accepted. Otherwise, further iteration process is repeated till the values agree within the desired accuracy.
Figure 5 shows that the residual reduces as n increases when k is assumed to constant. This suggests that the residual, R, can be used as a criterion and this has been established for many problems
[1] | Finlayson, B. A. The Method of Weighted Residuals and Variational Principles, Academic Press; 1972, New York. |
[7] | Cipu, E. C., and Barbu, C. D. Variational Estimation Methods for Sturm – Liouville Problems, Mathematics. 2022, 10, 3728. http://doi.org/10.3390/math10203728 |
[10] | Khan, M., Hassan, Q. M. U., Haq, E. U., Khan, M. Y., Ayub, K., and Ayub, J. Analytical Technique with Lagrange Multiplier for Solving Specific Nonlinear Differential Equations, J. of Science and Arts. 2021, 21, 1(54), 5-14. http://doi.org/10.46939/J.Sci.Arts-21.1-a01 |
[11] | Razdan, A. K., and Ravichandran, V. Fundamentals of Partial Differential Equations, Springer; 2022, Singapore. |
[1, 7, 10, 11]
.
Figure 5. Residual as a function of x with (i) n = 1, (ii) n = 2, (iii) n = 3. (k = 2).
Comparing the residuals in
Figure 5, it is clear that the approximate solution corresponding to the case n = 3 would be a fairly good solution. Furthermore, error bounds can often be derived in terms of residual, so that the error bounds are improved
[1] | Finlayson, B. A. The Method of Weighted Residuals and Variational Principles, Academic Press; 1972, New York. |
[2] | Gupta, A. S. Calculus of Variations with Applications, PHI Publishing; 1997, New Delhi. ISBN: 978-81-203-1120-6. |
[7] | Cipu, E. C., and Barbu, C. D. Variational Estimation Methods for Sturm – Liouville Problems, Mathematics. 2022, 10, 3728. http://doi.org/10.3390/math10203728 |
[10] | Khan, M., Hassan, Q. M. U., Haq, E. U., Khan, M. Y., Ayub, K., and Ayub, J. Analytical Technique with Lagrange Multiplier for Solving Specific Nonlinear Differential Equations, J. of Science and Arts. 2021, 21, 1(54), 5-14. http://doi.org/10.46939/J.Sci.Arts-21.1-a01 |
[11] | Razdan, A. K., and Ravichandran, V. Fundamentals of Partial Differential Equations, Springer; 2022, Singapore. |
[1, 2, 7, 10, 11]
. For all problems, one can use the residual as a guide to the success of approximation, and in many problems, this guide can be made precise with numerical values for errors. It is more difficult to establish error bounds than finding the solution.
If k is a function of x, one should examine the convergence of two successive terms and justify the desired accuracy with requirement of the practical systems as exact solution of equation (
43) does not exist.
Figure 6 displays the difference of two consecutive terms and it is clear that the difference in between y
3 and y
2solution becomes lesser than that of y
2 and y
1. For the requirement of very precise results, higher approximations must be calculated. As n increases, one can expect the residual become smaller.
Figure 6. Difference of two successive terms as a function of x (k = x). The solution with n = 3 is also displayed for comparison.
5. Conclusions
In this article, an analytical method called Lagrange multiplier method from a variational approach for a solution of non – homogeneous second order differential equation under homogeneous Dirichlet boundary condition has been presented. In this method, it is mandatory to expand eigenfunctions into the series of trigonometric functions to achieve meaningful, non – trivial and convergent solutions.
The solution of non – homogeneous second order differential equation has been obtained where an exact solution is available and therefore, it has been possible to compare the results with the exact solution. In actual physical systems, the field differential equation is much more complicated, and further complexity arises due to boundary conditions. Therefore, this method of solving non – homogeneous RSL in terms of expansion of trigonometric series has been effectively applied to the RSL problems where exact solution does not exist. In such cases, one should compare the results of two successive terms for desired accuracy and convergence. Finally, it is evident from the analysis emphasized in this article that the Lagrange multiplier method is a very powerful and reasonably easy tool for solving non – homogenous linear RSL equations with varied boundary conditions of the first kind.