Next Article in Journal
Signal Identification of Wire Breaking in Bridge Cables Based on Machine Learning
Next Article in Special Issue
The Effects of Variable Thermal Conductivity in Thermoelastic Interactions in an Infinite Material with and without Kirchhoff’s Transformation
Previous Article in Journal
Energy Efficiency of a New Parallel PIC Code for Numerical Simulation of Plasma Dynamics in Open Trap
Previous Article in Special Issue
Splitting Methods for Semi-Classical Hamiltonian Dynamics of Charge Transfer in Nonlinear Lattices
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Boundary Shape Function Method for Computing Eigenvalues and Eigenfunctions of Sturm–Liouville Problems

1
Center of Excellence for Ocean Engineering, National Taiwan Ocean University, Keelung 202301, Taiwan
2
Department of Systems Engineering and Naval Architecture, National Taiwan Ocean University, Keelung 202301, Taiwan
3
Department of Marine Engineering, National Taiwan Ocean University, Keelung 202301, Taiwan
*
Author to whom correspondence should be addressed.
Mathematics 2022, 10(19), 3689; https://doi.org/10.3390/math10193689
Submission received: 12 September 2022 / Revised: 3 October 2022 / Accepted: 6 October 2022 / Published: 9 October 2022
(This article belongs to the Special Issue Computational Methods in Nonlinear Analysis and Their Applications)

Abstract

:
In the paper, we transform the general Sturm–Liouville problem (SLP) into two canonical forms: one with the homogeneous Dirichlet boundary conditions and another with the homogeneous Neumann boundary conditions. A boundary shape function method (BSFM) was constructed to solve the SLPs of these two canonical forms. Owing to the property of the boundary shape function, we could transform the SLPs into an initial value problem for the new variable with initial values that were given definitely. Meanwhile, the terminal value at the right boundary could be entirely determined by using a given normalization condition for the uniqueness of the eigenfunction. In such a manner, we could directly determine the eigenvalues as the intersection points of an eigenvalue curve to the zero line, which was a horizontal line in the plane consisting of the zero values of the target function with respect to the eigen-parameter. We employed a more delicate tuning technique or the fictitious time integration method to solve an implicit algebraic equation for the eigenvalue curve. We could integrate the Sturm–Liouville equation using the given initial values to obtain the associated eigenfunction when the eigenvalue was obtained. Eight numerical examples revealed a great advantage of the BSFM, which easily obtained eigenvalues and eigenfunctions with the desired accuracy.

1. Introduction

During 1836–1837, Sturm and Liouville created a new subject in the mathematical analysis of second-order ordinary differential equations (ODEs) with the homogeneous Sturm–Liouville boundary conditions. It is known as the Sturm–Liouville theory nowadays, and deals with the Sturm–Liouville problem (SLP):
( p ( x ) u ( x ) ) + q ( x ) u ( x ) = λ ω ( x ) u ( x ) ,     x ( a , b ) ,  
h u ( a ) p ( a ) u ( a ) = 0 ,   H u ( b ) + p ( b ) u ( b ) = 0 ,
where p ( x ) > 0 and ω ( x ) > 0 are strictly positive functions of x in a finite interval [ a ,   b ] and λ is a constant parameter. The two-point boundary value problem (1) and (2) is a regular SLP that allows nontrivial solutions only for specific values of λ , which are known as the eigenvalues. Only in a few cases can the eigenvalues be obtained analytically by solving algebraic equations; however, we do not even have explicit algebraic equations to solve λ for most cases.
SLPs are essential in partial differential equations, vibrations in continuum mechanics, heat conduction problems, the Schrödinger equation, the transport of microwaves, the Lax pair of the Korteweg–De Vries equation, and fractional derivative problems [1,2,3,4], etc. Many numerical method, such as the residuals–collocation method [5], Chebyshev collocation method [6,7], shooting method [8], exponentially fitted Numerov method [9], differential quadrature method [10,11], Sinc–Galerkin method [12], Adomian decomposition method [13], homotopy analysis method [14], and variational iteration method [15] have been developed in the past several decades to solve SLPs. These methods have been widely applied and efficient and accurate codes have been developed. On the other hand, the modified shooting methods were developed by Ghelardoni and Gheri [16] and Liu [17,18]. Compared with the corrected Numerov’s method in recent years, competitive results have been obtained by applying symmetric boundary value methods [19,20] and using high-order difference schemes [21].
This paper’s main focus was to develop the boundary shape function (BSF) to solve SLPs by automatically satisfying the boundary conditions. First, the idea of the boundary shape function proposed by Liu and Chang [22] was applied to find the periodic solution of nonlinear jerk equations. Then, some problems such as the optimal control problems of nonlinear Duffing oscillators and the boundary value problem (BVP) with different boundary conditions were addressed by the BSF. New methods based on the BSF were developed to address the SLPs that were easy to formulate and implement. There are various numerical methods to approximate the eigenvalue and the corresponding eigenfunction. The present technique used the BSF to transform the SLP to the initial value problem (IVP), which was drastically different from the Lie-group shooting method developed by Liu [17]. This new method did not need to find the missing initial values via the shooting technique; the difference will be pointed out below.
The paper is arranged as follows. Two main theorems are proven in Section 2 for the SLP with the homogeneous Sturm–Liouville boundary conditions. Here, we developed two novel transformation methods to derive two canonical forms that transformed the general SLP to those with homogeneous Dirichlet and Neumann boundary conditions. In Section 3, we transform the SLP with the Dirichlet boundary conditions to an IVP for a new variable, which guaranteed that the Dirichlet boundary conditions for y ( x ) could be satisfied automatically. In the transformed IVP for z ( x ) , an unknown constant z ( b ) appeared that is yet to be determined. In Section 4, we derive z ( b ) in terms of the initial values for z ( x ) and a normalized value A 0 given in y ( a ) = A 0 for the uniqueness of the eigenfunction y ( x ) , which could avoid the iteration to determine z ( b ) . The numerical algorithm based on the boundary shape function method (BSFM) is developed in Section 5. Numerical examples with the homogeneous Dirichlet boundary conditions are given in Section 6 that verify the new results and algorithms. In Section 7, the BSFM is derived to solve the SLP with the homogeneous Neumann boundary conditions. In Section 8, several examples are given of homogeneous Sturm–Liouville boundary conditions. Finally, some conclusions are presented in Section 9.

2. Sturm–Liouville Boundary Conditions

It is well known that the eigenvalues satisfy the relation:
λ 0 < λ 1 < λ n ,  
and the eigenfunction corresponding to an eigenvalue λ n has n intersections with the x-axis inside the interval x ( a , b ) . Moreover, since for any given eigenvalue it is possible to compute an infinite number of eigenfunctions, in general, a normalization condition in the form a b u 2 ( x ) d x = 1 is required for the uniqueness of u ( x ) . The computation of λ and u ( x ) traditionally has been quite a challenging task. We will show that inexpensive computing that evaluates λ via a direct solution of the differential Equation (1) is feasible.
For the general SLP of Equations (1) and (2), we supposed that u ( a ) 0 , u ( a ) 0 , u ( b ) 0 , and u ( b ) 0 . We transformed them into two canonical forms with the Dirichlet and Neumann homogeneous boundary conditions, respectively, and then proposed a BSFM for determining the eigenvalues and finding the corresponding eigenfunctions.

2.1. Transforming to Neumann-Type Boundary Conditions

