Skip to main content

ORIGINAL RESEARCH article

Front. Built Environ., 22 April 2021
Sec. Computational Methods in Structural Engineering

A New Method for Numerical Integration of Higher-Order Ordinary Differential Equations Without Losing the Periodic Responses

  • School of Civil Engineering, National Technical University of Athens, Athens, Greece

A new numerical method is presented for the solution of initial value problems described by systems of N linear ordinary differential equations (ODEs). Using the state-space representation, a differential equation of order n > 1 is transformed into a system of L = n×N first-order equations, thus the numerical method developed recently by Katsikadelis for first-order parabolic differential equations can be applied. The stability condition of the numerical scheme is derived and is investigated using several well-corroborated examples, which demonstrate also its convergence and accuracy. The method is simply implemented. It is accurate and has no numerical damping. The stability does not require symmetrical and positive definite coefficient matrices. This advantage is important because the scheme can find the solution of differential equations resulting from methods in which the space discretization does not result in symmetrical matrices, for example, the boundary element method. It captures the periodic behavior of the solution, where many of the standard numerical methods may fail or are highly inaccurate. The present method also solves equations having variable coefficients as well as non-linear ones. It performs well when motions of long duration are considered, and it can be employed for the integration of stiff differential equations as well as equations exhibiting softening where widely used methods may not be effective. The presented examples demonstrate the efficiency and accuracy of the method.

1. Introduction

The great majority of problems in engineering and mathematical physics are described by first-order (parabolic) and second-order (hyperbolic) differential equations, modeling the diffusion in bodies, the motion of systems, and other responses. A reason that equations of order higher than the second do not appear often is that many classical mathematical models of the physical world are derived from Newton's law of motion. However, there are many phenomena in engineering, physics, and biology that are described by higher-order equations, e.g., the entry-flow, the variation of the thyroid hormone, and several other phenomena are described by third-order differential equations (Padhi and Pati, 2014). Plenty of analytical methods have been developed for solving higher-order ordinary differential equations (ODEs) of a specific form. Many efficient numerical methods have also been developed for solving such equations with the Runge–Kutta method and its modifications playing an essential role (Butcher, 2000, 2008). Therefore, the question of why to develop a new numerical method to solve such equations looks plausible. The answer comes from the following fact. In recent years, the use of differential models to describe the dynamic response of viscoelastic structures leads to discrete ODEs of order higher than two, whose solution exhibits periodic behavior (Nerantzaki and Babouskos, 2012; Katsikadelis, 2014, 2016a). It is known that the periodic response cannot be captured by the available numerical methods (Simos, 1997) unless they are symmetric or are adapted to a specific problem. Otherwise, they lead to inaccurate results. Actually, the motivation for developing the present method mainly was to cope with such problems. The proposed method solves efficiently and accurately these equations, and it is problem-independent.

The initial value problem (IVP) for the n > 0 order linear ODE is stated as:

y(n)+a1y(n-1)+a2y(n-2)++an-1y+any=f(t),t[0, T], T>0    (1.1a)
y(0)=y0, y(0)=y0, y(0)=y0, , y(n-1)(0)=y0(n-1)    (1.1b)

where, a1, a2, … an−1, an are N × N real matrices, y=y(t)={y1(t)y2(t)yn(t)}Tis the vector of the unknown functions, f(t)={f1(t)f2(t)fn(t)}T the vector of external sources, and y0,y0,y0,,y0(n-1) are N × 1 given vectors representing the initial conditions.

In the presented method, the systems of N linear ODEs (1.1a) is transformed into a system of L = n × N first-order ODEs, which is subsequently solved using the numerical method developed by Katsikadelis for systems of first-order ODEs (Katsikadelis, 2016b). The latter method is based on the principle of the analog equation, which converts the L coupled first-order ODEs equations into a set of L single term uncoupled first-order ODEs with fictitious sources.

The investigation of the stability of the numerical scheme results in the condition that the coefficient matrices of the equation must satisfy. Besides, well-corroborated numerical examples show the accuracy and convergence of the method. The method is simply implemented, self-starting, and accurate. The stability does not demand symmetrical and positive definite coefficient matrices a1, a2, … an−1, an. This advantage is important because the scheme can find the solution of differential equations resulting from methods in which the space discretization does not result in symmetrical coefficient matrices but only satisfies the stability condition, for example, the boundary element method. Moreover, it captures the periodic behavior of the solution, where many of the standard numerical methods may be ineffective or highly inaccurate. The present method also solves equations having variable coefficients, i.e., a1(t), a2(t), … an−1(t), an(t), as well as non-linear ones. The efficiency of the method is illustrated by solving several equations, including linear and non-linear benchmark ODEs.

2. Linear Equations

The n-th Order Linear ODE

We consider now the n-th order ODE, Equation (1.1). If we set:

