2.1. Shooting Method
Let us consider a standard approach for solving nonlinear boundary value problems described by the second-order ordinary differential equations also known as the shooting method [
13]:
In this paper, we consider ordinary differential equations with a nonlinear right-hand side function, and Dirichlet boundary conditions (boundary conditions of the first kind) are defined over an open interval
with the following boundary conditions:
To solve the designated problem, one should formulate the general Cauchy problem by replacing the Dirichlet boundary conditions with the initial conditions of the Cauchy problem. The
will be stated the same as in the boundary value problem, and for
we will choose a
value that is unknown on the current solution step:
The overall idea of the shooting method is that one should select the
value so that the solution to the Cauchy problem on the right edge is as close as possible to the right-boundary condition
. In other words, when solving this problem, one needs to simultaneously adjust the direction of the shot using the value on the right boundary:
It is possible to rewrite the problem as a nonlinear equation, which directly depends on the
parameter:
Here, one needs to minimize the G(
) value. To achieve this goal, we will apply a shooting method with a correction to the initial conditions using the Secant method [
14]. Typically, such a method can be written as follows:
Among the methods with fast (quadratic) convergence, the Secant method is the optimal choice. For example, the broadly used Newton’s method has some disadvantages because the initial approximation must be set in a small neighborhood of the sought minimum, which proves to be challenging for some problems. It also can have problems with convergence, and if the function has a point near the inflection point, then the improper choice of the initial conditions may result in the looping of Newton’s method inside the area of a false extremum.
The above-mentioned shortcomings of Newton’s method can be avoided by using its modification—the Secant method. This method allows for the replacement of the second order derivative in Newton’s formula with its linear approximation. It can be shown that is the intersection point, with the abscissa axis of the secant line passing through points and . The Secant method possesses guaranteed convergence, which is usually achieved by higher computational costs.
In our case, we can iteratively change the
parameter and use the acquired error at the right edge:
where
—new initial conditions,
—initial conditions from the previous shot,
—initial conditions of the shot before the last one,
and —corresponding errors in an attempt to reach the boundary conditions.
In the equation for
,
is the value acquired after applying a numerical integration method to the entire trajectory. Let us compare different methods that are of interest in this study using scheme (
7).
To launch the shooting method, it is required to set an initial slope guess for
. This is usually achieved by taking into account the physical properties of the original equation;
in this case, it is another initial guess for the Secant method, which slightly differs from the first one:
where
Rewriting second-order differential Equation (
1) as system of first-order ODEs yields:
with initial conditions
;
. Thus, the shooting error depends on the value
, and the Equation (
5) can be written as
. Thus, it is necessary to evaluate the error in expansion of finite-difference schemes to Taylor series.
The shooting method, which reduces the solution to the boundary value problem to calculating several solutions of the Cauchy problem, works well if the solution is not highly dependent on . Otherwise, the system becomes computationally unstable, even if the solution to the problem is only slightly sensitive to the initial conditions.
We will use the solution acquired by the Dormand–Prince 8 method (DOPRI78) as a reference method for estimating the errors.
2.2. Semi-Explicit and Semi-Implicit Numerical Integration
Recently, some new numerical methods based on semi-explicit and semi-implicit integration principles were introduced and found to be efficient not only for solving Hamiltonian systems [
12,
15,
16] but were also reasonably applicable to general IVPs. Semi-implicit methods can significantly outperform not only classical explicit and implicit Runge–Kutta methods but also some of the state-of-the-art algorithms, such as the Gragg–Bulirsch–Stoer extrapolation method, being superior in terms of computational efficiency and phase space structure preservation.
Definition 1. Semi-explicit methods can only be applied to systems of order 2 and higher due to their specific principles of calculations [12]. The semi-explicit method assumes that the state variable value, which is already calculated during the current solution step, can be used to calculate the rest of the variables. Let us consider several examples of semi-explicit and semi-implicit integration.
The semi-explicit midpoint method (SEMP) is a modification of the well-known explicit midpoint method [
17]. SEMP uses the previously calculated values on the same timestep for approximating the rest of the state variables in the first part of the method’s formula:
The general idea of semi-implicit methods is similar, but they require resolving the implicitness that appears when a variable implicitly depends on itself in the right-hand side function. However, contrary to fully implicit methods, semi-implicit integration possesses a one-dimensional implicitness, which assumes fewer computational costs for resolving. In many practical cases, one-dimensional implicitness can be resolved analytically, making the method similar to numerical-analytic Strang splitting. In cases when the analytical solution cannot be found (e.g., in the case of a trigonometric or exponential function of a state variable in RHS), the implicitness can be resolved by using fixed-point iterations or Newton’s method. The semi-implicit midpoint method (SIMP) for two-dimensional linear autonomous IVP can be defined as follows:
It is worth noticing that if the system of differential equations does not contain the implicit state variable in their right-hand side function, the resolving of implicitness is meaningless and the semi-implicit methods become semi-explicit ones. Thus, the SEMP method can be considered a combination of Euler and Euler–Cromer methods taken with a half step (
), and the SIMP method can be considered as a combination of the Euler method and the D-method taken with a half step (
) [
16].
To make all the considered methods exist, in our study we will consider test systems where at least one of the equations of the resulting algebraic system is implicit. In other words, we will consider differential equations of the second order, which necessarily contain a differentiable term of the first order.
The semi-explicit and semi-implicit approaches can be applied to spatially discretized partial differential equations as well. For example, in the case of the heat equation, semi-discretized by the standard central difference formula, the simplest semi-explicit method is the successive displacement version of the usual FTCS (forward-time, centered-space) method. On the other hand, the semi-implicit idea yields the UPFD (unconditionally positive finite difference) method [
18].
The midpoint version of this approach for the diffusion-advection equation is elaborated on in paper [
19], where the term “pseudo-implicit” is used instead of “semi-implicit”.
Let us consider the semi-implicit numerical integration of BVPs in more detail.
2.4. Blinking Method Modification
It is known that semi-explicit and semi-implicit methods are efficient for solving autonomous systems of ordinary differential equations. However, the performance of these methods on systems that involve an independent variable in their equations has not been thoroughly investigated. The behavior of these integrators can be unpredictable, especially if the initial equation is stiff [
20]. Let us consider a way to improve the convergence of the semi-implicit methods and prove it by analyzing the Taylor series expansions.
Theorem 1. The truncation errors of semi-explicit midpoint and semi-implicit midpoint methods may have different signs.
Proof. Consider the Taylor series expansion over the general scheme for the numerical integration method:
The Taylor series expansion for the Euler–Cromer (C) method is as follows:
when
Subtracting (
15) from (
14), one can obtain the following error equation:
Consider the Taylor series expansion for the D-method:
where
Subtracting (
17) from (
14), one can obtain the following error equation:
Thus, the SEMP and SIMP methods differ only in the first part (the Euler–Cromer and D methods, respectively) of the scheme, whereas the second part (the Euler method) remains the same. Thus, both first terms in (
16) and (
18) are equal. However, the second terms differ and possess different signs. Based on the fact that the Euler–Cromer method and D-method are adjoints, one can conclude that SEMP and SIMP errors will have different signs, provided that there is a significant impact from the second term. □
The key idea of the current research is to utilize the fact that semi-explicit and semi-implicit midpoint methods can provide opposite numerical errors to reduce the overall error of the BVP solution. For example, one can apply the semi-explicit method (
10) for all of the odd steps and the semi-implicit method (
11) for the remaining even steps, thus maintaining the order of the resulting numerical integration scheme while simultaneously reducing its truncation error.
In
Figure 1,
—SEMP method;
—SIMP method; h—stepsize;
;
.
One may notice that there are other versions of this hybrid method possible, for example, the scheme that assumes the averaging of the solutions obtained by semi-implicit and semi-explicit counterparts, or the direct composition scheme. However, despite both these variants being applicable, they are less numerically efficient than the blinking solver, and the parallel composition (i.e., averaging) will result in a non-symmetric scheme. Therefore, we believe that switching the right-hand side function is the most efficient approach to solving the convergence issue. Let us investigate the properties of the developed method further.
2.5. The Stability Analysis of the Semi-Explicit and Semi-Implicit Methods
Numerical stability is one of the crucial properties of numerical methods. The stability analysis of the proposed numerical scheme is possible while investigating a Dahlquist test problem of dimension 2 or higher due to the specific type of calculations of semi-implicit methods. Thus, one can analyze the methods’ numerical stability by applying the same technique as was previously shown in [
11]. Let us consider a two-dimensional test problem:
where the matrix
has complex conjugate eigenvalues. Let us construct matrix A with eigenvalues
in normal Jordan form:
One can find the stability region the same way as in the case of a one-dimensional Dahlquist test problem:
by expressing
and finding an area on a complex plane, where the maximum modulo eigenvalue of matrix
lies within a unit circle:
The real systems can possess an asymmetric matrix A, and to handle this issue we introduce the following parameters:
Definition 3. At , the matrix is the most asymmetric; specifically, it can be a matrix in the Frobenius normal form. At , the matrix A is the most symmetric, namely, the Jordan canonical form.
By varying the proposed parameters, one can find stability regions of the CD method with dependence on the matrix A symmetry, see
Figure 2:
The stability regions of the SIMP method are the same as for the CD method. This is because both of these methods have the identical expansion of the first principal terms in a Taylor series for a chosen test problem. Unlike semi-implicit methods, the SEMP integration technique has quite an unusual shape of its stability region, see
Figure 3:
Finally, for a newly developed “blinking” scheme the stability regions are as follows (
Figure 4).
Stability analysis shows that the “blinking” method possesses larger and fewer symmetry-dependent stability regions than its semi-implicit or semi-explicit counterparts.