In Equations (1) and (2), suppose that h 0 and H 0 such that the coefficients preceding u ( a ) and u ( b ) can be set equal to one. When letting μ 1 = p ( a ) / h and μ 2 = p ( b ) / H , we may need to prove the following result.
Theorem 1.
For the SLP with the Sturm–Liouville type boundary conditions:
( p ( x ) u ( x ) ) + q ( x ) u ( x ) = λ ω ( x ) u ( x ) ,     x ( a , b ) ,  
u ( a ) + μ 1 u ( a ) = 0 ,   u b + μ 2 u ( b ) = 0 ,
where λ is an eigen-parameter. If the following condition is satisfied:
μ 2 μ 1 b a = 1 ,
then Equations (4) and (5) can be transformed into the Neumann-type SLP:
[ p ( x ) y ( x ) ( x + μ 1 a ) 2 ] + [ p ( x ) ( x + μ 1 a ) 3 2 p ( x ) ( x + μ 1 a ) 4 + q ( x ) ( x + μ 1 a ) 2 ] y ( x ) = λ ω ( x ) y ( x ) ( x + μ 1 a ) 2 ,
y ( a ) = 0 ,   y ( b ) = 0 .
The relation between  u ( x )  and  y ( x )  is given as:
y ( x ) = ( x + μ 1 a ) u ( x ) .
Proof. 
Let:
y ( x ) = [ 1 x a b a ] [ u ( x ) + μ 1 u ( x ) ] + x a b a [ u ( x ) + μ 2 u ( x ) ] .
It is apparent that the Neumann boundary conditions in Equation (8) follow from Equation (5) upon using the above equation. It follows from Equation (10) that:
y ( x ) = u ( x ) + [ μ 1 + ( μ 2 μ 1 ) x a b a ] u ( x ) .
If condition (6) holds, Equation (11) reduces to:
y ( x ) = u ( x ) + ( x + μ 1 a ) u ( x ) = [ ( x + μ 1 a ) u ( x ) ] .
Thus, y ( x ) = ( x + μ 1 a ) u ( x ) in Equation (9) is proved. Inserting Equation (9) and its first and second differentials into Equation (4), we can derive:
( p ( x ) y ( x ) ) + 2 p ( x ) y ( x ) ( x + μ 1 a ) + [ p ( x ) ( x + μ 1 a ) 2 p ( x ) ( x + μ 1 a ) 2 + q ( x ) ] y ( x ) = λ ω ( x ) y ( x ) ,
which, when multiplied by 1 / ( x + μ 1 a ) 2 on both sides, can lead to Equation (7). □
Motivated by Theorem 1, we generalized it to the Sturm–Liouville type boundary conditions without needing the constraint μ 2 μ 1 = b a . For this purpose, we sought a function F ( x ) in:
y ( x ) = F ( x ) u ( x ) ,
so that the Sturm–Liouville type boundary conditions in Equation (5) with u ( a ) 0 and u ( b ) 0 were transformed to:
y ( a ) = F ( a ) u ( a ) + F ( a ) u ( a ) = [ F ( a ) μ 1 F ( a ) ] u ( a ) = 0 F ( a ) μ 1 F ( a ) = 0 ,
y ( b ) = F ( b ) u ( b ) + F ( b ) u ( b ) = [ F ( b ) μ 2 F ( b ) ] u ( b ) = 0 F ( b ) μ 2 F ( b ) = 0 .
Through some manipulations, we can derive:
F ( x ) = 1 b a + x a μ 1 ( b a ) + ( μ 1 μ 2 + b a ) ( x a ) 2 μ 1 ( 2 μ 2 b + a ) ( b a ) 2 , if   2 μ 2 b + a 0 ,
F ( x ) = 1 b a + x a μ 1 ( b a ) + ( μ 1 μ 2 + b a ) ( x a ) 3 μ 1 ( 3 μ 2 b + a ) ( b a ) 3 , if   2 μ 2 b + a = 0 .
Theorem 2. 
The SLP (4) and (5) with  u ( a ) 0  and  u ( b ) 0  in the Sturm–Liouville boundary conditions can be transformed to the Neumann-type boundary conditions:
[ p ( x ) y ( x ) F 2 ( x ) ] + [ p ( x ) F ( x ) + p ( x ) F ( x ) F 3 ( x ) 2 p ( x ) F ( x ) 2 F 4 ( x ) + q ( x ) F 2 ( x ) ] y ( x ) = λ ω ( x ) y ( x ) F 2 ( x ) ,
y ( a ) = 0 ,   y ( b ) = 0 ,
where the relation between  u ( x )  and  y ( x )  is given by Equation (14) and  F ( x )  is given by Equations (17) or (18).
Proof. 
The Neumann boundary conditions in Equation (20) are given by Equations (15) and (16). By inserting Equation (14) and its first differential into Equation (4), we can derive:
( p ( x ) y ( x ) F ( x ) ) + p ( x ) F ( x ) y F 2 ( x ) + ( p ( x ) F ( x ) F 2 ( x ) ) y + q ( x ) y F ( x ) = λ ω ( x ) y F ( x ) .
When Equation (21) is divided by F ( x ) on both sides and use:
( p ( x ) y F 2 ( x ) ) = 1 F ( x ) ( p ( x ) y F ( x ) ) p ( x ) y F ( x ) ( 1 F ( x ) ) = 1 F ( x ) ( p ( x ) y F ( x ) ) + p ( x ) F ( x ) y F 3 ( x ) ,
we can change it to:
( p ( x ) y F 2 ( x ) ) + 1 F ( x ) ( p ( x ) F ( x ) F 2 ( x ) ) y + q ( x ) y F 2 ( x ) = λ ω ( x ) y F 2 ( x ) .
The expansion of the second term generates Equation (19). □
Note that Niessen and Zettl [23] developed a similar transformation ( y ( x ) = u ( x ) / f ( x ) ), where f ( x ) is a solution of Equation (1) for some λ . The purpose was to transform the singular SLP with a singular nonoscillatory limit circle endpoint into a regular one. However, the present F ( x ) in Equations (17) and (18) was different from the 1 / f ( x ) used in [23].

2.2. Transforming to Dirichlet-Type Boundary Conditions

This is similar to Theorem 2 in that we can derive the following result:
Theorem 3. 
The SLP in Equations (4) and (5) can be transformed to the Dirichlet-type SLP:
[ y ( x ) D ( x , λ ) ] + Q ( x , λ ) y ( x ) = 0 ,
y ( a ) = 0 ,   y ( b ) = 0 ,
where:
y ( x ) = u ( x ) + A 1 ( x ) p ( x ) u ( x ) , A 1 ( x ) μ 1 p ( a ) + [ μ 2 p ( b ) μ 1 p ( a ) ] x a b a , A 2 ( x , λ ) A 1 ( q λ ω ) , A 3 ( x ) 1 p ( x ) + μ 2 p ( b ) ( b a ) μ 1 p ( a ) ( b a ) , D ( x , λ ) 1 p ( x ) + μ 2 p ( b ) ( b a ) μ 1 p ( a ) ( b a ) + ( λ ω q ) A 1 2 , Q ( x , λ ) A 2 D + A 2 A 3 A 1 D A 2 D D 2 .  
Proof. 
By letting:
y ( x ) = [ u ( x ) + μ 1 p ( a ) p ( x ) u ( x ) ] ( 1 x a b a ) + [ u ( x ) + μ 2 p ( b ) p ( x ) u ( x ) ] x a b a ,  
where p ( a ) > 0 and p ( b ) > 0 , we transform Equations (4) and (5) into the canonical forms of (23) and (24). It is easy to confirm that y ( x ) in Equation (26) satisfies Equation (24) when u ( x ) satisfies Equation (5).
For easy operations, y ( x ) in Equation (26) is written as:
y ( x ) = u ( x ) + A 1 ( x ) p ( x ) u ( x ) ,  
where:
A 1 ( x ) μ 1 p ( a ) + [ μ 2 p ( b ) μ 1 p ( a ) ] x a b a .  
When taking the derivative of Equation (27) with respect to x , we get:
y = u + A 1 p u + A 1 ( p u ) ,  
where for simplicity we omit the variable x in the functions, and:
A 1 ( x ) = 1 b a [ μ 2 p ( b ) μ 1 p ( a ) ]  
is a constant. Inserting Equation (4) for ( p u ) into Equation (29) leads to:
y = u + A 1 p u + A 1 ( q λ ω ) u .  
Using Equations (27) and (31), u and p u in terms of y and y can be solved as follows:
u = 1 D [ A 3 y A 1 y ] ,  
p u = 1 D [ y A 2 y ] ,
where:
A 2 ( x , λ ) A 1 ( q λ ω ) ,  
A 3 ( x ) 1 p + A 1 ,
D ( x , λ ) A 3 A 1 A 2 .
Further, when taking the derivative of Equation (33) with respect to x and using Equation (4) for ( p u ) again, we get:
( p u ) = 1 D [ y A 2 y A 2 y ] D D 2 [ y A 2 y ] = ( q λ ω ) u .  
The latter equation can be written as:
[ y ( x ) D ( x , λ ) ] + 1 D [ A 2 y A 2 y ] D D 2 A 2 y + ( q λ ω ) u = 0 ,  
which, upon using Equations (34) and (32) for u , can be arranged as:
[ y ( x ) D ( x , λ ) ] + 1 D A 2 y + 1 D ( q λ ω ) y D D 2 A 2 y + ( q λ ω ) 1 D [ A 3 y A 1 y ] = 0 ,
Thus, we prove Equation (23). □