x1=yx2=x1=yx3=x2=y=xn=xn-1=y(n-1)    (2.1)

Equation (2.1) is reduced to the system of L = n × N first-order ODEs:

[I00000I00000I00000I00000I]{x1x2x3xn-1xn}+[0-I00000-I00000000000-Ianan-1an-2a2a1]{x1x2x3xn-1xn}={0000f}    (2.2)

Equation (2.2) is of the form:

Cu˙+Ku=p    (2.3)

where now,

C=[I00000I00000I00000I00000I]L×LK=[0-I00000-I00000000000-Ianan-1an-2a2a1]L×L    (2.4a,b)
u={x1x2x3xn-1xn}L×1p={0000f}L×1    (2.4c,d)

Then, the method presented in Katsikadelis (2016b) is used to solve Equation (2.3) with initial conditions.

u0={x1(0)x2(0)x3(0)xn-1(0)xn(0)}={y0y0y0y0(n-2)y0(n-1)}L×1    (2.5)

Table 1 shows the solution algorithm.

TABLE 1
www.frontiersin.org

Table 1. Algorithm for the numerical solution of the linear equations n-th order ODEs in the interval [0, T].

Stability of the Numerical Scheme

As it was proved in Katsikadelis (2016b), the numerical scheme in Table 1 is stable if all eigenvalues λi of the matrix K have a non-negative real part. In the following, it is proved that this condition is satisfied if the N roots of the n-th order polynomial,

Π(λ)=Iλn-A1λ(n-1)+A2λ(n-2)-+(-1)nAN    (2.6)

have a non-negative real part. A1, A2, ⋯ , AN are the diagonal matrices of the eigenvalues of a1, a2, … an−1, an.

Proof

According to Katsikadelis (2016b), the numerical scheme is stable if the eigenvalues of the matrix K^=C-1K, where C and K are defined by Equations (2.4a,b), have a non-negative real part. Apparently, since C = I, it is K^=K. For convenience, we illustrate the proof with second-order ODE. Then, the proof is easily extended to the n-th order ODE.

For the second order ODE, it is:

K=[0-Ia2a1]    (2.7)

The pertinent eigenvalue problem for K is:

[K11-λIK12K21K22-λI]{x1x2}={00}    (2.8)

The matrix in Equation (2.8) is transformed to an upper triangular matrix by employing Gauss elimination. To avoid inversion of the singular matrix(K11 − λI), Equation (2.7) is rewritten as:

K12x2+(K11-λI)x1=0(K22-λI)x2+K21x1=0}    (2.9)

which after elimination of x2 from the second equation gives:

[K12K11-λI0-(K22-λI)K^12-1(K11-λI)+K21]{x2x1}={00}    (2.10)

The characteristic polynomial of the matrix in Equation 2.10 is:

Π(λ^)=detK12det[-(K22-λI)K12-1(K11-λI)+K21]=0    (2.11)

which by virtue of Equation (2.7) becomes:

Π(λ^)=det(-I)det[-(a1-λI)(-I)-1(0-λI)+a2]=0   =det[Iλ2-a1λ+a2]=0    (2.12)

We apply now the spectral decomposition for the matrix a1:

A1=X1-1a1X1    (2.13)

where A1 represents the diagonal matrix of the eigenvalues α1i (i = 1, 2, …, N) of a1 and X1 (det(X1) ≠ 0) the matrix of its eigenvectors.

Thus, Equation (2.12) may be written as:

Π(λ^)=det(X1-1[Iλ2-A1λ+a2]X1)=0   =det[Iλ2-A1λ+X1-1a2X1]=0    (2.14)

The matrices X1-1a2X1 and a2 are similar. Therefore, they have the same eigenvalues, i.e.,

A2=X2-1(X1-1a2X1)X2=X2-1a2X2    (2.15)

where A2 represents the diagonal matrix of the eigenvalues α2i (i = 1, 2, …, N) of a2 and X2 (det(X2) ≠ 0) the matrix of its eigenvectors.

Based on Equation (2.15), Equation (2.14) is written as:

Π(λ^)=det(X2-1[Iλ2-A1λ+X1-1a2X1]X2)=0   =det[Iλ2-A1λ+A2]=0    (2.16)

Equation (2.16) yields a set of 2 equations:

λi2-α1iλi+α2i=0, i=1, 2    (2.17)

Each of the Equations (2.17) has two roots, λi1, λi2, which have a non-negative real part if the sum of the roots and their product are non-negative, that is:

λi1+λi2=α1i0 and λi1λi2=α2i0    (2.18)

For the n-th order ODE, the eigenvalue problem for the matrix K reads:

(K-λIL×L)=[-λI-I0000-λI-I0000-λI00000-λI-Ianan-1an-2a2a1-λI]       ={00000}, (L=n×N)    (2.19)

