Abstract
Differential matrix models provide an elementary blueprint for the adequate and efficient treatment of many important applications in science and engineering. In the present work, we suggest a procedure, extending our previous research results, to represent the solutions of nonlinear matrix differential problems of fourth order given in the form in terms of higher-order matrix splines. The corresponding algorithm is explained, and some numerical examples for the illustration of the method are included.
MSC:
65D07; 65F45; 65Y04; 34L99
1. Introduction
Scalar spline methods have a long and successful tradition for obtaining smooth approximations for solutions of a wide range of applications in engineering, mathematics, data and computer science [1,2]. On the other hand, reformulating an engineering problem in terms of matrix-valued physical quantities nowadays is a common approach, leading to a compact description of the problem and allowing for more efficient computations. Thus, combining spline methods with matrix models is a logical path to follow.
In the present work, we elaborate a spline method for the approximation of a special class of fourth-order matrix differential equations which take the form
where is a complex matrix—not necessarily a square matrix—depending on the real parameter x, with the initial conditions , and . Note that in Equation (1) the first, second, and third derivatives of matrix Y do not appear explicitly. In particular, this type of fourth-order problem can be found in diverse fields of the applied sciences and engineering, e.g., beam theory [3,4], fluid dynamics [5], neural networks [6], and electric circuits [7]. In practice, for ordinary differential equations, it is customary to convert fourth-order equations to a system of first-order equations, so that standard numerical methods and software can be used. However, with the increase in the number of equations, this technique inevitably also produces an increase in computational cost and numerical instabilities.
Given this hindsight, direct integration methods (without increasing the dimensionality of a problem) have attracted considerable attention in recent years. Several authors that have solved higher-order problems of scalar type have, therefore, used direct methods which have demonstrated exquisite features in accuracy and speed, see Refs. [8,9,10,11,12] and references therein.
The aim of this paper is to generalize the proposed method for problems given in Refs. [13,14] by developing an extended algorithm to deal with nonlinear matrix differential equations of the fourth order and of type Equation (1), thereby broadening the approach and allowing to tackle a wider class of significant applications. Apart from allowing significantly new applications of interest, we stress that it is not evident that our previous approach will work for nonlinear fourth-order matrix problems, therefore, requiring a detailed error analysis with adequate test examples and carrying out the necessary benchmarking, which we will pursue in this work.
Throughout the work, we will take up the notation for matrix splines and norms as previously used [15,16], which is frequently employed in matrix calculus. Adopting this nomenclature, we recall that for a rectangular matrix, , its 2-norm is expressed as
where for a vector , the Euclidean norm is . Similarly, the 1-norm is defined by .
The Kronecker product of and is a block matrix given by
The column-vector operator, , acting on matrix , yields
Here and in the remainder of the text, we use bold-face letters for vectors and vector-valued functions.
Given and , the derivative of matrix Y with respect to matrix X is defined by [17] (pp. 62, 81):
If , and , then the following rule for the derivative of a matrix product with respect to another matrix applies [17] (p. 84):
where and denote the identity matrices of dimensions q and p, respectively. For the above matrices, X, Y, and Z, the following chain rule [17] (p. 88) is valid:
After this brief introduction, Section 2 gives a description of the proposed method outlining its algorithmic details. Section 3 provides programs in MATLAB [18] for solving the target equation. Section 4 then continues the discussion by implementing numerical examples for the scalar, vector, and matrix cases. Lastly, Section 5 summarizes the obtained results.
2. Description of the Method
Let us consider the following fourth-order matrix problem
where the unknown matrix is with initial conditions . The matrix-valued function is of the differentiability class , , with
In order to ensure the existence and uniqueness of the continuously differentiable solution for problem (4), let function f fulfill the global Lipschitz’s condition with constant , such that [19] (p. 99)
Next, the partition of the interval shall be given by
where , and the corresponding stepsize is . For the individual subintervals , we will construct matrix spline of order , where . The order of the differentiability for function f is denoted by s. The approximated spline solution for problem (4) will then be .
For the first interval , we assume that the matrix spline takes the form
where is an unknown matrix parameter still to be computed. It is straightforward to verify that
and
Therefore, the spline for the subinterval will satisfy the differential equation, Equation (4), at by construction.
In order to fully determine the matrix spline of Equation (8), we still require the values of , and of . First, to determine the fifth-order derivative , one follows the method described in Ref. [16], adopting the notation already summarized in the introduction. Accordingly, we obtain
where . Subsequently, by using Equation (9), we are able to evaluate
Similarly, next we may suppose that for . Thus, the second partial derivatives of f exist and are continuous. Now, one obtains the sixth derivative for matrix according to
Evaluating Equation (10) at , we conclude . For all higher-order derivatives , we proceed in a similar manner and calculate
An exhaustive list of all symbolic derivatives may easily be established by employing standard computer algebra systems. Substituting again in Equation (11), one accomplishes . Therefore, as yet, all essential matrix parameters of the spline are known, except for parameter . Finally, to determine , we suppose that Equation (8) will be a solution of problem (4) at , which entails
Then, we obtain from Equation (12) the implicit matrix equation with only one unknown :
Assuming that the implicit matrix equation, Equation (13), has a unique solution , matrix spline (8) is now completely determined within subinterval .
For the subsequent interval , the matrix spline may be expressed as
Here, the expressions
and are the analogous results obtained after evaluating the respective derivatives of using in Equations (9)–(11). We may put this in a more compact form:
Observe that the matrix spline , defined by Equations (8) and (14), is of differentiability class . Again, by construction, the spline of the form given in Equation (14) satisfies the differential equation, Equation (4), at point . In Equation (14), all coefficients are known except for .
The exact value of may be determined by considering the spline provided in Equation (14) as being a solution at point of the problem, viz. Equation (4):
Expanding the last expression produces a matrix equation for :
Let us assume that the matrix equation, Equation (17), has the unique solution . This way, the matrix spline now is completely known for the interval .
By repeating this procedure, we can establish the matrix–spline
approximation for the subinterval . Then, in the following interval , we define the corresponding matrix spline as
where
and similarly, we may find
For this definition, the matrix spline satisfies the differential equation, Equation (4), at point . Additionally, we require that also is a solution of problem (4) at point , such that
An expansion of this expression produces
Observe that the final result in Equation (21) relates directly to Equations (13) and (17), when setting and .
By using a fixed-point argument, we will now demonstrate that Equation (21) will have unique solutions for . For fixed values of h and k, the matrix function is
If , i.e., is a fixed point for function , then Equation (21) is satisfied. Using the global Lipschitz’s condition for f, Equation (6), and the previous definition for g, Equation (22), now implies immediately:
Choosing , the matrix function g is contractive. Therefore, Equation (21) has unique solutions for , and the matrix spline is finally computed. Summing up, the following theorem has been demonstrated:
Theorem 1.
Consider the fourth-order matrix differential system given by Equation (4), and let be the corresponding Lipschitz constant defined by Equation (6). Further, let us take the partition over the interval , following Equation (7) and having stepsize
Then, as shown by the previous procedure, the matrix spline of order m, with , exists in each subinterval , , and is of class .
Loscalzo and Talbot demonstrated that in the scalar case, the global error of the splines is of , see Ref. [20]. Note that an analogous analysis applies for the present matrix–spline case.
3. MATLAB Program
Consider the following fourth-order ordinary differential equation for a matrix :
where h is the stepsize, such that . Further, , , , and are the matrices Y, , , and calculated in the previous step at . Denoting by the spline of order m in the subinterval , we have
where still must be computed.
Then, the matrix can be determined by using the following fixed-point iteration:
Hence, the approximated values for Y, , and at can be computed by substituting into Equations (24)–(27).
Figure 1 lists the MATLAB code for approximately computing the solution matrices , , , and of the fourth-order ordinary differential equation given in Equation (4). This code uses the cell-array data type for storing sets of matrices. In line 36, the values for , are obtained and stored in the cell-array variable Ym by invoking the f MATLAB function to return the matrices which appear in the expressions given by Equations (24)–(28). In lines 37–42, the expressions , , , , and from Equations (24)–(28) are computed. In lines 45–52, the matrix is worked out by using fixed-point iteration. Finally, in lines 53–55, the matrices , , , and are computed.
Figure 1.
MATLAB code for computing approximate solutions of the problem in Equation (4) by means of m-th order splines.
The memory requirements for this function are matrices, i.e., m matrices for the cell-array variable ym, five matrices for the cell array variable , three matrices for the variables Ak, Ak1, and Skm, furthermore, four matrices for the cell-array variable y.
Figure 2 reproduces the MATLAB code of the function create_problem, which automatically generates an output file, such as the one shown in Figure 3, containing all symbolical derivatives required for the main program, viz. Figure 1. The symbolical results in this file are then readily accessible as a function for computing the spline approximation with function spline4order. Note that for the computer algebra, the MATLAB interface to MuPAD is called [21,22]. All the essential codes, including future developments, will be made available for public use [23].
Figure 2.
MATLAB function create_problem for automatically generating all symbolical derivatives required by the main code in Figure 1.
4. Numerical Examples
4.1. A Scalar Test Problem
As a starting point, we consider the problem of type Equation (4) for with , and apply our proposed method to the following scalar problem:
This is a simple test problem and is recognized as an ideal benchmark test in the literature [9]. Its exact solution is known as .
Since , we have a Lipschitz constant given by . For splines of the seventh order (), according to Theorem 1, we have and take partitions with stepsize . Computer algebra systems are most suitable to algebraically solve the equations arising from the algorithm. In this case, we employ Mathematica. All analytical results for the approximate splines are recorded in Table 1.
Table 1.
Spline approximations for the scalar problem given in Equation (30).
In Table 2, we specify the difference between the estimates of our numerical approach and the exact solution. The maximums of these errors are indicated for each subinterval. Obviously, the error for each subinterval is lower than the predicted global error of , but each local error is necessarily increasing while iterating from the first to the last subinterval.
Table 2.
Approximation errors for the scalar problem given in Equation (30).
4.2. A Nonlinear Scalar Test Problem
This problem appears in Refs. [24] (p. 1003), [25], although for different intervals of the form :
Its exact solution is .
Note that for this particular test problem, the usage example in Figure 2 shows how to automatically produce the corresponding derivatives in the form of a MATLAB function f.m as required by the function spline4order. The output is shown in Figure 3. Afterwards, the execution of the usage example in Figure 1 computes all spline approximations for this test.
Figure 4 displays four graphics for the relative errors at , taking as stepsizes , , and , by also varying spline order m. In general, the error committed decreases by increasing the spline order. Similarly, the error generally reduces as we decrease the stepsize. However, for , the error acquired for is less than the error for . This is due to the increase in the number of floating point operations. Table 3 lists the corresponding relative errors.
Figure 4.
Relative errors at for the problem given in Equation (31), for several stepsizes (), and varying spline orders ().
Table 3.
Relative errors at for the problem given in Equation (31) with varying spline orders m and stepsizes h.
Figure 5 provides five graphics with the relative errors for spline orders , and 9, varying the final point of the interval (, and 5). A fixed stepsize is considered. Obviously, the error increases as the value b grows. Similarly, the error improves when the stepsize decreases. Clearly, the highest precision is obtained for .
Figure 5.
Relative errors for the problem given in Equation (31), for several spline orders (). We discretely vary the value for , and 5, with a fixed stepsize .
4.3. A Matrix Differential Equation
The next example focuses on a type of matrix problem involving complex square matrices , satisfying the general differential equation
where and are continuous -valued functions on an interval . Later on, we will choose these functions to be compatible with Equation (4).
In agreement with Ref. [26], we introduce the concept of a fundamental set of solutions for Equation (32). Its definition is as follows:
Definition 1.
The following result provides a useful characterization of a fundamental set of solutions for Equation (32), and it may be regarded as a matrix analogue of Liouville’s formula for the scalar case [26].
Lemma 1.
Let be a set of solutions of Equation (32) defined on the interval J of the real line, and let be the block matrix function
Then, the set is a fundamental set solutions of Equation (34) on J if there exists a point , such that is non-singular in . In this case, is non-singular for all .
Proof of Lemma 1.
Since are solutions of Equation (32), it follows that defined by Equation (34) satisfies
where I denotes the identity matrix of . Thus, if is the transition-state matrix of Equation (35), such that , see [27] (p. 598), it follows that for all . Hence, the result is established because is invertible for all . □
Returning to our specific matrix problem at hand, we consider for our test case an invertible matrix and the differential equation
where . This equation is a special case of Equation (32) with and . Thus, all coefficients are continuous -valued functions on interval . For the solutions, it is easy to check that the matrix functions
satisfy Equation (36). To show that this set is also a fundamental set of solutions of Equation (36), we will use Lemma 1. In this case, one obtains
and still needs to confirm that is non-singular for some value . To show this, we consider and the matrix block such that
where I denotes the identity matrix of , and whose determinant is exactly . It is straightforward to verify that
where the block matrices N and S are invertible, with results
Next, taking the determinants on both sides of Equation (37), one concludes that , and thus, is non-singular by Lemma 1. Furthermore, the set
is a fundamental set of solutions for Equation (36).
To carry out the numerics, we now select the initial value problem
which has the unique and exact solution . We choose . Thus, the exact solution of Equation (38) is . In this case, in Equation (4), and the corresponding Lipschitz constant is .
For our example, we consider splines of the seventh order (). Then, according to Theorem 1, we obtain the condition . Therefore, we choose partitions with stepsize .
Table 4 shows the maximum of the difference between the numerical estimates of our approach and the exact solution by taking the Fröbenius norm of this difference for each subinterval. Figure 6 analyzes the relative errors for this problem with varying stepsizes , and . As can be seen, the spline approximation considerably improves with smaller stepsizes. Apparently, the relative errors accumulate with each new subinterval as it of course propagates from one to the next subinterval. However, the approximations are well below the expected global error of for . For , the local error also remains nearly of the order . However, for and working in practice with double-precision arithmetic (), the truncation and rounding errors lastly determine the error margins. Nevertheless, the observed error of approximately is fully satisfactory in almost all relevant applications.
Table 4.
Approximation error for the matrix problem presented in Equation (36), with stepsize .
Figure 6.
Relative errors for the matrix problem given in Equation (36), with seventh-order splines () and various stepsizes (, and ).
4.4. A Nonlinear Matrix Problem
The following problem is similar to the Problem 4.7 from Ref. [14], but now applied to a fourth-order equation:
where , and are the null, the identity, and all-ones matrices of dimension n, respectively.
We have used the vpa function from the MATLAB Symbolic Math Toolbox for obtaining the “exact solution” with 256 digits of precision. All computations have IEEE double-precision arithmetic with unit round-off . The “exact” solution is obtained whenever two consecutive spline orders (for fixed stepsize) present a relative error lower than the unit round-off for this accuracy.
Figure 7 shows four graphics of the relative errors at corresponding to the stepsizes , , and , varying spline order m. As we can see, in general, the error committed becomes smaller and smaller with the increasing spline order. Similarly, the error gets smaller as we decrease the stepsize. However, for , the error made for is less than the error made for . Again, this is due to the resulting increase in the number of arithmetic operations. Table 5 gives the relative errors.
Figure 7.
Relative errors at for the problem given in Equation (39), for various stepsizes (, and ), varying the spline orders.
Table 5.
Relative errors at for the problem given in Equation (39), for various stepsizes (, and ), varying the spline orders.
The five graphics of Figure 8 correspond to the relative errors for the spline orders , , , and , varying the final points (), for a fixed stepsize . As can be seen, the error increases when the value of b grows. Similarly, the error drops as we decrease the stepsize. The most accurate results are obtained when .
Figure 8.
Relative errors for the problem given in Equation (39), for various spline orders (), varying and with a fixed stepsize .
5. Conclusions
This work describes a numerical procedure for solving fourth-order matrix differential equations of the type , where is a complex matrix—not necessarily a square matrix—and x is the parameter ranging over a real interval. In an iterative procedure, step by step, the solutions for all successive subintervals of the full interval are approximated in terms of matrix splines. This algorithm is straightforward to implement on a computer, consisting of the symbolical computation for the necessary derivatives and the subsequent numerical evaluation. The MATLAB code will be available to download [23].
Four standard benchmark tests, two scalar and two matrix cases, demonstrate that our numerical scheme produces spline approximations with suitable accuracy and is easy to implement. Moreover, with an appropriately chosen stepsize—provided by the theory and well adapted to the problem—an ever increasing improvement of the accuracy of the approximation can be reached up to the very limits of machine precision.
Author Contributions
Conceptualization, E.D., J.I, M.M.T., J.M.A. and J.R.-H.; methodology, E.D., J.I., M.M.T., J.M.A. and J.R.-H.; software, J.I. and J.M.A.; validation, E.D., J.I., M.M.T., J.M.A. and J.R.-H.; formal analysis, E.D.; writing—original draft preparation, M.M.T. and E.D.; writing—review and editing, M.M.T.; visualization, M.M.T. and J.I.; supervision, E.D.; project administration, J.M.A.; funding acquisition, J.M.A. All authors have read and agreed to the published version of the manuscript.
Funding
This research was supported by the Vicerrectorado de Investigación de la Universitat Politècnica de València (PAID-11-21).
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Not applicable.
Acknowledgments
We wish to thank the anonymous referees for their suggestions to improve the original manuscript.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Cantón, A.; Fernández-Jambrina, L. Interpolation of a spline developable surface between a curve and two rulings. Front. Inf. Technol. Electron. Eng. 2015, 16, 173–190. [Google Scholar] [CrossRef]
- Dokken, T.; Skytt, V.; Barrowclough, O. Trivariate spline representations for Computer Aided Design and Additive Manufacturing. Comput. Math. Appl. 2019, 78, 2168–2182. [Google Scholar] [CrossRef]
- Jator, S.N. Numerical integrators for fourth order initial and boundary value problems. Int. J. Pure Appl. Math. 2008, 47, 563–576. [Google Scholar]
- Bai, Z.; Wang, H. On positive solutions of some nonlinear fourth-order beam equations. J. Math. Anal. Appl. 2002, 270, 357–368. [Google Scholar] [CrossRef]
- Alomari, A.K.; Anakira, N.R.; Bataineh, A.S.; Hashim, I. Approximate solution of nonlinear system of BVP arising in fluid flow problem. Math. Probl. Eng. 2013, 2013, 7. [Google Scholar] [CrossRef]
- Malek, A.; Beidokhti, R.S. Numerical solution for high order differential equations using a hybrid neural network–optimization method. Appl. Math. Comput. 2006, 183, 260–271. [Google Scholar] [CrossRef]
- Boutayeb, A.; Chetouani, A. A mini-review of numerical methods for high-order problems. Int. J. Comput. Math. 2007, 84, 563–579. [Google Scholar] [CrossRef]
- Hussain, K.; Ismail, F.; Senu, N. Two Embedded Pairs of Runge-Kutta Type Methods for Direct Solution of Special Fourth-Order Ordinary Differential Equations. Math. Probl. Eng. 2015, 2015, 196595. [Google Scholar] [CrossRef]
- Famelis, I.; Tsitouras, C. On modifications of Runge–Kutta–Nyström methods for solving y(4) = f(x,y). Appl. Math. Comput. 2016, 273, 726–734. [Google Scholar] [CrossRef]
- Papakostas, S.; Tsitmidelis, S.; Tsitouras, C. Evolutionary generation of 7th order Runge–Kutta–Nyström type methods for solving y(4) = f(x,y). In Proceedings of the AIP Conference Proceedings 1702, Athens, Greece, 20–23 March 2015; AIP Publishing LLC: Melville, NY, USA, 2015; p. 190018. [Google Scholar]
- Olabode, B.T.; Omole Ezekiel, O. Implicit Hybrid Block Numerov-Type Method for the Direct Solution of Fourth-Order Ordinary Differential Equations. Am. J. Comput. Appl. Math. 2015, 5, 129–139. [Google Scholar]
- Adeyeye, O.; Omar, Z. Solving fourth order linear initial and boundary value problems using an implicit block method. In Proceedings of the Third International Conference on Computing, Mathematics and Statistics (iCMS2017), Langkawi, Malaysia, 5 November 2019; Springer Nature: Singapore, 2019; pp. 167–177. [Google Scholar]
- Defez, E.; Tung, M.M.; Ibáñez, J.; Sastre, J. Approximating a Special Class of Linear Fourth-Order Ordinary Differential Problems. In Proceedings of the European Consortium for Mathematics in Industry, Santiago de Compostela, Spain, 13–17 June 2016; Springer: Cham, Switzerland, 2016; pp. 577–584. [Google Scholar]
- Defez, E.; Ibáñez, J.; Alonso, J.M.; Tung, M.M.; Real-Herráiz, T. On the approximated solution of a special type of nonlinear third-order matrix ordinary differential problem. Mathematics 2021, 9, 2262. [Google Scholar] [CrossRef]
- Defez, E.; Tung, M.M.; Ibáñez, J.; Sastre, J. Approximating and computing nonlinear matrix differential models. Math. Comput. Model. 2012, 55, 2012–2022. [Google Scholar] [CrossRef]
- Defez, E.; Tung, M.M.; Solis, F.J.; Ibáñez, J. Numerical approximations of second-order matrix differential equations using higher degree splines. Linear Multilinear Algebra 2015, 63, 472–489. [Google Scholar] [CrossRef][Green Version]
- Graham, A. Kronecker Products and Matrix Calculus with Applications; John Wiley & Sons: New York, NY, USA, 1981. [Google Scholar]
- MATLAB, Version 9.12.0 (R2022a); The MathWorks Inc.: Natick, MA, USA, 2022.
- Flett, T.M. Differential Analysis; Cambridge University Press: Cambridge, MA, USA, 1980. [Google Scholar]
- Loscalzo, F.R.; Talbot, T.D. Spline function approximations for solutions of ordinary differential equations. SIAM J. Numer. Anal. 1967, 4, 433–445. [Google Scholar] [CrossRef]
- Fuchssteiner, B. (Ed.) MuPad Multi Processing Algebra Data Tool: Tutorial, MuPad Version 1.2; Springer: Basel, Switzerland, 1994. [Google Scholar]
- MATLAB. Symbolic Math in MATLAB. 2022. Available online: https://www.mathworks.com/discovery/mupad.html (accessed on 25 June 2022).
- Group of High Performance Scientific Computing (HiPerSC); Universitat Politècnica de València. MATLAB Code for Solving Non-Linear Matrix-Differential Equations. 2022. Available online: http://personales.upv.es/joalab/software/spline4order.zip (accessed on 25 June 2022).
- Jikantoro, Y.; Ismail, F.; Senu, N.; Ibrahim, Z. A class of hybrid methods for direct integration of fourth-order ordinary differential equations. Bull. Malays. Math. Sci. Soc. 2018, 41, 985–1010. [Google Scholar] [CrossRef]
- Hussain, K.; Ismail, F.; Senu, N. Solving directly special fourth-order ordinary differential equations using Runge–Kutta type method. J. Comput. Appl. Math. 2016, 306, 179–199. [Google Scholar] [CrossRef]
- Jódar, L. Explicit solutions for second order operator differential equations with two boundary value conditions. Linear Algebra Appl. 1988, 103, 73–86. [Google Scholar] [CrossRef]
- Kailath, T. Linear Systems; Prentice-Hall: Englewood Cliffs, NJ, USA, 1980; Volume 156. [Google Scholar]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).