3. Transforming to an Initial Value Problem for z(x)

To clearly demonstrate the new BSFM, we began with the SLP with the homogeneous Dirichlet boundary conditions:
L ( y ) ( p ( x ) y ( x ) ) + q ( x ) y ( x ) = λ ω ( x ) y ( x ) ,   x [ a , b ] ,  
y ( a ) = 0 ,   y ( b ) = 0 ,
where p ( x ) ,   q ( x ) , and ω ( x ) L 1 [ a ,   b ] , with p ( x ) > 0 and s ( x ) > 0 .
In view of Equations (40) and (41), if y ( x ) is an eigenfunction, then α y ( x ) ,   α 0 is also an eigenfunction. For the uniqueness of y ( x ) , we considered a normalization condition as follows:
y ( a ) = A 0 ,  
where A 0 is a given nonzero constant. Equation (42) is more straightforward than the usual normalization condition a b y 2 ( x ) d x = 1 . According to the theory of ODE, the solution of y ( x ) that satisfies Equation (40) with the initial conditions y ( a ) = 0 and y ( a ) = A 0 0 is unique.
To guarantee that the solution of y ( x ) could exactly satisfy Equation (41), we introduced a shape function:
s ( x ) = b x b a ,     s ( a ) = 1 ,     s ( b ) = 0 .
As a consequence, we could prove the following result:
Theorem 4. 
For the function  z ( x ) C 2 [ a ,   b ] ,
y ( x ) = z ( x ) s ( x ) z ( a ) [ 1 s ( x ) ] z ( b )  
satisfies Equation (41).
Proof. 
Inserting x = a into Equation (44) leads to:
y ( a ) = z ( a ) s ( a ) z ( a ) [ 1 s ( a ) ] z ( b ) ,
by Equation (43), which becomes:
y ( a ) = z ( a ) z ( a ) [ 1 1 ] z ( b ) = 0 .
Similarly, inserting x = b into Equation (44) yields:
y ( b ) = z ( b ) s ( b ) z ( a ) [ 1 s ( b ) ] z ( b ) ,
which, in view of Equation (43), becomes:
y ( b ) = z ( b ) [ 1 0 ] z ( b ) = 0 .
Thus, we complete the proof. □
Theorem 4 is crucial in that the newly introduced shape function method guaranteed that the boundary conditions in Equation (41) could be exactly satisfied by y ( x ) in Equation (44). Corresponding to the shape function s ( x ) ,   y ( x ) was called a boundary shape function since it automatically satisfied the boundary conditions (41). Starting from this new idea, we could develop a BSFM to solve Equations (40) and (41) by considering the relation between y ( x ) and z ( x ) :
z ( x ) = y ( x ) + G ( x ) ,  
where:
G ( x ) s ( x ) z ( a ) + [ 1 s ( x ) ] z ( b ) = z ( b ) + b x b a [ z ( a ) z ( b ) ] ,  
by substituting Equation (43) for s ( x ) . Due to G ( a ) z ( a ) and G ( b ) z ( b ) , Equation (45) implies y ( a ) = y ( b ) = 0 for automatically satisfying Equation (41).
Hence, Equation (40), after inserting Equation (45) for y ( x ) , could be transformed to
L ( z ( x ) ) ( p ( x ) z ( x ) ) + q ( x ) z ( x ) = λ ω ( x ) z ( x ) + L ( G ( x ) ) λ ω ( x ) G ( x ) ,     x [ a , b ] ,
z ( a ) = C 1 ,   z ( a ) = C 2 ,
which can be viewed as an IVP for z ( x ) in the interval x [ a , b ] upon giving the initial values C 1 and C 2 definitely.

4. Finding the Terminal Value of z(x)

However, z ( b ) in the function G ( x ) given by Equation (46) is an unknown constant. For Equations (47) and (48) to be the IVP, we had to ensure that z ( b ) was not an unknown constant, which was proved as follows:
Theorem 5. 
In Equation (46),  z ( b )  is given by:
z ( b ) = C 1 + ( b a ) ( C 2 A 0 ) .  
Moreover, we have:
z p ( x ) = G ( x ) ,   y ( x ) = z h ( x ) ,  
where  z p  and  z h  are, respectively, the particular and homogeneous solutions of Equation (47).
Proof. 
Taking the differential of Equation (45) with respect to x and inserting x = a leads to:
y ( a ) = z ( a ) G ,  
where G is a constant due to Equation (46); from Equation (48), it follows that:
G = z ( b ) z ( a ) b a = z ( b ) C 1 b a .  
When substituting Equation (52) for G ,   y ( a ) = A 0 as shown in Equation (42) and Equation (48) for z ( a ) = C 2 in Equation (51), we get:
A 0 = C 2 + C 1 z ( b ) b a z ( b ) = C 1 + ( b a ) ( C 2 A 0 ) ;  
hence, Equation (49) is proven.
Equation (47) is a nonhomogeneous ODE for z ( x ) . We could decompose z ( x ) into:
z ( x ) = z h ( x ) + z p ( x ) ,  
where z h ( x ) and z p ( x ) are the homogeneous and particular solutions of Equation (47), respectively. The latter means that z p ( x ) satisfied the nonhomogeneous part of Equation (47):
L ( z p ( x ) ) λ ω ( x ) z p ( x ) = L ( G ( x ) ) λ ω ( x ) G ( x ) ,  
which by observation immediately implied the first result in Equation (50). Inserting Equation (54) into Equation (45) and using z p ( x ) = G ( x ) yields:
y ( x ) = z h ( x ) + z p ( x ) G ( x ) = z h ( x ) + G ( x ) G ( x ) = z h ( x ) .  
Thus, we end the proof. □
The derivation of Equation (49) for z ( b ) was independent of the governing Equation (4), which meant that the current method of BSFM was applicable to more general eigenvalue problems rather than Equation (4); for instance, nonlinear eigenvalue problems.

5. Algorithm to Solve Eigenvalues and Eigenfunctions