Using Gauss elimination, reordering the columns to avoid inversion of singular matrices, and working as for the second-order equation, we obtain the following n-th order eigenvalue problem corresponding to Equation (2.16):

Π(λ^)=det[Iλ^n-α1λ^(n-1)+α2λ^(n-2)-+(-1)nαn]=0    (2.20)

where Ak, k = 1, 2, …, n are the diagonal matrices of the eigenvalues aki, i = 1, 2, …, N of the coefficient matrix ak.

Equation (2.20) yields the set of N equations:

λn-a1iλ(n-1)+a2iλ(n-2)-+(-1)nani=0,i=1, 2, , N    (2.21)

The stability of the scheme demands that all roots of Equations (2.21) have a non-negative real part. Because this procedure requires the evaluation of the eigenvalues of the matrices Ak, k = 1, 2, …, n, and the subsequent examination of the sign of the real part of the roots of the Equations (2.21), it is more convenient for large coefficient matrices to establish first the coefficients of the characteristic polynomial of the matrix K using the Faddeev–LeVerrier algorithm, and then examine the sign of the real part of the eigenvalues using the Routh–Hurwitz criterion (Lambert, 1991).

Numerical Examples

Based on the developed numerical scheme, MATLAB codes have been written and various example problems have been solved. Note that the exact solutions, where no reference is made, have been obtained using the inverse method developed by Katsikadelis and employed in Katsikadelis (2016b). According to this method, a solution is assumed, which yields the corresponding source after inserting it into the equation. It is avoided to show the inefficiency of the available methods to solve the higher-order ODEs under consideration in this paper because this might be a deviation from the main purpose of the paper.

Example 1. Second-Order ODE. One-Degree-of-Freedom System

In this example, the IVP is studied:

y+a1y+a2y=f(t),   t[0, T],  T>0    (2.22a)
y(0)=y0, y(0)=y0    (2.22b)

where a1 ≥ 0, a2 > 0. Obviously, the stability criterion is satisfied.

Apparently, the following five cases may be considered:

Case (i): a1 = 0, a2 = 25, f(t) = 0 y0=1,y0=0

In this case, Equation (2.22a) represents free undamped vibrations of a system with one-degree-of-freedom. The problem admits an exact solution (Katsikadelis, 2020).

y(t)=y0ωsinωt+y0cosωt,  ω=a2    (2.23)

The solution and its derivative are shown in Figure 1A together with the errors e = yyex and e=y-yex. Moreover, the response of the system for a long duration is shown in Figure 1B. The scheme shows no amplitude decay and negligible period elongation [(PE = 0.048%) for h = 0.001].

FIGURE 1
www.frontiersin.org

Figure 1. (A) Solution in Example 1, case (i). (B) Response for long duration in Example 1, case (i). (C) Solution in Example 1, case (ii). (D) Solution in Example 1, case (iii). (E) Solution in Example 1, case (vi). (F) Solution in Example 1, case (v).

Case (ii): a1 = 0.5, a2 = 25, f(t) = 0 y0=1,y0=0

In this case, Equation (2.22a) represents free underdamped vibrations of a system with one-degree-of-freedom. The problem admits an exact solution (Katsikadelis, 2020)

y(t)=[y0+y0ξωωDsinωDt+y0cosωDt]e-ξωt    (2.24)

where ωD=ω1-ξ2, ξ = a1/2ω < 1, ω=a2. The obtained solution together with the error e = yyex is shown in Figure 1C. The motion is oscillatory.

Case (iii): a1 = 10, a2 = 25, f(t) = 0 y0=1,y0=0

In this case, it is ξ = a1/2ω = 1, and Equation (2.22a) represents the motion of an one-degree-of-freedom system with critical damping. The problem admits an exact solution (Katsikadelis, 2020)

y(t)=[y0+(y0ω+y0)t]e-ωt,  ω=a2    (2.25)

The obtained solution together with the error e = yyex is shown in Figure 1D. The motion is non-oscillatory.

Case (iv): a1 = 15, a2 = 25, f(t) = 0 y0 = 1, y0 = 0

In this case, it is ξ = a1/2ω = 1.5, and Equation (2.22a) represents the free motion of an overdamped one-degree-of-freedom system. The problem admits an exact solution (Katsikadelis, 2020).

y(t)=(y0coshΩt+y0+y0ξωΩsinhΩt)e-ξωt,Ω=ωξ2-1,  ω=a2    (2.26)

The obtained solution together with the error e = yyex is shown in Figure 1E. The motion is non-oscillatory.

Case (v): a1 = 0, a2 = 25, f(t) = f0H(t) y0=1,y0=0 (f0 = 5)

where H(t) is the Heaviside step function. In this case, Equation (2.22a) represents the forced undamped vibrations of an one-degree-of-freedom system subjected to a suddenly applied load f0 at t = 0. The problem admits an exact solution (Katsikadelis, 2020).

y(t)=y0ωsinωt+y0cosωt+f0a2(1-cosωt),ω=a2    (2.27)

Figure 1F shows the obtained solution together with the error e = yyexact.

Example 2. Second-Order ODE. Three-Degree-of-Freedom System

In this example, we solve the IVP:

{y1y2y3}+[2.00900.61662.08630.37980.91950.24831.19961.19984.5136]{y1y2y3}+[9.44793.37721.11204.90869.00057.80254.89253.69253.8974]{y1y2y3}={f1(t)f2(t)f3(t)}    (2.28a)
y0={100}T, y0={020.2}T    (2.28b)

The matrix K, [see Equation (2.4b)] and its eigenvalues are:

K=[0-Ia3a2]6×6,    (2.29a)
eig(K)={λ1λ2λ3λ4λ5λ6}={3.0431 + 0.0000i1.2844 + 2.9891i1.2844 - 2.9891i0.6193 + 2.1419i0.6193 - 2.1419i0.5915 + 0.0000i}    (2.29b)

We observe that Re(λi) > 0. Hence, the stability criterion is satisfied and the proposed method can be applied.

Equation (2.28a) for

{f1(t)f2(t)f3(t)}={0.2224t+9.6811cost+4.7454sint+0.417261.5605t+6.7476cost+15.6212sint+0.04966 0.77948t+7.2921cost+6.1854sint+0.90272}    (2.30)

admits the exact solution yex={cos(t)  2sin(t)  t/5}T. Figure 2 shows the solution as compared with the exact one as well as the error e = yyex.

FIGURE 2
www.frontiersin.org

Figure 2. Solution and error in Example 2.

Example 3. Third-Order ODE. Two-Degree-of Freedom System

In this example, we solve the third-order IVP:

{y1y2}+[4.07350.63504.52904.5670]{y1y2}+[0.63230.27840.097540.5468]{y1y2}+[0.95750.15760.96490.9706]{y1y2}={f1f2}    (2.31a)
y0={02}T, y0={1-1}T, y0={-1-1.5}T    (2.31b)

The matrix K and its eigenvalues are:

K=[0-I000-Ia3a2a1]6×6,    (2.32a)
eig(K)={λ1λ2λ3λ4λ5λ6}={5.9076 + 0.0000i2.6155 + 0.0000i0.0209 + 0.5037i0.0209 - 0.5037i0.0378 + 0.4432i0.0378 - 0.4432i}    (2.32b)

We observe that Re(λi) > 0. Hence, the stability criterion is satisfied, and the proposed method can be applied.

Equation (2.31a) for

f=e-0.5t[-4.6069cost - 1.3023sint/430.2989sint/5 - 178.439cost/25]    (2.33)

admits an exact solution:

yex=e-0.5t{sintcost}    (2.34)

Figure 3A shows the computed solution for h = 0.01 as compared with the exact one. Figure 3B shows the error of the solution and its derivatives for h = 0.01. Moreover, Figure 3C shows the error max |yk(ti) − (yex)k(ti)|, (k = 1, 2, 0 < ti ≤ 100) vs. the time step h. Apparently, this validates the convergence of the numerical scheme. Finally, Figure 3D verifies that the convergence is of O(h2) (Katsikadelis, 2016b).

FIGURE 3
www.frontiersin.org

Figure 3. (A) Solution y={y1y2}T in Example 3. (B) Error in Example 3. (C) Error max |yk(ti) − (yex)k(ti)| (k = 1, 2, 0 < ti ≤ 100) in Example 3. (D) Computed and expected error ek = ek(h); ck=ek(1)/h(1)2 (k = 1, 2) in Example 3.

Example 4. Third-Order ODE. One-Degree-of-Freedom System. Stable Solution

In this example, we study the IVP:

y+2y+10y+y=0    (2.35a)
y(0)=1,  y(0)=-1,  y(0)=1    (2.35b)

Equation (2.35a) admits an exact solution:

yex=c1 exp(r1t)+c2 exp(r2t)+c3 exp(r3t)

where,

{r1r2r3}={-0.9490+2.9843i-0.9490-2.9843i-0.1020+0.0000i},{c1c2c3}={0.0371+0.1399i0.0371-0.1399i0.9257-0.0000i}

The matrix K and its eigenvalues are:

K=[0-1000-11102]3×3    (2.36a)

,

eig(K)={λ1λ2λ3}={0.1020+0.0000i0.9490+2.9843i0.9490-2.9843i}    (2.36b)

Obviously, it is Re(λi) > 0. Therefore, the solution is stable as it satisfies the stability condition. Figure 4 shows the solution and the corresponding error.

FIGURE 4
www.frontiersin.org

Figure 4. Solution and error in Example 4.

Example 5. Third-Order ODE. One-Degree-of-Freedom System. Unstable Solution