We have proved the two main Theorems, 4 and 5, which could help us efficiently compute the eigenvalues. The result in Theorem 5 was very important because we could avoid the iteration to determine z ( b ) . Upon letting
ξ ( x ) p ( x ) [ z ( x ) G ] ,  
it follows from Equation (47) that:
z ( x ) = ξ ( x ) p ( x ) + G ,  
ξ ( x ) = [ q ( x ) λ ω ( x ) ] [ z ( x ) G ( x ) ] ,
z ( a ) = C 1 ,   ξ ( a ) = p ( a ) A 0 ,
where the initial condition ξ ( a ) = p ( a ) A 0 for ξ ( x ) is based on Equations (49), (52), and (58):
ξ ( a ) = p ( a ) [ z ( a ) G ] = p ( a ) [ C 2 z ( b ) C 1 b a ] = p ( a ) [ C 2 ( b a ) ( C 2 A 0 ) b a ] = p ( a ) A 0 .
In Equations (58) and (59), G and G are derived from Equations (46), (48), (49), and (52):
G = s ( x ) z ( a ) + [ 1 s ( x ) ] z ( b ) = C 1 s ( x ) [ 1 s ( x ) ] [ C 1 + ( b a ) ( C 2 A 0 ) ] ,  
G = s ( x ) [ C 1 z ( b ) ] = 1 b a [ C 1 + ( b a ) ( C 2 A 0 ) ] C 1 b a = C 2 A 0 .
Because the initial values z ( a ) = C 1 and ξ ( a ) = p ( a ) A 0 in Equation (60) were available, now, from x = a to x = b , we could apply the fourth-order Runge–Kutta method (RK4) to integrate the first-order ODEs (58) and (59) with a given λ to obtain z ( b ) ; hence:
y ( b ; λ ) = z ( b ) G ( b )    
could be obtained for each λ given. For use in the latter, we called the curve of y ( b ; λ ) versus λ an eigenvalue curve, where y ( b ; λ ) was a target function and λ was an eigen-parameter. We could adjust the value of λ until y ( b ; λ ) satisfied | y ( b ; λ ) | < ε , where ε is a given tolerant error to mismatch the right-boundary condition y ( b ; λ ) = 0 .
The algorithm based on the BSFM for solving the SLP with the homogeneous Dirichlet boundary conditions can be summarized as follows:
(i)
Give C 1 ,   C 2 ,   A 0 ,   t ,   v , the stopping criterion ε ,   x = ( b a ) / N with N given, and initial guess λ ( 0 ) .
(ii)
For k = 1 ,   2 , , applying the RK4 to integrate the ODEs in Equations (58)–(60) with N steps from x = a to x = b . Take:
y ( b ; λ ( k ) ) = z ( b ) G ( b ) ,    
where y ( b ; λ ( k ) ) is an implicit function of λ ( k ) ; then, we employed the fictitious time integration method (FTIM) [24] to compute the next step value:
λ ( k + 1 ) = λ ( k ) v t t k y ( b ; λ ) ,    
where t k = k t is a fictitious time; if λ ( k ) rendered:
| λ ( k + 1 ) λ ( k ) | < ε ,   or     | y ( b ; λ ) | < ε ,    
then we could find an eigenvalue inside an interval in which we were interested. We could obtain all eigenvalues sequentially by changing the interval and going to (ii). In (i), the initial guess λ ( 0 ) could be observed in the data of the eigenvalue curve.
A more straightforward method to determine λ is to use a finer tuning technique (FTT). Let λ ( j ) = c + ( j 1 ) ( d c ) / ( M 1 ) ,   j = 1 , , M run in an interval [ c ,   d ] , including the eigenvalues of interest, from which the zero points inside that interval can be detected from the plot of y ( b ; λ ( k ) ) versus λ [ c ,   d ] . We could tune the interval to a finer one by gradually reducing the length of the interval [ c ,   d ] to locate the minimum of:
min j [ 1 ,   M ] | y ( b ; λ ( j ) ) | ,    
until the minimum was smaller than ε . At this moment, we could precisely find the eigenvalue inside that interval.
We can confirm that the initial values of y ( x ) and y ( x ) are:
y ( a ) = 0 ,   y ( a ) = A 0 .  
The first one was already proved in Theorem 4. Based on Equations (45), (46), (49), and (52), it followed that:
y ( a ) = z ( a ) G = C 2 + C 1 z ( b ) b a     = C 2 + C 1 C 1 ( b a ) C 2 A 0 b a = C 2 C 2 + A 0 = A 0 .  
Suppose one wants to solve the corresponding eigenfunction for an eigenvalue λ obtained. In that case, one can employ the initial values in Equation (68) and integrate Equation (40) after inserting the obtained eigenvalue λ to solve the eigenfunction.
Remark 1.
Because Equation (59) involves  λ  as an unknown value, the integrated value  y ( b ; λ )  is indeed an implicit function of  λ . By meeting the right boundary condition for  y ( x ) , an algebraic equation  y ( b ; λ ) = 0  can be used to determine the eigenvalue  λ , which can be performed by a numerical method based on FTIM [24]. The readers may ask why we did not directly integrate Equation (40) by using the initial values  y ( a ) = 0 ,   y ( a ) = C 0 ,  with the guessed  C 0  and the guessed eigenvalue  λ  to match the right boundary condition  y ( b ) = 0  to pick up the correct eigenvalue. However, this approach cannot guarantee that the right boundary condition can be exactly satisfied, which may render an unstable and incorrect solution. We will give an example to demonstrate the failure of this naive approach in the shooting method. We instead integrated  z ( x )  using Equations (58)–(60) in the BSFM, which guaranteed that the right boundary condition  y ( b ; λ ) = 0  could be satisfied automatically as proved in Theorem 4. From this aspect, the BSFM was quite different from the shooting method, where the correct value  C 0  was not known in advance, and even Equation (40) was integrated by using the correct initial values  y ( a ) = 0 ,   y ( a ) = C 0 ,  while the end value  y ( b )  was not guaranteed to satisfy the right-end condition  y ( b ) = 0 .
For the general SLPs (4) and (5), the boundary conditions of which were not of the Dirichlet type, we could employ Theorem 3 to transform them into Equations (23) and (24). Then, after using the above BSFM to determine λ ,   y ( x ) , and y ( x ) , we could determine the eigenfunction u ( x ) using Equation (32).

6. Numerical Examples of Dirichlet-Type Sturm–Liouville Problem

6.1. Example 1

For the first test example, we considered:
[ x 1 y ( x ) ] x 3 y ( x ) = λ x 3 y ( x ) ,  
y ( 1 ) = y ( e ) = 0 ,    
where λ k = ( k + 1 ) 2 π 2 , k , y k = x sin ( ( k + 1 ) π   ln x ) , and k = 0 ,   1 , .
We chose an adequately large integer N to enhance the accuracy when integrating ODEs using the RK4, the CPU time of which was saved because we merely needed to integrate two first-order ODEs with N steps from x = a to x = b . When a larger eigenvalue was computed, a larger N was demanded. Figure 1a shows a plot of the eigenvalue curve of y ( b ) versus λ in an interval (0, 300) with M = 601 , in which we can see that there were five zero points that corresponded to the first five eigenvalues.
We applied the BSFM to solve this problem with A 0 = 1 ,   C 1 = C 2 = 1 , and N = 1000 . As shown in Figure 2, by tuning to finer intervals using the FTT and applying the BSFM with A 0 = ( k + 1 ) π (for coinciding with the exact one), C 1 = C 2 = 1 ,     ε = 10 9 , and N = 1000 , we could sequentially obtain the required eigenvalues. We showed the calculated eigenfunctions for k = 0 ,   2 ,   9 , which coincided with the exact ones. It can be seen in Figure 3 that the numerical errors of the eigenfunctions were very small, on the order of 10 10 to 10 8 .
The present problem had three eigenvalues in the range of λ < 100 , as shown in Figure 1a by the three intersection points before λ = 100 , which are listed in Table 1. If we directly integrated Equation (40) by employing the initial values y ( a ) = 0 and y ( a ) = C 0 and picked the zero points in the eigenvalue curve, it led to incorrect results as listed in Table 1. In contrast, we could obtain very accurate eigenvalues by using the FTT, FTIM, and BSFM no matter which value of A 0 = 1 or A 0 = 2 was used; the errors were on the order of 10 11 to 10 10 . In the FTIM, we took t = 0.001 and v = 50 for λ 0 ,   t = 0.0005 and v = 150 for λ 1 , and t = 0.0005 and v = 200 for λ 2 .
Remark 2. 
To remedy the shortcoming of the naive approach to the IVP of  y ( x ) , one way is to use the shooting method [16,17] to pick up the correct initial value of  y ( x ) = 0  rather than  y ( a ) = 0  such that the integrated value  y ( b )  can match the true right-end value  y ( b ) = 0 . From this point, we can see that the BSFM presented here differed significantly from the shooting method. In contrast to the shooting method, the initial values  C 1  and  C 2  for the IVP of  z ( x )  were given definitely and the right boundary condition  y ( b ) = 0    was satisfied automatically and exactly upon solving for  z ( x )  with the correct eigenvalue  λ . Notice the differences between the IVP for  y ( x )  in the shooting method and the BSFM for  z ( x ) . In the shooting method, there were two unknown values  C 0  and  λ  to be determined. In contrast,  λ  was the only unknown value to be determined in the BSFM.

6.2. Example 2