In this example, we study the IVP:

y+2y+10y+25y=0    (2.37a)
y(0)=1,  y(0)=-1,  y(0)=1    (2.37b)

Equation (2.37a) admits an exact solution:

yex=c1 exp(r1t)+c2 exp(r2t)+c3 exp(r3t)

where

{r1r2r3}={0.1623+3.2754i0.1623-3.2754i-2.3246+0.0000i},{c1c2c3}={0.1429+0.0937i0.1429-0.0937i0.7142-0.0000i}

The matrix K and its eigenvalues are:

K=[0-1000-125102]3×3,    (2.38a)
eig(K)={λ1λ2λ3}={5.0000+0.0000i-1.5000+4.7697i-1.5000-4.7697i}    (2.38b)

Obviously, it is Re(λ2) < 0, Re(λ3) < 0. Therefore, the solution is unstable because it does not satisfy the stability condition. Figure 5 shows the solution and the corresponding error.

FIGURE 5
www.frontiersin.org

Figure 5. Solution and error in Example 5.

3. Linear Equation With Variable Coefficients

To this point, we have developed the method for the solution of Equation (1.1a) with constant coefficients matrices. If the matrices a1, a2, … an depend on the variablet, i.e., a1(t), a2(t), … an(t), the solution procedure described previously remains the same except that the elements in the last row of K, Equation (2.4b) depend on time. Therefore, this matrix must be reevaluated in each time step of the solution procedure. In the following, the efficiency of the method is demonstrated by solving ODEs with variable coefficients.

Example 6. Variable Coefficients. Second-Order ODE. One-Degree-of-Freedom System

In this example, we solve the IVP:

(1+t2)y+ty+e1/(1+t)y=p(t)    (3.1a)
y0=1,  y0=-0.1    (3.2b)

This problem for

p(t)=e(-t/10){[e1/(t+1)-99100(t2+1)-t10]cost   + (1-sint5)sint}

admits an exact solution yex(t)=e-0.1t cos(t).

We observe that a1=t1+t20, a2=e1/(1+t)1+t2>0. Therefore, the stability condition is satisfied for all values of t, and the developed solution procedure can be employed. The computed solution in the interval 0 ≤ t ≤ 20 is shown in Figure 6 as compared with the exact one together with the error e = yyex.

FIGURE 6
www.frontiersin.org

Figure 6. Solution y and error yyex in Example 6.

4. Non-Linear Equations

The n-th Order Non-linear ODE

The solution procedure developed for the linear equations can be straightforwardly extended to non-linear equations. However, in this case, the stability condition applies locally, which demands adequate reduction of the time step to ensure linearization.

The IVP for the non-linear N-degree of freedom systems can be formally stated as:

y(n)+G(t, y, y, y,  y(n-1), y(n-1))=f(t),t[0, T], T>0    (4.1a)
y(0)=y0, y(0)=y0, y(0)=y0, , y(n-1)(0)=y0(n-1)    (4.1b)

where G(t, y, y′, y″, … y(n−1), y(n−1)) is an N × 1 vector whose elements are in general non-linear functions of the components of the vectors: y, y′, y″, … y(n−1), y(n−1).

Using the transformation (2.1), Equation (4.1a) becomes:

{x1x2x3xn-1xn}+{-x2-x3-x4-xnG(t, x1, x2,  xn, )}={0000f}    (4.2)

Thus, the IVP (4.1a,b) is written in matrix form:

u˙+F(u)=p(t)    (4.3a)
u(0)=u0    (4.3b)

where

u={x1x2x3xn-1xn}L×1,    (4.4a)
F(u)={-x2-x3-x4-xnG(t, x1, x2,  xn, )}L×1, p={0000f}L×1    (4.4b,c)

Equation (4.3) is solved using the procedure developed in Katsikadelis (2016b) for the non-linear parabolic equation. Thus, Equation (4.3a) for t = 0 gives:

q0=[p0-F(u0)]    (4.5)

in which the vector q0 denotes u˙

Then, Equation (4.3a) is applied for t = tn:

qn+F(un)=pn    (4.6)

Moreover, we have [see (Katsikadelis, 2016b)]:

un=un-1+h2qn-1+h2qn    (4.7)

Eqations (4.6) and (4.7) are combined and solved for qn, un with n = 1, 2, … . The solution can be obtained using an iterative procedure in each step. A simple procedure is to substitute Equation (4.7) into Equation (4.6) and solve the resulting non-linear algebraic equation for qn. The solution can be obtained by employing any ready-to-use subroutine for non-linear algebraic equations. In our examples, the MATLAB function fsolve has been employed to obtain the numerical results. The efficiency of the described procedure to solve non-linear equations is demonstrated by the following examples. All equations satisfy the stability condition locally.

Example 7. Non-linear Second-Order ODE. One-Degree-of-Freedom System

The described numerical procedure is used to solve the IVP for the Duffing equation:

y+0.2y+y+y3=f(t)    (4.8a)
y(0)=0,  y(0)=1    (4.8b)

For f(t) = e−3t(sin t)3/10 − et/10 sin t/100, the IVP (4.8a,b) admits an exact solution uex(t)=e-0.1tsint.

In this case, the vectors involved in Equations (4.3a,b) are:

u={x1x2},  G(u)={-x20.2x2+x1+x13},    p(t)={0f(t)},  u0={01}

The solution together with the error yyex for Δt = 0.01 is shown in Figure 7A. Besides, Figure 7B shows the phase plane of the solution.

FIGURE 7
www.frontiersin.org

Figure 7. (A) Solution y(t) and error yyex in Example 7. (B) Phase plane (0 ≤ t ≤ 500, h = 0.1) in Example 7.

Example 8. Non-linear Second-Order ODE. One-Degree-of-Freedom System Exhibiting Softening

The numerical procedure for non-linear equations is employed to solve the IVP describing the response of a system exhibiting softening, namely,

y+0.2y+40y-y3=f(t)    (4.9a)
y(0)=0, y(0)=1    (4.9b)

For f(t) = 38.99e−0.1t sin te−0.3t(sin t)3, the IVP (4.9a,b) admits an exact solution yex(t)=e-0.1tsint.

In this case, the vectors involved in Equations (4.3a,b) are:

u={x1x2},  G(u)={-x20.2x2+40x1-x13},    p(t)={0f(t)},  u0={01}

The computed solution and its derivative are shown in Figures 8A,B, respectively, as compared with the exact ones. Moreover, the computed error yyex for Δt = 0.01 is shown in Figure 8C. Apparently, the obtained results show that the proposed method can solve efficiently systems exhibiting softening.

FIGURE 8
www.frontiersin.org

Figure 8. (A) Solution y(t) in Example 8. (B) Derivative y′(t) of the solution in Example 8. (C) Error yyex in Example 8.

Example 9. The Van Der Pol Equation

In this example, the IVP for the Van der Pol equation is solved, namely,

y+μ(1-y2)y+y=0    (4.10a)
y(0)=0,  y(0)=0.1    (4.10b)

The solution obtained for various values of the parameter μ is shown in Figure 9. Apparently, the method works for a long duration and large values of μ, where the system becomes stiff.

FIGURE 9
www.frontiersin.org

Figure 9. Solution y(t) and phase plane in Example 9.

Example 10. The Elastic Pendulum

The elastic pendulum (Figure 10A) is chosen as a two-degree-of-freedom non-linear system. In this pendulum, the rod is assumed elastically extensible with an axial stiffness k = EA/l, where A is the area of the cross-section of the rod and E the modulus of elasticity of its material.

FIGURE 10
www.frontiersin.org

Figure 10. (A) Elastic pendulum in Example 10. (B) Elastic pendulum using the present scheme with Δt = 0.001 in Example 10. (C) The x-displacement in the time intervals 0 < t < 5 and 990.09 < t < 995.09 with Δt = 0.01 in Example 10. (D) Energy variation in Example 10. (E) The x-displacement using (left) current scheme with Δt = 0.01 and (right) Newmark's trapezoidal rule with Δt = 0.00001 in Example 10.

In Cartesian coordinates x(t) y(t), the motion of the pendulum is governed by the two non-linear equations of motion (Katsikadelis, 2020).

mx¨+EAL(1-Lx2+y2)x=0    (4.11a)
my¨+EAL(1-Lx2+y2)y=-mg    (4.11b)

with the initial conditions.

x(0)=x0,  x˙(0)=x˙0,  y(0)=y0,  y˙(0)=y˙0    (4.12)

This problem, in absence of gravity, i.e., mg = 0, has been used as a benchmark problem by earlier investigators (Bathe, 2007) to check the performance of their method in an effort to overcome the instability of the Newmark method arising when long-duration motions are considered in non-linear structural dynamics.

The pendulum is studied using the procedure presented in Section Non-linear Equations with data: l = 3.0443m, EA = 104N, x0 = 0, 0=7.72 ms-1, y0 = −l, ẏ0 = 0, m = 6.667 kg, ρA = 6.57kg/m, which are the data employed in Bathe (2007). The response of the system obtained with Δt = 0.001 is presented in Figure 10B and is identical with the exact solution (Beléndez et al., 2007). In Figure 10C, the x-displacement obtained with Δt = 0.001 in the intervals 0 ≤ t ≤ 5 and 990.09 ≤ t ≤ 995.09 has been plotted. This demonstrates that the response remains unchanged after a long duration of motion. Figure 10D shows that the total energy of the system is conserved. It is apparent that the proposed method does not exhibit a period elongation and an amplitude decay when analyzing the dynamic response of non-linear systems (Kuhl and Crisfield, 1999). Finally, Figure 10E shows the response of the elastic pendulum obtained using the current scheme with Δt = 0.01 and Newmark's trapezoidal scheme with Δt = 0.00001. Apparently, the present scheme performs well for a relatively large time step, while Newmark's scheme shows instability even for a very small time step.