For this example, we considered the following SLP [8,10,17]:
y ( x ) + e x y ( x ) = λ y ( x ) ,
y ( 0 ) = y ( π ) = 0 .
No closed-form solutions of λ and y ( x ) exist. The BSFM with A 0 = 1 ,   C 1 = C 2 = 1 ,   N = 2000 , and M = 3001 was adopted to determine the eigenvalues in the range of 4 < λ < 920 as shown in Figure 1b, in which 30 intersection points could be observed. The results agreed with those obtained by Liu [17].
Table 2 compares the calculated eigenvalues with those obtained by Ghelardoni et al. [8] and Liu [17]. By using the FTT and applying the BSFM with A 0 = 1 ,   C 1 = C 2 = 1 ,   ε = 10 12 , and N = 2000 , we could sequentially obtain the required eigenvalues shown in Table 2. Figure 4 displays the calculated eigenfunctions for k = 4 ,     9 ,     29 , where the numerical errors of the eigenfunctions to satisfy the right boundary condition were very small, on the order of 10 15 to 10 12 .

6.3. Example 3

We considered the following SLP [25]:
y ( x ) + cos 2 x y ( x ) = λ y ( x ) ,
y ( 0 ) = y ( π ) = 0 .
We employed the BSFM with A 0 = 1 ,   C 1 = C 2 = 1 ,   N = 2000 , and M = 3001 to search for the eigenvalues in the range of 1 < λ < 20 . Table 3 compares the calculated eigenvalues through the FTT to adjust the eigenvalues to match the right-boundary condition y ( π ) = 0 with those obtained by Eggert et al. [25]. The accuracy of the computed eigenvalues by the BSFM could arrive at 10 10 .

7. Neumann-Type Boundary Conditions

The simplest eigenvalue problem with an eigenfunction satisfying the Neumann boundary conditions is:
y ( x ) + λ y ( x ) ,   x [ 0 ,   1 ] , y k ( x ) = cos ( k + 1 ) π x , y ( 0 ) = 0 ,   y ( 1 ) = 0 ,
the eigenvalues of which are λ k = ( k + 1 ) 2 π 2 , k = 0 ,   1 ,   2 , .

7.1. Variable Transformation

In this section, we considered Equation (40) with the following homogeneous Neumann boundary conditions:
y ( a ) = 0 ,   y ( b ) = 0 .
For the SLP with the homogeneous Neumann boundary conditions, we considered another normalization condition:
y ( a ) = B 0 .
According to the theory of ODE, the nontrivial solution of y ( x ) satisfying Equation (40) with the initial conditions y ( a ) = B 0 0 and y ( a ) = 0 is unique.
We can derive:
s 1 ( x ) = b x b a x 2 2 ( b a ) ,           s 1 ( a ) = 1 ,         s 1 ( b ) = 0 ,
s 2 ( x ) = s 20 a x b a + x 2 2 ( b a ) ,           s 2 ( a ) = 1 ,         s 2 ( b ) = 1 ,
where s 20 is a given constant, so that:
s 2 ( a ) = s 20 a 2 2 ( b a ) 0 .
Theorem 6. 
For the function  z ( x ) C 2 [ a ,   b ] :
y ( x ) = z ( x ) s 1 ( x ) z ( a ) s 2 ( x ) z ( b )
satisfies Equation (77).
Proof. 
Taking the differential of Equation (82) with respect to x and inserting x = a leads to:
y ( a ) = z ( a ) s 1 ( a ) z ( a ) s 2 ( a ) z ( b ) ,
which, when using Equations (79) and (80), becomes:
y ( a ) = z ( a ) z ( a ) = 0 .
When inserting x = b into the differential of Equation (82), we get:
y ( b ) = z ( b ) s 1 ( b ) z ( a ) s 2 ( b ) z ( b ) ,
which, when using Equations (79) and (80), becomes:
y ( b ) = z ( b ) z ( b ) = 0 .
Thus, the proof is completed. □
Consider the variable transformation from y ( x ) to z ( x ) by:
z ( x ) = y ( x ) + H ( x ) ,
where:
H ( x ) s 1 ( x ) z ( a ) + s 2 ( x ) z ( b ) .
Using Equation (83), we can transform Equation (40) into:
( p ( x ) z ( x ) ) + q ( x ) z ( x ) = λ ω ( x ) z ( x ) + L ( H ( x ) ) λ ω ( x ) H ( x ) ,   x [ a ,   b ] ,
z ( a ) = C 1 ,   z ( a ) = C 2 ,
where C 1 and C 2 are constant initial values.
Theorem 7. 
In Equation (84),  z ( b ) is given as:
z ( b ) = 2 ( b a ) ( B 0 C 1 ) + a ( 2 b a ) C 2 a 2 2 ( b a ) s 20 ,
where the constraint of s 20 is given by Equation (81) with a 2 2 ( b a ) s 20 0 ; we take y ( a ) = B 0 for some nonzero constant B 0 .
Proof. 
Inserting x = a into Equation (83) leads to:
y ( a ) = z ( a ) H ( a ) .
On the other hand, it follows from Equations (79)–(81), (84), and (86) that:
H ( a ) = ( 2 a b a 2 ) C 2 2 ( b a ) + [ s 20 a 2 2 ( b a ) ] z ( b ) .
By substituting y ( a ) = B 0 with Equation (78) and z ( a ) = C 1 with Equation (86) in Equation (88), we get:
B 0 = C 1 ( 2 a b a 2 ) C 2 2 ( b a ) + [ a 2 2 ( b a ) s 20 ] z ( b ) .
Hence, Equation (87) is proved. □

7.2. Algorithm Based on the BSFM

Let:
z ( x ) = ξ ( x ) p ( x ) + H ( x ) ,  
ξ ( x ) = [ q ( x ) λ ω ( x ) ] [ z ( x ) H ( x ) ] ,
z ( a ) = C 1         ξ ( a ) = 0 .
The latter condition could be proved as follows. After taking the differential of Equation (85), inserting x = a , and using Equations (79) and (80), we could obtain z ( a ) = H ( a ) . Inserting x = a into Equation (91) and using z ( a ) H ( a ) = 0 yielded ξ ( a ) = 0 . Then, we could apply the RK4 to integrate the above ODEs to obtain:
y ( b ) = z ( b ) H ( b ) = ξ ( b ) p ( b ) .
The algorithm based on the BSFM for solving the SLP with the homogeneous Neumann boundary conditions can be summarized as follows:
(i)
Give C 1 ,   C 2 ,   B 0 ,   t ,   v , the stopping criterion ε , x = ( b a ) / N with N given, and initial guess λ ( 0 ) .
(ii)
For k = 1 ,   2 , , applying the RK4 to integrate the ODEs in Equations (91)–(93) with N steps from x = a to x = b . Take:
y ( b ; λ ( k ) ) = ξ ( b ) p ( b ) ;
employ the FTIM [24] to obtain:
λ ( k + 1 ) = λ ( k ) v t t k y ( b ; λ ( k ) ) ;
and if λ ( k ) renders:
| λ ( k + 1 ) λ ( k ) | < ε ,   or     | y ( b ; λ ( k ) ) | < ε ,    
then we can find an eigenvalue inside an interval; we can then obtain all eigenvalues sequentially by changing the interval and going to (ii).
A more straightforward method to determine λ is to use an FTT. Let λ ( j ) = c + ( j 1 ) ( d c ) / ( M 1 ) , j = 1 , , M run in an interval [ c ,   d ] , including the eigenvalues, from which the zero points inside that interval can be detected from the plot of y ( b ; λ ( k ) ) versus λ [ c ,   d ] . We could tune the interval to a finer one to locate the minimum of:
min j [ 1 ,   M ] | y ( b ; λ ( j ) ) | ,    
until the minimum was smaller than ε .
Suppose one wants to solve the corresponding eigenfunction for an eigenvalue λ obtained. In that case, one can employ the initial values y ( a ) = B 0 and y ( a ) = 0 and integrate Equation (40) with the obtained eigenvalue λ to solve the corresponding eigenfunction.
For the general SLP (4) and (5), the boundary conditions of which were not the Neumann type, we could employ Theorem 1 or Theorem 2 to transform them into Equations (7) and (8) or Equations (19) and (20). Then, after using the above BSFM to determine λ and y ( x ) , we could determine the eigenfunction u ( x ) using Equation (9) or Equation (14).

7.3. Example 4