Example 11. Variable Coefficients. Second-Order Non-linear ODEs. Two-Degree-of-Freedom System

The motion of a planet around the Sun is described by the system of differential equations:

ddt(mpx˙)+GmpMSxr3=0    (4.13a)
ddt(mpy˙)+GmpMSyr3=0    (4.13b)

subject to the initial conditions

{x(0), y(0)}={x0, y0},  x˙(0), (0)}={x˙0, y˙0}    (4.13c,d)

where r = (x2 + y2)1/2; mp, MS the mass of the planet and Sun, respectively, and G the universal gravitation constant (Murray and Dermott, 1999). For variable planet mass mp = m0m(t) and variable Sun mass MS = M0M(t), Equations (4.13a,b) are generalized as:

+m+μM(t)xr3=0    (4.14a)
y¨+m˙my˙+μM(t)yr3=0    (4.14b)

in which μ = GM0 is the standard gravitational parameter.

Equations (4.14a,b) are solved numerically with μ = 1 and initial conditions:

{x(0), y(0)}={013.3333}T,{x˙(0), (0)}={-0.27380.09129}T    (4.15a,b)

First, the solution is obtained for constant Sun mass M(t) = 1, constant planet mass m(t) = 1, and the specified initial conditions (4.15a,b). The exact orbit is the ellipse with rmin = 10 and rmax = 20 (see Figure 11A). Figures 11B,C show the solution as compared with the exact one. Moreover, Figure 11D shows the error = rrex for long the duration of the motion. Note that for h ≤ 0.01, the error does not increase.

FIGURE 11
www.frontiersin.org

Figure 11. (A) The heliocentric coordinate system (r, θ) for the ellipse in Example 11. (B) Plot of the solution using polar coordinates in Example 11. (C) Plot of the solution r(t) in Example 11. (D) Error = rrex in Example 11. (E) Orbit of a planet when the mass of the planet or the mass of Sun varies with time in Example 11.

The IVP is now solved for a variable mass of the planet and the Sun. Results for the following four cases have been obtained with Δt = 0.2.

(i) Variable Sun mass M(t) = exp(−0.001t) and constant planet mass m(t) = 1.

(ii) Constant Sun mass M(t) = 1 and constant planet mass m(t) = 1.

(iii) Constant Sun mass M(t) = 1 and decreasing planet mass m(t) = exp(−0.005t),

(iv) Constant Sun mass M(t) = 1 and increasing planet mass m(t) = exp(0.005t).

The results have been plotted using polar coordinates in Figure 11E. This figure gives an insight into the behavior of the system Sun-planet when either the mass of the Sun or the mass of the planet varies with time.

Example 12. Fourth-Order ODE. One-Degree-of-Freedom System

In this example, we study the IVP

y(iv)+y3=cost+cos3t    (4.16a)
y(0)=1, y(0)=0, y(0)=-1, y(0)=0    (4.16b)

The problem admits the exact solution yex(t) = cos t.

In this case, the vectors involved in Equations (4.3 a,b) are:

  u={x1x2x3x4},  G(u)={-x2-x3-x4x13},p(t)={000cost+cos3t},  u0={10-10}

Figure 12A shows the solution with Δt = 0.005 as compared with the exact one. Moreover, Figure 12B shows the computed error yyex for various values of the time step Δt. The local stability requires a very small time step to reduce the error (see Figure 12B).

FIGURE 12
www.frontiersin.org

Figure 12. (A) Solution in Example 12 (Δt = 0.005). (B) Error yyex for various values Δtin Example 12.

5. Conclusions

The paper presents a direct time integration method for solving numerically higher-order linear and non-linear ODEs. The quintessence of the method is to use the well-known state-space representation to transform the differential equation of order n > 1 into a system of L = n × N simultaneous first-order equations, and subsequently, to solve it using the numerical method developed recently by Katsikadelis for systems of first-order parabolic differential equations (Katsikadelis, 2016b). An important advantage of the developed method is that it captures the periodic behavior of the solution, where many of the standard numerical methods may be ineffective or produce highly inaccurate results.

The investigation of the stability of the numerical scheme results in the condition that the coefficient matrices of the differential equation must satisfy. The stability does not require symmetrical and positive definite coefficient matrices. This advantage is important because the scheme can find the solution of differential equations resulting from methods in which the space discretization does not result in symmetrical matrices, for example, the boundary element method.

The present method also solves equations having variable coefficients if the stability condition is satisfied in all instances. For non-linear equations, the derived stability condition should be satisfied locally. The method is simply implemented and self-starting. It has second-order accuracy and does not have numerical damping or period elongation. It performs well when motions of long duration are considered, and it can be employed as a practical method for integration of stiff higher-order differential equations as well as equations with stiffness softening, where widely used methods may not be effective. Several well-corroborated examples and numerical experiments are presented, including linear as well as non-linear equations of benchmark problems, which demonstrate the efficiency and accuracy of the developed method.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.

Author Contributions

The author confirms being the sole contributor of this work and has approved it for publication.

Conflict of Interest

The author declares that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

Bathe, K. J. (2007). Conserving energy and momentum in non-linear dynamics: a simple implicit time integration scheme. Comput. Struct. 85, 437–445. doi: 10.1016/j.compstruc.2006.09.004

CrossRef Full Text | Google Scholar

Beléndez, A., Pascual, C., Méndez, D. I., Beléndez, T., and Neipp, C. (2007). Exact solution for the non-linear pendulum. Rev Brazil Ensi Fisica 29, 645–648. doi: 10.1590/S1806-11172007000400024

CrossRef Full Text | Google Scholar

Butcher, J. C. (2000). Numerical methods for ordinary differential equations in the 20th century. J. Comp. Appl. Math. 125, 1–29 doi: 10.1016/S0377-0427(00)00455-6

CrossRef Full Text | Google Scholar

Butcher, J. C. (2008). Numerical Methods for Ordinary Differential Equations, second ed., Chichester: John Wiley & Sons Ltd. doi: 10.1002/9780470753767

CrossRef Full Text | Google Scholar

Katsikadelis, J. T. (2014). The Boundary Element Method for Plate Analysis. Oxford: Academic Press, Elsevier.

Google Scholar

Katsikadelis, J. T. (2016a). The Boundary Element Method for Engineers and Scientists. Oxford: Academic Press, Elsevier. doi: 10.1016/B978-0-12-804493-3.00005-9

CrossRef Full Text | Google Scholar

Katsikadelis, J. T. (2016b). A new direct tim integration method for the semi-discrete parabolic equations. Eng. Analy. Bound. Elem. 73, 181–190. doi: 10.1016/j.enganabound.2016.09.009

CrossRef Full Text | Google Scholar

Katsikadelis, J. T. (2020). Dynamic Analysis of Structures. Oxford: Academic Press, Elsevier.

Kuhl, D., and Crisfield, M. A. (1999). Energy-conserving and decaying algorithms. Int. J. Numer. Methods Eng. 45, 569–599. doi: 10.1002/(SICI)1097-0207(19990620)45:5<569::AID-NME595>3.0.CO;2-A

CrossRef Full Text | Google Scholar

Lambert, J. D. (1991). Numerical Methods for Ordinary Differential Systems. The Initial Value Problem. New York, NY: John Wiley & Sons Ltd.

Google Scholar

Murray, C. D., and Dermott, S. F. (1999). Solar System Dynamics. Cambridge: Cambridge University Press. doi: 10.1017/CBO9781139174817

CrossRef Full Text | Google Scholar

Nerantzaki, M. S., and Babouskos, N. G. (2012). Vibrations of inhomogeneous anisotropic viscoelastic bodies described with fractional derivative models. Eng. Analy. Bound. Elem. 36, 1894–1907. doi: 10.1016/j.enganabound.2012.07.003

CrossRef Full Text | Google Scholar

Padhi, S., and Pati, S. (2014). Theory of Third-Order Differential Equations. New Delhi: Springer. doi: 10.1007/978-81-322-1614-8

CrossRef Full Text | Google Scholar

Simos, T. E. (1997). Modifying the Runge-Kutta method for the numerical solution of ODEs with oscillating solutions. Appl. Math. Comp. 84, 131–143. doi: 10.1016/S0096-3003(96)00083-5

CrossRef Full Text | Google Scholar

Keywords: ordinary differential equations, higher-order, numerical method, analog equation method, linear equations, non-linear equations, variable coefficients, boundary element method

Citation: Katsikadelis JT (2021) A New Method for Numerical Integration of Higher-Order Ordinary Differential Equations Without Losing the Periodic Responses. Front. Built Environ. 7:621037. doi: 10.3389/fbuil.2021.621037

Received: 24 October 2020; Accepted: 10 March 2021;
Published: 22 April 2021.

Edited by:

Eleni N. Chatzi, ETH Zürich, Switzerland

Reviewed by:

Dimitrios Lignos, École Polytechnique Fédérale de Lausanne, Switzerland
Aram Soroushian, International Institute of Earthquake Engineering and Seismology, Iran

Copyright © 2021 Katsikadelis. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: John T. Katsikadelis, amthdHMmI3gwMDA0MDtjZW50cmFsLm50dWEuZ3I=

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.