We tested the BSFM for the eigenfunction in Equation (76), which had the eigenvalues λ k = ( k + 1 ) 2 π 2 ,   k = 0 ,   1 ,   2 , . We applied the BSFM in Section 7.2 to solve this problem with B 0 = 1 or B 0 = 2 , s 20 = 1 ,   C 1 = C 2 = 1 , N = 1000 , and M = 101 . By tuning to finer intervals, we compared the computed eigenvalues to the exact ones for k = 0 ,   1 ,   2 as shown in Table 4. It can be seen that the numerical errors were minimal (on the order of 10 11 to 10 10 ) no matter which value of B 0 = 1 or B 0 = 2 was used.

8. Numerical Examples of the General Sturm–Liouville Problem

For the general SLP, we could either transform it into the Neumann-type SLP as shown in Theorems 1 and 2 or the Dirichlet-type SLP as shown in Theorem 3. Some examples are given below.

8.1. Example 5

The following example was borrowed from Fu et al. [26]:
u ( x ) + 2 e 0 2 ( 1 + e 0 x ) 2 u ( x ) = λ u ( x ) ,     x [ 0 , 1 ] ,
u ( 0 ) + e 0 u ( 0 ) = 0 ,         u ( 1 ) + e 0 1 + e 0 u ( 1 ) = 0 ,
where e 0 is a nonzero parameter. This problem had the eigenvalues λ k = ( k + 1 ) 2 π 2 ,   k = 0 ,   1 ,   2 , , but we did not have closed-form solutions for the eigenfunctions.
In Equations (99) and (100), a = 0 , b = 1 , μ 1 = 1 / e 0 , and μ 2 = 1 + ( 1 / e 0 ) ; hence, condition (6) in Theorem 1 held. Now, according to Theorem 1, the problem (99) and (100) was reduced to:
[ y ( x ) ( x + g 0 ) 2 ] = λ y ( x ) ( x + g 0 ) 2 ,   x [ 0 , 1 ] ,
y ( 0 ) = 0 ,         y ( 1 ) = 0 ,
where g 0 = 1 / e 0 and y ( x ) = ( x + g 0 ) u ( x ) .
Then, we could apply the BSFM in Section 7.2 to solve this problem with e 0 = g 0 = 1 ,   B 0 = 1 , s 20 = 1 , C 1 = C 2 = 1 , and N = 500 . Figure 5a shows a plot of the eigenvalue curve of y ( b ) versus λ in an interval [1, 1000] as a solid line, from which we can see that there were 10 zero points that corresponded to the first 10 eigenvalues λ k = ( k + 1 ) 2 π 2 , k = 0 ,   1 , 2 , ,   9 .
By using the FTT and the FTIM, we compared the calculated eigenvalues to the exact ones for k = 0 ,   1 , ,   4 in Table 5. It can be seen that the numerical errors were minimal—on the order of 10 11 to 10 10 when using the FTT and 10 11 to 10 7 when using the FTIM.
By tuning to finer intervals when using the FTT and applying the BSFM with B 0 = 1 or B 0 = 2 , s 20 = 1 , C 1 = C 2 = 1 , N = 1000 , and M = 101 , we could sequentially obtain the required eigenvalues; the calculated eigenfunctions for k = 0 ,   1 ,   5 are shown in Figure 5b as solid lines. It can be seen that the numerical errors were minimal (on the order of 10 11 to 10 8 to satisfy the right boundary condition u ( x ) + u ( 1 ) e 0 / ( 1 + e 0 ) = 0 , where we took e 0 = 1 .

8.2. Example 6

At this moment, we solved the general SLP (1) and (2) by using Theorem 2 and the BSFM in Section 7.2. To test the accuracy, we considered:
u ( x ) = λ u ( x ) ,     x [ 0 , 1 ] ,
u ( 0 ) + μ 1 u ( 0 ) = 0 ,         u ( 1 ) + μ 2 u ( 1 ) = 0 ,
where λ k ,   k = 0 ,   1 ,   2 , were solved using μ 1 μ 2 λ 2 sin λ + ( μ 2 μ 1 ) λ cos λ + sin λ = 0 ; while the eigenfunctions were given by u k = μ 1 λ k cos ( λ k x ) sin ( λ k x ) .
For Example 5, we showed that using the FTT was more accurate than using the FTIM. We used the FTT to adjust the eigenvalues for the following examples. We applied the BSFM in Section 7.2 to solve this problem with μ 1 = 1 or μ 2 = 2 , s 20 = 1 , C 1 = C 2 = 1 , N = 1000 , and M = 101 . By tuning to finer intervals using the FTT, we compared the calculated eigenvalues to the exact ones for k = 0 ,   2 ,   4 in Table 6. It can be seen that the numerical errors were very small, on the order of 10 11 to 10 10 .

8.3. Example 7

We considered Example 5 again; however, we used a different right boundary condition:
u ( x ) + 2 ( x + 1 ) 2 u ( x ) = λ u ( x ) ,     x [ 0 , 1 ] ,
u ( 0 ) + μ 1 u ( 0 ) = 0 ,         u ( 1 ) + 2 u ( 1 ) = 0 .
We employed Theorem 2 and applied the BSFM in Section 7.2 to solve this problem with B 0 = 1 , s 20 = 1 , C 1 = C 2 = 1 , N = 500 , and M = 2001 . Figure 5a shows a plot of the eigenvalue curve of y ( b ) versus λ by the dashed line in an interval [ 1 ,   1000 ] , from which we can see that there were 10 zero points that were close to the first 10 eigenvalues of Example 5. However, there were a few differences as shown in Table 5. The numerical errors of the eigenvalues were adjusted to be less than 10 6 .
By tuning to finer intervals using the FTT and applying the BSFM in Section 7.2 with B 0 = 1 , C 1 = C 2 = 1 , ε = 10 8 , and N = 1000 , we could sequentially solve for the required eigenvalues; the calculated eigenfunctions for k = 1 ,   3 ,   5 are shown by the dashed lines in Figure 5b. The right boundary condition u ( 1 ) 2 u ( 1 ) = 0 could be satisfied very well, as shown in Table 7.

8.4. Example 8

Now, we solved the general SLP (1) and (2) by using Theorem 3 and the BSFM in Section 5. We tested the following problem given in Example 5:
u ( x ) + 2 ( x + g 0 ) 2 u ( x ) = λ u ( x ) ,     x [ 0 , 1 ] ,
u ( 0 ) + μ 1 u ( 0 ) = 0 ,         u ( 1 ) + μ 2 u ( 1 ) = 0 ,
where μ 1 = g 0 and μ 2 = 1 + g 0 . This problem had the eigenvalues λ k = ( k + 1 ) 2 π 2 , k = 0 ,   1 ,   2 , .
We applied the present BSFM based on Theorem 3 to solve this problem with g 0 = 1 , A 0 = 1 , C 1 = C 2 = 1 , N = 1000 , and M = 101 . By tuning to finer intervals using the FTT, the calculated eigenvalues were compared with the exact ones for λ k = ( k + 1 ) 2 π 2 , k = 0 ,   1 ,   2 , ,   4 in Table 8. As shown in the table, the numerical errors were on the order of 10 13 to 10 9 .
Remark 3. 
The Liouville transformation [26]:
v ( t ) = g ( x ) u ( x ) ,           g ( x ) = [ ω ( x ) p ( x ) ] 1 / 4 ,
t = 1 c a x ( r ( τ ) p ( τ ) ) 1 / 2 d τ ,       c = a b ( r ( τ ) p ( τ ) ) 1 / 2 d τ ,
can transform Equations (1) and (2) to the following canonical form:
v ¨ ( t ) + Q ( t ) v ( t ) = μ v ( t ) ,     t [ 0 , 1 ] ,
h v ( 0 ) v ˙ ( 0 ) = 0 ,           H v ( 1 ) + v ˙ ( 1 ) = 0 ,
where:
Q ( t ) = c 2 q ( x ) g ( x ) [ p ( x ) g ( x ) ] ω ( x ) g ( x ) ,         μ = c 2 λ
h = c g ( a ) [ h g ( a ) p ( a ) g ( a ) ] ,   H = c g ( b ) [ H g ( b ) p ( b ) g ( b ) ] .
The original SLP became a new SLP in the unit interval with the same eigenvalues multiplied by a constant factor  c 2  and only the potential function  Q ( t )  was required.
Upon comparing the transform in Equation (109) to that in Equation (14), we could observe the similarity. However, F ( x ) was an explicit quadratic or cubic function of x ; all the coefficient functions were given explicitly in Equation (19). Moreover, the boundary conditions were more accessible to treat than Equation (112). One major drawback of Equation (111) was that the coefficient function Q ( t ) was an implicit function of t , which could be known only after inverting the relation in Equation (110) to obtain the function x = x ( t ) and then inserting it into Equation (113).
Both the transformations in Equations (14) and (109) were congruent, which maintained the linearity in the eigenvalue λ or μ . On the other hand, the transform (25) in Theorem 3 was not a congruent one, where the coefficient function D ( x , λ ) is a linear function of λ and Q ( x , λ ) is a nonlinear function of λ . Nevertheless, from the aspect of the numerical method, the Dirichlet boundary conditions in Equation (24) were more uncomplicated and were easier to treat than the boundary conditions (20) and (112).
The SLP is very important in partial differential equations, vibrations in continuum mechanics, and heat conduction problems. We applied the Sturm–Liouville theory to solve the longitudinal wave motion problem when the Young’s modulus E was fixed with the cross section area A ( x ) = 1 + x of a tapered rod, a constant density ρ of mass, and the axial displacement y ( x , t ) :
1 A ( x ) x ( E A ( x ) y ( x , t ) x ) = ρ 2 y ( x , t ) t 2 .
Let y ( x , t ) = e i ω t u ( x ) with ω as a natural vibration frequency; Equation (116) then reduces to Equation (4) with:
p ( x ) = E A ( x ) ,   q ( x ) = 0 ,   ω ( x ) = ρ A ( x ) ,   λ = ω 2 .
We fixed the length of the rod be a unit and took E / ρ = 100.
In the design of engineering structures, knowing first few frequencies ω is of utmost importance. Figure 6 shows a plot of u ( 1 ) versus λ in a range of λ [ 0 , 4000 ] , where two intersecting points appeared. Then, by tuning to finer intervals, we could obtain λ 0 = 975.3318666643578 and λ 1 = 3935.600370373466 .

9. Conclusions

For the SLPs with the Sturm–Liouville boundary conditions, we derived two novel transformations that could transform them into two canonical forms with either the Dirichlet boundary conditions or the Neumann boundary conditions. These two canonical forms appeared in the literature at the same time. Numerically, these two simpler forms were more easily treated than the original Sturm–Liouville-type boundary conditions. The major novelty of the paper was that we employed the shape function to transform the Sturm–Liouville boundary value problem to the corresponding initial value problem for the new variable with terminal values that could be determined explicitly by using the Neumann-type normalization condition for the Dirichlet canonical form and the Dirichlet-type normalization condition for the Neumann canonical form. Based on these novel ingredients in the BSFM, we could solve the Sturm–Liouville problems easily and directly. In the BSFM, the only unknown constant was the eigenvalue, which was determined by solving the derived algebraic equation with a finer tuning technique or by using the fictitious time integration method. Eight numerical examples confirmed the high performance of the new BSFM algorithm based on methods with high accuracy for the obtained eigenvalues and eigenfunctions. As compared to the conventional shooting method, we did not need to guess the missing initial value. The advantages of the presented two novel transformations were explored when we compared them to the Liouville transform. Future works can focus on extending the BSFM to solve generalized Sturm–Liouville problems and periodic Sturm–Liouville problems in terms of nonlinear problems.

Author Contributions

C.-S.L. contributed to the conception and writing of the work (conceptualization, methodology, writing—original draft), collected and analyzed the data, and interpreted the results. J.-R.C. contributed to the design of the work (resources, software). J.-H.S. contributed to the writing and supervision of the work (writing—review, project administration). Y.-W.C. contributed to the writing, design, and validation of the work (writing—editing and validating and visualizing the data) and the funding acquisition. All authors have read and agreed to the published version of the manuscript.

Funding

The corresponding authors would like to thank the Ministry of Science and Technology, Taiwan, for their financial support (grant number: MOST 111-2221-E-019-048).

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Kumar, S.; Kumar, R.; Mosman, M.S.; Samet, B. A wavelet based numerical scheme for fractional order SEIR epidemic of measles by using Genocchi polynomials. Numer. Methods Partial Differ. Equ. 2021, 37, 1250–1268. [Google Scholar] [CrossRef]
  2. Wang, K.L. A novel perspective to the local fractional Zakharov–Kuznetsov-modified equal width dynamical model on Cantor sets. Math. Methods Appl. Sci. 2022, 2022, 1–9. [Google Scholar] [CrossRef]
  3. Wang, K.L. A novel variational approach to fractal Swift–Hohenberg model arising in fluid dynamics. Fractals 2022, 2250156. [Google Scholar] [CrossRef]
  4. Ain, Q.T.; Sathiyaraj, T.; Karim, S.; Nadeem, M.; Mwanakatwe, P.K. ABC fractional derivative for the alcohol drinking model using two-scale fractal dimension. Complexity 2022, 2022, 8531858. [Google Scholar] [CrossRef]
  5. Çelik, İ. Approximate calculation of eigenvalues with the method of weighted residuals–collocation method. Appl. Math. Comput. 2005, 160, 401–410. [Google Scholar] [CrossRef]
  6. Çelik, İ. Approximate computation of eigenvalues with Chebyshev collocation method. Appl. Math. Comput. 2005, 168, 125–134. [Google Scholar] [CrossRef]
  7. Çelik, İ.; Gokmen, G. Approximate solution of periodic Sturm–Liouville problems with Chebyshev collocation method. Appl. Math. Comput. 2005, 170, 285–295. [Google Scholar] [CrossRef]
  8. Ghelardoni, P.; Gheri, G.; Marletta, M. Spectral corrections for Sturm–Liouville problems. J. Comput. Appl. Math. 2001, 132, 443–459. [Google Scholar] [CrossRef]
  9. Vanden Berghe, G.; Van Daele, M. Exponentially-fitted Numerov methods. J. Comput. Appl. Math. 2007, 200, 140–153. [Google Scholar] [CrossRef] [Green Version]
  10. Yücel, U. Approximations of Sturm–Liouville eigenvalues using differential quadrature (DQ) method. J. Comput. Appl. Math. 2006, 192, 310–319. [Google Scholar] [CrossRef]
  11. El-Gamel, M.; Abd El-hady, M. Two very accurate and efficient methods for computing eigenvalues of Sturm–Liouville problems. Appl. Math. Model. 2013, 37, 5039–5046. [Google Scholar] [CrossRef]
  12. Alquran, M.T.; Al-Khaled, K. Approximations of Sturm-Liouville eigenvalues using sinc-Galerkin and differential transform methods. Appl. Appl. Math. 2010, 5, 128–147. [Google Scholar]
  13. Attili, B.S. The Adomian decomposition method for computing eigenelements of Sturm–Liouville two point boundary vateraturelue problems. Appl. Math. Comput. 2005, 168, 1306–1316. [Google Scholar] [CrossRef]
  14. Abbasbandy, S.; Shirzadi, A. A new application of the homotopy analysis method: Solving the Sturm–Liouville problems. Commun. Commun. Nonlinear Sci. Numer. Simul. 2011, 16, 112–126. [Google Scholar] [CrossRef]
  15. Altıntan, D.; Uğur, Ö.M.Ü.R. Variational iteration method for Sturm–Liouville differential equations. Comput. Math. Appl. 2009, 58, 322–328. [Google Scholar] [CrossRef] [Green Version]
  16. Ghelardoni, P.; Gheri, G. Improved shooting technique for numerical computations of eigenvalues in Sturm-Liouville problems. Nonlinear Anal. 2001, 47, 885–896. [Google Scholar] [CrossRef]
  17. Liu, C.S. A Lie-group shooting method for computing eigenvalues and eigenfunctions of Sturm-Liouville problems. CMES-Comp. Model. Eng. Sci. 2008, 26, 157–168. [Google Scholar]
  18. Liu, C.S. The Lie-group shooting method for computing the generalized Sturm-Liouville problems. CMES-Comp. Model. Eng. Sci. 2010, 56, 85–112. [Google Scholar]
  19. Aceto, L.; Ghelardoni, P.; Magherini, C. Boundary Value Methods as an extension of Numerov’s method for Sturm–Liouville eigenvalue estimates. Appl. Numer. Math. 2009, 59, 1644–1656. [Google Scholar] [CrossRef]
  20. Aceto, L.; Ghelardoni, P.; Magherini, C. BVMs for Sturm-Liouville eigenvalue estimates with general boundary conditions. J. Numer. Anal. Ind. Appl. Math. 2009, 4, 113–127. [Google Scholar]
  21. Amodio, P.; Settanni, G. Variable-step finite difference schemes for the solution of Sturm–Liouville problems. Commun. Nonlinear Sci. Numer. Simul. 2015, 20, 641–649. [Google Scholar] [CrossRef] [Green Version]
  22. Liu, C.S.; Chang, J.R. The periods and periodic solutions of nonlinear jerk equations solved by an iterative algorithm based on a shape function method. Appl. Math. Lett. 2020, 102, 106151. [Google Scholar] [CrossRef]
  23. Niessen, H.D.; Zettl, A. Singular Sturm-Liouville problems: The Friedrichs extension and comparison of eigenvalues. Proc. Lond. Math. Soc. 1992, 3, 545–578. [Google Scholar] [CrossRef]
  24. Liu, C.S.; Atluri, S.N. A novel time integration method for solving a large system of non-linear algebraic equations. CMES-Comp. Model. Eng. Sci. 2008, 31, 71–83. [Google Scholar]
  25. Eggert, N.; Jarratt, M.; Lund, J. Sinc function computation of the eigenvalues of Sturm-Liouville problems. J. Comput. Phys. 1987, 69, 209–229. [Google Scholar] [CrossRef]
  26. Fu, S.Z.; Wang, Z.; Wei, G.S. Sturm-Liouville Problem and Its Inverse Problem; Science Press: Beijing, China, 2015. (In Chinese) [Google Scholar]
Figure 1. Plotting the eigenvalue curves for (a) Example 1 and (b) Example 2.
Figure 1. Plotting the eigenvalue curves for (a) Example 1 and (b) Example 2.
Mathematics 10 03689 g001aMathematics 10 03689 g001b
Figure 2. Numerical solutions of the eigenfunctions for Example 1.
Figure 2. Numerical solutions of the eigenfunctions for Example 1.
Mathematics 10 03689 g002
Figure 3. The errors of numerical solutions of the eigenfunctions for Example 1.
Figure 3. The errors of numerical solutions of the eigenfunctions for Example 1.
Mathematics 10 03689 g003
Figure 4. Numerical solutions of the eigenfunctions for Example 2.
Figure 4. Numerical solutions of the eigenfunctions for Example 2.
Mathematics 10 03689 g004
Figure 5. (a) Plots of the eigenvalue curves for Examples 5 and 7; (b) numerical solutions for the eigenfunctions. Example 5 is shown by solid lines and Example 7 by dashed lines.
Figure 5. (a) Plots of the eigenvalue curves for Examples 5 and 7; (b) numerical solutions for the eigenfunctions. Example 5 is shown by solid lines and Example 7 by dashed lines.
Mathematics 10 03689 g005
Figure 6. Plotting the eigenvalue curve for a practical example of a longitudinal wave motion of a tapered rod.
Figure 6. Plotting the eigenvalue curve for a practical example of a longitudinal wave motion of a tapered rod.
Mathematics 10 03689 g006
Table 1. Comparison of the eigenvalues for Example 1 with those calculated via Equation (40) using the initial conditions and with the present results and the exact ones.
Table 1. Comparison of the eigenvalues for Example 1 with those calculated via Equation (40) using the initial conditions and with the present results and the exact ones.
kExactFTTFTIM C 0 = 1 C 0 = 2
09.869604401099.869604401009.8696044011117.350028.1800
139.478417604439.478417604539.478417606341.670047.9400
288.826439609888.826439609988.826439611396.2950-
Table 2. Comparison of the eigenvalues for Example 2 with those in the previous literature.
Table 2. Comparison of the eigenvalues for Example 2 with those in the previous literature.
kGhelardoni et al. [8]Liu [17] Present   λ k
04.89666938004.896669379984.89666937997
432.26370704632.26370704580632.263707047588
9107.11667614107.11667613843107.11667624055
19407.06523527407.06523527773407.06524176228
29907.05546058907.055460696755907.05553449719
Table 3. Comparing the eigenvalues for Example 3 with those of Eggert et al. [25].
Table 3. Comparing the eigenvalues for Example 3 with those of Eggert et al. [25].
kEggert et al. [25]Present
01.242421.242428826
14.494794.494793080
29.503669.503664886
316.5020816.50208201
Table 4. Comparing the eigenvalues for Example 4 with the present BSFM using B0 = 1 and B0 = 2 to the exact ones.
Table 4. Comparing the eigenvalues for Example 4 with the present BSFM using B0 = 1 and B0 = 2 to the exact ones.
kExactB0 = 1B0 = 2
09.86960440119.86960440109.8696044010
139.478417604439.478417604539.4784176045
288.826439609888.826439609988.8264396099
Table 5. Comparing the eigenvalues for Example 5 with the present BSFM using B0 = 1 to the exact ones.
Table 5. Comparing the eigenvalues for Example 5 with the present BSFM using B0 = 1 to the exact ones.
kExactExample 5 (FTT)Example 5 (FTIM)
09.869604401099.86960440109.86960440111
139.478417604439.478417604539.4784176054
288.826439609888.826439609988.8264396218
3157.91367041743157.91367041750157.91367048410
4246.7401100272246.7401100273246.7401102801
Table 6. Comparing the eigenvalues for Example 6 with the present BSFM to the exact ones and showing the errors.
Table 6. Comparing the eigenvalues for Example 6 with the present BSFM to the exact ones and showing the errors.
kExactPresentError
04.713362489214.71336248930 8.87 × 10 11
214.1400874676314.14008746760 3.41 × 10 11
423.5668124460623.56681244630 2.43 × 10 10
Table 7. The eigenvalues for Example 7 with the present BSFM using B0 = 1 and the right-boundary errors.
Table 7. The eigenvalues for Example 7 with the present BSFM using B0 = 1 and the right-boundary errors.
kEigenvalueRight-Boundary Error
08.16809482500 2.09 × 10 11
137.9976982069 1.73 × 10 11
287.3754317150 1.47 × 10 11
3156.472399123 2.65 × 10 11
4245.303242649 9.46 × 10 12
Table 8. Comparing the eigenvalues for Example 8 with the present BSFM to the exact ones.
Table 8. Comparing the eigenvalues for Example 8 with the present BSFM to the exact ones.
kExactPresentRelative Error
0 π 2 9.869604401 3.173 × 10 11
1 4 π 2 39.47841762 4.4096 × 10 10
2 9 π 2 88.82643980 2.163 × 10 9
3 16 π 2 157.9136704 1.267 × 10 11
4 25 π 2 246.74011002 1.377 × 10 13
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Liu, C.-S.; Chang, J.-R.; Shen, J.-H.; Chen, Y.-W. A Boundary Shape Function Method for Computing Eigenvalues and Eigenfunctions of Sturm–Liouville Problems. Mathematics 2022, 10, 3689. https://doi.org/10.3390/math10193689

AMA Style

Liu C-S, Chang J-R, Shen J-H, Chen Y-W. A Boundary Shape Function Method for Computing Eigenvalues and Eigenfunctions of Sturm–Liouville Problems. Mathematics. 2022; 10(19):3689. https://doi.org/10.3390/math10193689

Chicago/Turabian Style

Liu, Chein-Shan, Jiang-Ren Chang, Jian-Hung Shen, and Yung-Wei Chen. 2022. "A Boundary Shape Function Method for Computing Eigenvalues and Eigenfunctions of Sturm–Liouville Problems" Mathematics 10, no. 19: 3689. https://doi.org/10.3390/math10193689

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop