# BVPs Codes for Solving Optimal Control Problems

^{1}

^{2}

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

`colsys/colnew`[5,6],

`twpbvp`[7],

`twpbvpl`[8],

`acdc`and

`colmod`[9],

`coldae`[10],

`mirkdc`[11] and

`BVP_M-2`[12,13] have been written in Fortran/Fortran90. A collection of the last releases of many of the cited Fortran codes, together with the driver that allows a common input definition, and a list of numerical examples arising in several applications are available in the web site Test set for BVP solvers [14,15].

`bvp4c`[16] and

`bvp5c`[17], for solving BVPs. Other interesting codes that are usable in Matlab are

`bvptwp`[18],

`TOM`[19],

`HOFiD_bvp`[20] and

`bvpSuite2.0`[21], based on the code

`sbvp`[22] for the solution of singular problems. The code

`bvpSuite2.0`could be used also for singular BVPs and differential algebraic problems of index 1. For the R community is instead available the package called

`bvpSolve`that allows the running in R of many of the available Fortran codes [4,23]. In Python the package

`scipy.integrate`includes the function

`solve_bvp`[24], a routine based on

`BVP_M-2`and similar to the

`bvp4c`Matlab code. All of them solve two-point boundary value problems, this means that applied to a second order boundary value problems, they transform the original problem into a system of first-order differential equations with boundary conditions, except for the collocation codes

`colsys, colnew, colmod, coldae`,

`bvpSuite`, and the high-order finite difference code

`HOFiD_bvp`, since each of them can be applied directly to higher order problems.

`bvptwp`and

`TOM`. We do not present the results for the collocation code

`bvpSuite2.0`because it does not give in output the same information of the other codes and it does not allow using a numerical Jacobian. For R-users all the examples could be solved using all the codes available in the

`bvpSolve`package. Since

`bvpSolve`run the Fortran codes by means of an interface, the results are the same obtained by the original Fortran codes.

## 2. Optimal Control Problems: Indirect Methods

## 3. Codes for BVPs

#### 3.1. Fortran Codes

`colsys`was written by U. Ascher, R. Matteij and R. Russell [5] and it is based on method of spline collocation at Gaussian points and solves mixed-order systems of multipoint BVPs, high-order equations, problems with non-separated boundary conditions and problems with singularity. The code computes the solution on a sequence of meshes that are refined using the equidistribution of error to satisfy the required input tolerance. The error estimate is obtained roughly at each step halving the mesh. The components of the collocation solution are expressed by B-spline basis, which are evaluated by the de Boor’s algorithms. Indeed, the damped Newton’s method of quasilinearization is used for solving the nonlinear problems.

`colnew`[6,30] is the descendant of

`colsys`and, contrary to this last, it uses a Runge–Kutta monomial representation for the piecewise polynomial solution, instead of B-spline basis. This change returns a code faster than the native version

`colsys`.

`twpbvp, twpbvpl`and

`acdc`were written by J. R. Cash and his collaborators. The code

`twpbvp`[7], differently from

`colsys`, uses mono-implicit Runge–Kutta formulae and a deferred correction method for solving two-point boundary value problems. The mono-implicit Runge–Kutta formulae are implemented applying the deferred correction procedure, which allows discovery of the solution of a high-order method using only low order schemes. The code guarantees to construct a mesh refinement that is very suitable for singular perturbation problems.

`twpbvpl`, differently from

`twpbvp`, is based on three Lobatto Runge–Kutta formulae of order 4, 6, 8, which are implemented using a suitable deferred correction scheme, solved with a damped Newton iteration scheme. The code is devoted in solving efficiently nonlinear stiff two-point boundary value problems.

`acdc`[9] has been developed from

`twpbvpl`including an automatic continuation strategy, implemented to suitably solve linear and nonlinear singular perturbation problems characterized from a small parameter $\u03f5$. The parameter $\u03f5$ often brings about stiffness in the problem, so that for a nonlinear problem a good initial solution is required to reach the convergence of the Newton method. The continuation strategy arises to overcome these matters, specifically it consists of selecting an initial perturbation parameter ${\u03f5}_{0}$, chosen to compute a solution of a problem not particularly stiff, usually for ${\u03f5}_{0}\approx 1$, and satisfying a certain exit tolerance $tol$. The idea is to obtain an initial rough profile of the solution of the problem for a desired perturbation parameter $\u03f5$. Then, chosen an integer ${N}_{\u03f5}$ the interval $[{\u03f5}_{0},\u03f5]$ is discretized in ${N}_{\u03f5}$ subintervals, so that

`acdc`${\u03f5}_{0}$ is set equal to 0.5 by default; however the suggestion is to consider ${\u03f5}_{0}$ as a value not extremely small allowing the obtaining of an accurate solution of the problem for that value of perturbation; The code

`acdc`chooses the sequences of parameters and the total number of continuation steps automatically. It is however possible to implement a continuation strategy for the other codes, in this case for ${N}_{\u03f5}$ it would be convenient to start with a small integer and then double or increment it, if the procedure does not converge.

`colmod`[9] is a modified version of the code

`colsys`using the same continuation strategy adopted in

`acdc`.

`twpbvpc`,

`twpbvplc`and

`acdcc`[14] are the modified version of the codes

`twpbvp, twpbvpl`and

`acdc`that implement a mesh selection strategy based on the estimation of the local error and of two conditioning parameters [31]. This hybrid mesh strategy has first been used in the Matlab code

`TOM`, described in the next section.

`mirkdc`written by W. Enright and P. Muir [11] uses MIRK method and controls the defect, also

`BVP_M-2`written by J.J. Boisvert, P. Muir and R. Spiteri [12] is based on MIRK methods, but this last controls both the defect and/or the global error, giving, moreover, information about the conditioning constant.

#### 3.2. Matlab Codes

`bvp4c`[33] and

`bvp5c`[34]. The code

`bvp4c`[16] is based on a collocation method with a ${\mathcal{C}}^{1}$ piecewise cubic polynomial, or equivalently on an implicit Runge–Kutta formula with a continuous extension, namely the collocation method is equivalent to a three-stages Lobatto IIIa implicit Runge–Kutta formula. This code implements a method of order four and solves a large class of BVP, such as equations with non-separated boundary conditions, singular problems, Sturm–Liouville problems. An advantage of this code is being able to compute numerical partial derivatives and use a vectorized finite difference Jacobian. Differently from the other codes the error estimation and the mesh selection are based on the residual estimation. We recall that if $S\left(x\right)$ approximates the solution $y\left(x\right)$, then the residual control in the differential equation ${y}^{\prime}\left(x\right)=f(x,y\left(x\right))$ is given by $r\left(x\right)=|{S}^{\prime}\left(x\right)-f(x,S\left(x\right))|$.

`bvp5c`is based on the four-stages Lobatto IIIa formula, giving a method of order five. Contrarily to

`bvp4c, bvp5c`controls the residual and the true approximate error. It is clear that if the BVP is well-conditioned a small residual implies a small true error, but this is not satisfied if the BVP is ill-conditioned, hence the strategy to control the residual and the true error is more efficient than the one applied in

`bvp4c`.

`TOM`and

`HOFiD_bvp`belong to the class of Boundary Value Methods [35], especially suitable for solving BVPs.

`TOM`[19], based on the TOP Order Methods and the BS method of order four, six, eight and ten distinguishes for the use of conditioning in the mesh selection strategy. In [36] the authors analyzed how the conditioning and the stiffness of a problem depend on the estimation of the following conditioning parameters:

- $\kappa $
- conditioning constant with respect to all type of perturbation, computed using the maximum norm;
- ${\kappa}_{1}$
- conditioning constant with respect to a perturbation of the boundary conditions, computed using the maximum norm;
- ${\kappa}_{2}$
- conditioning constant with respect to a perturbation of the differential problem, computed using the maximum norm;
- ${\gamma}_{1}$
- conditioning constant with respect to a perturbation of the boundary conditions, computed using the one norm;
- $\sigma $
- the stiffness ratio.

`HOFiD_bvp`[20] is based on high-order finite difference schemes (HOFiD) of order four, six, eight and ten, and an upwind method. Each derivative in the high-order boundary value problem is approximated directly by these schemes, hence it is not required any transformation of the problem in a system of first-order differential equations. The error estimation is computed applying the deferred correction technique to two consecutive order methods. The mesh selection is based on the error equidistribution. For nonlinear problems, the code uses a continuation strategy, as explained previously, and also combines an order variation strategy, this means that a solution of the problem obtained with a lower order and tolerance can be considered to be initial solution to run the code with higher order and tolerance. The strategy adopted returns a code suitable to solve high-order boundary value problems that can be singularly perturbed, singular, with discontinuous terms and multipoint. Other versions of the code solve singular second order initial value problems [38], Sturm–Liouville problems [39] and multi-parameters spectral problems [40].

`bvpSuite2.0`package, based on collocation methods. The collocation points could be chosen by the users among Gauss, Lobatto, uniform or user defined points. The code solves implicit BVPs, eigenvalue problems, differential algebraic problems of index 1 and it is particularly suited for singular problems.

`BvpSuite2.0`[21] is the evolution of two previous versions of the code with improved usability. The mesh selection strategy used is described in [41].

`bvptwp`[18] based on an efficient translation of the Fortran codes

`twpbvp, twpbvpl`and

`acdc`in the Matlab environment, which are named

`twpbvp_m, twpbvp_l, acdc`. Moreover, the Matlab package also contains the translation of the Fortran version of the same codes that use a hybrid mesh selection based on conditioning, similar to the one used in the code TOM, called

`twpbvpc_m, twpbvpc_l, acdcc`. The code

`bvptwp`is available on the calgo website and on the web-page called Test Set for BVP Solvers [15]. The version used in this paper is the release of May 2021.

#### 3.3. R Codes

`bvpSolve`[23], which, using an interface, implements all the Fortran codes introduced in Section 3.1.

#### 3.4. Experiments

`bvp4c, bvp5c`, and

`bvptwp`. For the last solver we consider all the codes available, i.e.,

`twpbvp_m, twpbvp_l, twpbvpc_m, twpbvpc_l, acdc, acdcc`. We also add the results obtained with the new release of the code

`TOM`(May 2021). This code allows the choice of a boundary value method of specific order and a mesh variation strategy. For all the examples we choose the BS method of order 4 and we denote by

`tom`the code run using a mesh variation for regular problems and by

`tomc`the one implementing a mesh variation suited for stiff problems. For R-users all the examples could be solved applying all the codes included in the

`bvpSolve`package. Since

`bvpSolve`runs the Fortran codes by an interface, the obtained results are similar to those computed by means of the original Fortran codes. We also observe that some of the codes considered here for the numerical tests are also present in the R package

`bvpSolve`rel. 1.4.2. The R version of these codes on the same examples show comparable results.

`twpbvpc_l`using a doubled mesh and a halved input tolerance. For all the codes we give in input equal absolute and relative tolerances. If the codes

`twpbvp_m/twpbvpc_m, twpbvp_l/twpbvpc_l, acdc/acdcc`give the same results we report only one result in the tables. If a code cannot solve the problem, we put * in the tables.

## 4. Hypersensitive Optimal Control Problems

#### 4.1. Nonlinear Mass Spring System with Quadratic Cost

`acdc`and

`acdcc`, since for this formulation of the problem there is not a parameter to be used for continuation. If on one hand, for $T=20$ all the methods converge to the solution, and for $T=2\times {10}^{4}$ only the codes bvp4c and bvp5 fail, on the other hand for $T=2\times {10}^{6}$ no one goes to convergence except the codes tom and tomc (see Table 2). Essentially, there are some troubles with a singular Jacobian for

`bvp4c`and

`bvp5c`, or a drawback with the maximum number of mesh points allowed with the other codes. In the last case we could increase the maximum value of mesh points; however, we will try to differently overcome this matter and to debunk the idea that the indirect methods are not as competitive as direct ones.

`bvp5c`using 501 or 1001 initial equidistant points and $T=2\times {10}^{4}$. This strategy is advantageous for

`bvp5c`, not yet for bvp4c, that needs an initial mesh of 2501 mesh points to reach the convergence. However, we observe that

`bvp5c`is not able to reach convergence if we use an initial mesh of 2501 mesh points. For the other classes of methods increasing the number of mesh points is not advantageous in terms of computational cost and time execution.

`twpbvpc_m`and

`tomc`, reported in Table 5. As we can see the stiffness parameter $\sigma $ grows with the width of the interval, and depends on this last, moreover ${\kappa}_{2}>{\kappa}_{1}$ shows that the problem could be ill posed, and ${\gamma}_{1}$ tending to zeros shows the presence of different time scales. The transformation of time interval in $[0,1]$ does not change the stiffness of the problem, but the problem is well posed (see Table 6).

#### 4.2. Completely Hypersensitive Control Problem

`bvp4c`and

`bvp5c`, which are not suitable for stiff problems, indeed we underline as they converge to the solution respectively up to $T=38$ and $T=29$.

`acdc`and

`acdcc`, using an automatic continuation strategy, needs only to insert the desired value of $\u03f5$ and uses as ${\u03f5}_{0}$ the default value $0.5$. The numerical tests and the conditioning parameters in Table 8 and Table 10 clearly show that for this class of problems, if we cannot use a continuation of parameters, the codes able to give a solution are the ones suited for stiff problems that work still better if also the mesh selection is appropriate for this class of problems.

## 5. Bang-Bang Optimal Control Problem

`bvp5c`fails, and for getting the solution is necessary to use the continuation strategy. To this regard we consider as initial perturbation parameter ${\u03f5}_{0}=1$ and then we change it choosing ${N}_{\u03f5}=10$ logarithmically equispaced points between 1 and the value required $\u03f5$. When $tol={10}^{-4}$

`bvp5c`converges using 19 points for both $\u03f5$ equal to ${10}^{-3}$ and ${10}^{-6}$, instead when $tol={10}^{-4}$

`bvp5c`gets the solution with 36 and 28 points respectively for $\u03f5={10}^{-3}$ and $\u03f5={10}^{-6}$.

`bvp4c`and

`bvp5c`because they fail. To overcome this drawback in Table 13 we consider the continuation strategy, this means that the codes bvp4c and bvp5c are run for different values of $\u03f5$ starting from ${\u03f5}_{0}=10$ up to the desired value $\u03f5$. In particular, we choose ${N}_{\u03f5}=10$ values logarithmically equispaced.

`acdc`and

`acdcc`that use an automatic continuation strategy. The results point out the suitability and efficiency of the strategy in solving this kind of problems, also for

`bvp4c`and

`bvp5c`when the nonlinear solution is approximated using a continuation strategy. The conditioning parameters reported in Table 14 and Table 15 show that the problem is not stiff since $\sigma $ is of moderate size, indeed the main difficulty is caused by the convergence of the nonlinear discretization schemes. In this regard we highlight as the results of the codes

`twpbvpc_m`and

`twpbvpc_l`are the same of those gained by the codes

`twpbvp_m`and

`twpbvp_l`, confirming the non-necessity of these codes to use a mesh selection strategy based on conditioning for this non-stiff problem.

## 6. Longitudinal Dynamics of a Vehicle

`bvptwp`package are able to give a solution for $\u03f5={10}^{-6}$, so for the other codes we have used a continuation strategy with a starting value ${\u03f5}_{0}={10}^{-3}$ and ${N}_{\u03f5}=10$ logarithmic equispaced intermediate points. In Table 16 all the results obtained are shown in order that the symbol c in bracket labels those computed using the continuation strategy. Moreover, the results emphasize that not always the automatic continuation is advantageous and cheaper from a computational cost of view, since it is evident that the total number of vectorial functions evaluation is much greater for

`acdc`than for

`twpbvp_m`and

`twpbvp_l`. Remember that they use the same numerical scheme. The conditioning parameters in Table 17 are all moderate size, hence the problem is not stiff.

## 7. Gottard Rocket

`bvp5c, tom`and

`tomc`fail for $\u03f5={10}^{-3}$, on the other all the codes do not converge for $\u03f5={10}^{-6}$. Consequently, in Table 19 we run the codes using the continuation strategy. All the numerical tests use an initial mesh of 16 equidistant points. For the continuation strategy in Table 19, except for

`acdc`and

`acdcc`, the parameter $\u03f5$ is initially set to ${\u03f5}_{0}={10}^{-1}$ ( ${\u03f5}_{0}=1$ for

`tom`and

`tomc`), and then it is changed using ${N}_{\u03f5}=10$ logarithmically equispaced values up to reach the value required $\u03f5$. However, to obtain the convergence of

`bvp4c`for $\u03f5={10}^{-6}$, we put the value of ${N}_{\u03f5}=100$ when $tol={10}^{-4}$ and ${N}_{\u03f5}=20$ when $tol={10}^{-6}$ and for

`tom/tomc`we put the value of ${N}_{\u03f5}=55$. The conditioning parameters reported in Table 20 show that the problem is not stiff, but it is ill conditioned since ${\kappa}_{1}>{\kappa}_{2}$.

## 8. Minimization of the Fuel Cost in the Operation of a Train

`tom/tomc`for which we need to consider for the convergence ${N}_{\u03f5}=10$. Our interest is to analyze the performance of the codes for small perturbation parameters, as $\u03f5={10}^{-2},{10}^{-3}$, requiring an exit tolerance $tol={10}^{-3}$. In Figure 6 we show the solution for $\u03f5={10}^{-2}$. The conditioning parameters in Table 23 suggest that the problem is ill conditioned but not stiff, in fact $\kappa ,{\kappa}_{1},{\kappa}_{2},{\gamma}_{1}$ are all much greater than 1. The condition number of the matrix of the last step of the integration procedure (last column of Table 23) is very high and confirms the ill-conditioning of the problem.

## 9. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Conflicts of Interest

## References

- Bellman, R. Dynamic Programming; Princeton University Press: Princeton, NJ, USA, 1957. [Google Scholar]
- Biral, F.; Bertolazzi, E.; Bosetti, P. Notes on Numerical Methods for Solving Optimal Control Problems. IEEE J. Ind. Appl.
**2016**, 5, 154–166. [Google Scholar] [CrossRef][Green Version] - Rao, A.V. A Survey of Numerical Methods for Optimal Control (AAS 09-334). In Astrodynamics 2009, Proceedings of the AAS/AIAA Astrodynamics Specialist Conference, Pittsburgh, PA, USA, 9–13 August 2009; American Astronautical Society by Univelt: San Diego, CA, USA, 2010; pp. 497–528. [Google Scholar]
- Soetaert, K.; Cash, J.; Mazzia, F. Solving Differential Equations in R; Springer: Berlin/Heidelberg, Germany, 2012. [Google Scholar]
- Ascher, U.; Christiansen, J.; Russell, R.D. Collocation software for boundary value odes. ACM Trans. Math. Softw.
**1981**, 7, 209–222. [Google Scholar] [CrossRef] - Ascher, U.M.; Mattheij, R.M.M.; Russell, R.D. Numerical Solution of Boundary Value Problems for Ordinary Differential Equations; Classics in Applied Mathematics Series; SIAM: Philadelphia, PA, USA, 1995; Volume 13. [Google Scholar]
- Cash, J.R.; Wright, M.H. A Deferred Correction Method for Nonlinear Two-Point Boundary Value Problems: Implementation and Numerical Evaluation. SIAM J. Sci. Statist. Comput.
**1991**, 12, 971–989. [Google Scholar] [CrossRef] - Bashir-Ali, Z.; Cash, J.R.; Silva, H.H.M. Lobatto deferred correction for stiff two-point boundary value problems. Comput. Math. Appl.
**1998**, 36, 59–69. [Google Scholar] [CrossRef][Green Version] - Cash, J.R.; Moore, G.; Wright, R. An automatic continuation strategy for the solution of singularly perturbed nonlinear boundary value problems. ACM Trans. Math. Softw.
**2001**, 27, 245–266. [Google Scholar] [CrossRef] - Ascher, U.M.; Spiteri, R.J. Collocation software for boundary value differential-algebraic equations. SIAM J. Sci. Comput.
**1994**, 15, 938–952. [Google Scholar] [CrossRef] - Enright, W.H.; Muir, P.H. Runge-Kutta software with defect control for boundary value odes. SIAM J. Sci. Comput.
**1996**, 17, 479–497. [Google Scholar] [CrossRef] - Boisvert, J.J.; Muir, P.H.; Spiteri, R.J. A Runge-Kutta BVODE solver with global error and defect control. ACM Trans. Math. Softw.
**2013**, 39, 11. [Google Scholar] [CrossRef] - Boisvert, J.J.; Muir, P.H.; Spiteri, R.J. BVP_SOLVER-2. Available online: https://cs.stmarys.ca/~muir/BVP_SOLVER_Webpage.shtm (accessed on 25 May 2021).
- Mazzia, F.; Cash, J.R. A Fortran test set for boundary value problem solvers. AIP Conf. Proc.
**2015**, 1648, 020009. [Google Scholar] [CrossRef] - Test Set for BVP Solver. Available online: https://archimede.dm.uniba.it/~bvpsolvers/testsetbvpsolvers/?page_id=27 (accessed on 26 February 2021).
- Kierzenka, J.; Shampine, L.F. A BVP solver based on residual control and the MATLAB pse. ACM Trans. Math. Softw.
**2001**, 27, 299–316. [Google Scholar] [CrossRef] - Kierzenka, J.; Shampine, L.F. A BVP solver that controls residual and error. J. Numer. Anal. Ind. Appl. Math.
**2008**, 3, 27–41. [Google Scholar] - Cash, J.R.; Hollevoet, D.; Mazzia, F.; Nagy, A.M. Algorithm 927: The MATLAB Code bvptwp.m for the Numerical Solution of Two Point Boundary Value Problems. ACM Trans. Math. Softw.
**2013**, 39, 15. [Google Scholar] [CrossRef] - Mazzia, F.; Sestini, A.; Trigiante, D. The continous extension of the B-spline linear multistep metods for BVPs on non-uniform meshes. Appl. Numer. Math.
**2009**, 59, 723–738. [Google Scholar] [CrossRef] - Amodio, P.; Settanni, G. A finite differences MATLAB code for the numerical solution of second order singular perturbation problems. J. Comput. Appl. Math.
**2012**, 236, 3869–3879. [Google Scholar] [CrossRef][Green Version] - Auzinger, W.; Fallahpour, M.; Koch, O.; Weinmüller, E.B. Implementation of a pathfollowing strategy with an automatic step-length control: New MATLAB package bvpsuite2.0. Tech. Rep. ASC. 2019. Available online: https://www.asc.tuwien.ac.at/~ewa/software_development5.htm/ (accessed on 25 May 2021).
- Auzinger, W.; Kneisl, G.; Koch, O.; Weinmüller, E.B. A Collocation Code for Boundary Value Problems in Ordinary Differential Equations. Numer. Algorithm.
**2003**, 33, 27–39. [Google Scholar] [CrossRef] - Mazzia, F.; Cash, J.R.; Soetaert, K. Solving boundary value problems in the open source software R: Package bvpSolve. Opuscula Math.
**2014**, 34, 387–403. [Google Scholar] [CrossRef][Green Version] - scipy.integrate.solve_bvp. Available online: https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.solve_bvp.html (accessed on 25 May 2021).
- De Marinis, A.; Iavernaro, F.; Mazzia, F. A minimum-time obstacle-avoidance path planning algorithm for UAVs. Numer. Algor.
**2021**. [Google Scholar] [CrossRef] - Zong, L.; Luo, J.; Wang, M. Optimal Concurrent Control for Space Manipulators Rendezvous and Capturing Targets under Actuator Saturation. IEEE Trans. Aerosp. Electron. Syst.
**2020**, 56, 4841–4855. [Google Scholar] [CrossRef] - Zong, L.; Emami, M.R. Concurrent base-arm control of space manipulators with optimal rendezvous trajectory. Aerosp. Sci. Technol.
**2020**, 100, 105822. [Google Scholar] [CrossRef] - Putkaradze, V.; Rogers, S. Constraint Control of Nonholonomic Mechanical Systems. J. Nonlinear Sci.
**2018**, 28, 193–234. [Google Scholar] [CrossRef] - Gerdts, M. Optimal Control of ODEs and DAEs; De Gruyter Textbook: Berlin, Germany, 2012. [Google Scholar]
- Bader, G.; Ascher, U. A New Basis Implementation for a Mixed Order Boundary Value ODE Solver. SIAM J. Sci. Stat. Comput.
**1987**, 8, 483–500. [Google Scholar] [CrossRef] - Capper, S.; Cash, J.; Mazzia, F. On the development of effective algorithms for the numerical solution of singularly perturbed two-point boundary value problems. Int. J. Comput. Sci. Math.
**2007**, 1, 42–57. [Google Scholar] [CrossRef] - Cash, J.R.; Mazzia, F. Efficient global methods for the numerical solution of nonlinear systems of two point boundary value problems. In Recent Advances in Computational and Applied Mathematics; Simos, T., Ed.; Springer: Dordrecht, The Netherlands, 2011; pp. 23–39. [Google Scholar] [CrossRef]
- Kierzenka, J. Tutorial on Solving BVPs with BVP4C. MATLAB Central File Exchange. Available online: https://www.mathworks.com/matlabcentral/fileexchange/3819-tutorial-on-solving-bvps-with-bvp4c) (accessed on 25 February 2021).
- bvp5c. Help MATLAB. Available online: https://www.mathworks.com/help/matlab/ref/bvp5c.html (accessed on 25 February 2021).
- Brugnano, L.; Trigiante, D. Differential Problems by Multistep Initial and Boundary Value Methods; Gordon and Breach Science Publishers: Amsterdam, The Netherland, 1998. [Google Scholar]
- Mazzia, F.; Trigiante, D. A hybrid mesh selection strategy based on conditioning for boundary value ODE problems. Numer. Algorithms
**2004**, 36, 169–187. [Google Scholar] [CrossRef] - Cash, J.R.; Mazzia, F. Conditioning and hybrid mesh selection algorithms for two-point boundary value problems. Scalable Comput.
**2009**, 10, 347–361. [Google Scholar] - Amodio, P.; Budd, C.J.; Koch, O.; Settanni, G.; Weinmüller, E.B. Asymptotical computations for a model of flow in satured porous media. Appl. Math. Comput.
**2014**, 237, 155–167. [Google Scholar] - Amodio, P.; Settanni, G. Variable-step finite difference schemes for the solution of Sturm-Liouville problems. Commun. Nonlinear Sci.
**2015**, 20, 641–649. [Google Scholar] [CrossRef][Green Version] - Amodio, P.; Settanni, G. Numerical Strategies for Solving Multiparameter Spectral Problems. In Proceedings of the Numerical Computations: Theory and Algorithms, NUMTA 2019, Crotone, Italy, 15–21 June 2019; Sergeyev, Y., Kvasov, D., Eds.; Lecture Notes in Computer Science. 2020; Volume 11974, pp. 298–305. [Google Scholar]
- Pulverer, G.; Söderlind, G.; Weinmüller, E. Automatic grid control in adaptive BVP solvers. Numer. Algorithm.
**2011**, 56, 61–92. [Google Scholar] [CrossRef][Green Version] - Rao, A.V.; Mease, K.D. Eigenvector approximate dichotomic basis method for solving hyper-sensitive optimal control problems. Optim. Control Appl. Methods
**2000**, 21, 1–19. [Google Scholar] [CrossRef] - Aykutlug, E.; Topcu, U.; Mease, K.D. Manifold-Following Approximate Solution of Completely Hypersensitive Optimal Control Problems. J. Optim. Theory Appl.
**2016**, 170, 220–242. [Google Scholar] [CrossRef] - ICLOCS2 (Version 2.5). Imperial College London Optimal Control Software. Available online: http://www.ee.ic.ac.uk/ICLOCS/default.htm (accessed on 2 February 2021).
- Bertolazzi, E.; Biral, F. Approximating Bang–Bang solutions in optimal control with indirect methods. In Proceedings of the Multibody Dynamics 2007, ECCOMAS Thematic Conference, Milan, Italy, 25–28 June 2007; Bottasso, C.L., Masarati, P., Trainelli, L., Eds.; Dipartimento di Ingegneria Aerospaziale, Politecnico: Milano, Italy, 2007. [Google Scholar]
- Dolan, E.D.; Moré, J.J.; Munson, T.S. Benchmarking Optimization Software with COPS 3.0; Technical Memorandum ANL/MCS-TM-273; Argonne National Laboratory, Mathematica and Computer Science, Division: Lemont, IL, USA, 2004.
- Vanderbei, R.J. Cases Studies in Trajectory Optimization: Trains, Planes, and other Pastimes. Optim. Eng.
**2001**, 2, 215–243. [Google Scholar] [CrossRef]

**Figure 1.**Mass spring: solution in time for the mass position x on the left and the control u on the right. Final time $T=20$ (blue line) and $T=40$ (red dash-dot line).

**Figure 2.**Hypersensitive: solution in time for the mass position x on the left and the control u on the right, final time $T={10}^{4}$.

**Figure 3.**Bang-Bang, $\u03f5={10}^{-3}$: solution in time for the mass position x on the (

**left**), for the velocity in the (

**center**) and the control u on the (

**right**).

**Figure 4.**Longitudinal dynamics of a vehicle, $\u03f5={10}^{-3}$, $T=10$, $g=9.81$, ${k}_{0}=0.02\phantom{\rule{0.166667em}{0ex}}g$, ${k}_{1}={10}^{-5}g$, ${k}_{2}=0$, ${k}_{3}=0$: theoretical (dash-dot line) and numerical (dot line) solution in time for the control u.

**Figure 5.**Goddard rocket, $\u03f5={10}^{-3}$, $\overline{\sigma}={10}^{-4}$: from left to right solutions in time for altitude h and mass m (on the

**top**), for velocity v and thrust u (on the

**bottom**).

**Figure 6.**Minimization of the fuel cost in the operation of a train $\u03f5={10}^{-2}$: from left to right solutions in time for the position x, the velocity v and the difference between the control variables representing the acceleration and the deceleration ${u}_{a}-{u}_{b}$.

**Table 1.**Nonlinear Mass spring: final mesh (fM), total number of vectorized function evaluation (NVF) and mixed errors for $x,v,u$. The solution is computed starting from an initial mesh with 16 equidistant points.

$\mathit{t}\mathit{o}\mathit{l}={10}^{-4}$ | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|

$\mathit{T}=20$ | $\mathit{T}=2\times {10}^{4}$ | |||||||||

fM | NVF | Error x | Error v | Error u | fM | NVF | Error x | Error v | Error u | |

bvp4c | 71 | 35 | $6.0\times {10}^{-6}$ | $9.8\times {10}^{-6}$ | $1.7\times {10}^{-5}$ | * | * | * | * | * |

bvp5c | 294 | 1001 | $9.0\times {10}^{-9}$ | $2.0\times {10}^{-8}$ | $4.7\times {10}^{-8}$ | * | * | * | * | * |

twpbvp_m | 23 | 52 | $2.5\times {10}^{-6}$ | $4.4\times {10}^{-6}$ | $4.8\times {10}^{-6}$ | 158 | 263 | $3.8\times {10}^{-6}$ | $2.4\times {10}^{-6}$ | $3.0\times {10}^{-7}$ |

twpbvpc_m | 38 | 52 | $2.4\times {10}^{-6}$ | $4.5\times {10}^{-6}$ | $5.1\times {10}^{-6}$ | 201 | 246 | $1.2\times {10}^{-6}$ | $1.7\times {10}^{-6}$ | $2.3\times {10}^{-6}$ |

twpbvp_l | 27 | 54 | $1.7\times {10}^{-6}$ | $2.1\times {10}^{-6}$ | $4.4\times {10}^{-6}$ | 97 | 200 | $6.9\times {10}^{-6}$ | $1.1\times {10}^{-5}$ | $3.2\times {10}^{-5}$ |

twpbvpc_l | 27 | 54 | $1.7\times {10}^{-6}$ | $2.1\times {10}^{-6}$ | $4.4\times {10}^{-6}$ | 104 | 246 | $5.7\times {10}^{-6}$ | $6.2\times {10}^{-6}$ | $2.8\times {10}^{-5}$ |

tom | 116 | 14 | $2.8\times {10}^{-6}$ | $1.7\times {10}^{-6}$ | $3.1\times {10}^{-6}$ | 426 | 30 | $7.7\times {10}^{-6}$ | $4.5\times {10}^{-6}$ | $7.6\times {10}^{-6}$ |

tomc | 136 | 16 | $1.2\times {10}^{-6}$ | $1.6\times {10}^{-6}$ | $2.4\times {10}^{-6}$ | 526 | 41 | $7.5\times {10}^{-7}$ | $1.1\times {10}^{-6}$ | $1.5\times {10}^{-6}$ |

$\mathit{t}\mathit{o}\mathit{l}={\mathbf{10}}^{-\mathbf{6}}$ | ||||||||||

bvp4c | 254 | 49 | $2.4\times {10}^{-8}$ | $6.6\times {10}^{-8}$ | $1.5\times {10}^{-7}$ | * | * | * | * | * |

bvp5c | 392 | 1221 | $1.2\times {10}^{-10}$ | $1.2\times {10}^{-10}$ | $1.7\times {10}^{-10}$ | * | * | * | * | * |

twpbvp_m | 42 | 50 | $1.1\times {10}^{-8}$ | $1.3\times {10}^{-8}$ | $2.3\times {10}^{-8}$ | 254 | 271 | $1.3\times {10}^{-7}$ | $1.0\times {10}^{-7}$ | $1.1\times {10}^{-7}$ |

twpbvpc_m | 57 | 73 | $3.2\times {10}^{-8}$ | $4.4\times {10}^{-8}$ | $5.0\times {10}^{-8}$ | 306 | 306 | $8.1\times {10}^{-7}$ | $7.1\times {10}^{-7}$ | $6.3\times {10}^{-7}$ |

twpbvp_l | 48 | 78 | $2.0\times {10}^{-8}$ | $1.9\times {10}^{-8}$ | $2.3\times {10}^{-8}$ | 152 | 207 | $1.7\times {10}^{-8}$ | $2.2\times {10}^{-8}$ | $2.5\times {10}^{-8}$ |

twpbvpc_l | 58 | 78 | $2.0\times {10}^{-8}$ | $1.9\times {10}^{-8}$ | $2.3\times {10}^{-8}$ | 136 | 253 | $1.7\times {10}^{-8}$ | $2.2\times {10}^{-8}$ | $2.5\times {10}^{-8}$ |

tom | 196 | 19 | $1.6\times {10}^{-7}$ | $2.2\times {10}^{-7}$ | $2.8\times {10}^{-7}$ | 481 | 33 | $4.5\times {10}^{-7}$ | $4.1\times {10}^{-7}$ | $5.1\times {10}^{-7}$ |

tomc | 166 | 17 | $7.2\times {10}^{-7}$ | $6.8\times {10}^{-7}$ | $7.4\times {10}^{-7}$ | 511 | 44 | $2.1\times {10}^{-7}$ | $2.7\times {10}^{-7}$ | $3.1\times {10}^{-7}$ |

**Table 2.**Nonlinear Mass spring, $T=2\times {10}^{6}$: final mesh (fM), total number of vectorized function evaluation (NVF) and mixed errors for $x,v,u$, initial mesh with 16 equidistant points.

fM | NVF | Error x | Error v | Error u | fVM | NVF | Error x | Error v | Error u | |
---|---|---|---|---|---|---|---|---|---|---|

tom | 6266 | 256 | $6.4\times {10}^{-7}$ | $8.9\times {10}^{-7}$ | $1.1\times {10}^{-6}$ | 6266 | 256 | $6.4\times {10}^{-7}$ | $8.9\times {10}^{-7}$ | $1.1\times {10}^{-6}$ |

tomc | 1291 | 177 | $6.6\times {10}^{-7}$ | $7.5\times {10}^{-7}$ | $1.4\times {10}^{-6}$ | 1236 | 180 | $1.7\times {10}^{-7}$ | $1.6\times {10}^{-7}$ | $1.8\times {10}^{-7}$ |

**Table 3.**Nonlinear Mass spring, initial mesh (IM) with 501, 1001 and 2501 equidistant points and $T=2\times {10}^{4}$: final mesh (fM), total number of vectorized function evaluation (NVF) and mixed errors for $x,v,u$.

IM | fM | NVF | Error x | Error v | Error u | |
---|---|---|---|---|---|---|

bvp4c | 2501 | 421 | 57 | $9.5\times {10}^{-6}$ | $1.1\times {10}^{-5}$ | $1.0\times {10}^{-5}$ |

bvp5c | 501 | 261 | 7200 | $4.2\times {10}^{-6}$ | $4.9\times {10}^{-6}$ | $4.8\times {10}^{-6}$ |

bvp5c | 1001 | 641 | 13,088 | $4.1\times {10}^{-6}$ | $4.7\times {10}^{-6}$ | $4.6\times {10}^{-6}$ |

$\mathit{t}\mathit{o}\mathit{l}={\mathbf{10}}^{-\mathbf{6}}$ | ||||||

bvp4c | 2501 | 471 | 71 | $1.4\times {10}^{-7}$ | $1.4\times {10}^{-7}$ | $1.5\times {10}^{-7}$ |

bvp5c | 501 | 333 | 7578 | $3.9\times {10}^{-8}$ | $5.7\times {10}^{-8}$ | $6.1\times {10}^{-8}$ |

bvp5c | 1001 | 512 | 13,880 | $3.9\times {10}^{-8}$ | $5.7\times {10}^{-8}$ | $6.1\times {10}^{-8}$ |

**Table 4.**Nonlinear Mass spring using the variable $\tau =t/T$, initial mesh with starting mesh with 11 equidistant points and continuation strategy on $\u03f5=1/T$, final mesh (fM), total number of vectorized function evaluation (NVF) and mixed errors for $x,v,u$.

$\mathit{t}\mathit{o}\mathit{l}={10}^{-4}$ | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

$\mathit{T}=20$ | $\mathit{T}=2\times {10}^{4}$ | $\mathit{T}=2\times {10}^{6}$ | |||||||||||||

fM | NVF | Error x | Error v | Error u | fM | NVF | Error x | Error v | Error u | fM | NVF | Error x | Error v | Error u | |

bvp4c | 78 | 45 | $6.3\times {10}^{-6}$ | $9.6\times {10}^{-6}$ | $2.8\times {10}^{-5}$ | 199 | 178 | $4.3\times {10}^{-4}$ | $4.5\times {10}^{-4}$ | $5.9\times {10}^{-4}$ | 2093 | 334 | $2.5\times {10}^{-3}$ | $3.5\times {10}^{-3}$ | $3.5\times {10}^{-3}$ |

bvp5c | 38 | 220 | $1.6\times {10}^{-6}$ | $1.1\times {10}^{-6}$ | $9.5\times {10}^{-7}$ | 148 | 1658 | $3.3\times {10}^{-6}$ | $7.1\times {10}^{-6}$ | $8.4\times {10}^{-6}$ | 1784 | 11,712 | $3.0\times {10}^{-6}$ | $4.5\times {10}^{-6}$ | $4.8\times {10}^{-6}$ |

twpbvp_m | 24 | 56 | $1.4\times {10}^{-6}$ | $9.2\times {10}^{-7}$ | $1.3\times {10}^{-6}$ | 137 | 233 | $6.8\times {10}^{-5}$ | $8.2\times {10}^{-5}$ | $9.2\times {10}^{-5}$ | 163 | 358 | $2.6\times {10}^{-6}$ | $2.9\times {10}^{-6}$ | $2.9\times {10}^{-6}$ |

twpbvpc_m | 39 | 81 | $3.2\times {10}^{-6}$ | $1.9\times {10}^{-6}$ | $2.3\times {10}^{-6}$ | 421 | 221 | $3.5\times {10}^{-6}$ | $2.6\times {10}^{-6}$ | $2.0\times {10}^{-6}$ | 141 | 335 | $2.5\times {10}^{-5}$ | $4.8\times {10}^{-5}$ | $6.8\times {10}^{-5}$ |

twpbvp_l | 28 | 51 | $6.3\times {10}^{-6}$ | $9.6\times {10}^{-6}$ | $2.8\times {10}^{-5}$ | 76 | 346 | $1.1\times {10}^{-5}$ | $1.4\times {10}^{-5}$ | $1.9\times {10}^{-5}$ | 83 | 557 | $1.1\times {10}^{-5}$ | $1.4\times {10}^{-5}$ | $1.9\times {10}^{-5}$ |

twpbvpc_l | 28 | 51 | $6.3\times {10}^{-6}$ | $9.6\times {10}^{-6}$ | $2.8\times {10}^{-5}$ | 102 | 237 | $6.0\times {10}^{-6}$ | $9.4\times {10}^{-6}$ | $1.1\times {10}^{-5}$ | 139 | 343 | $6.0\times {10}^{-6}$ | $9.4\times {10}^{-6}$ | $1.1\times {10}^{-5}$ |

tom | 156 | 16 | $7.3\times {10}^{-7}$ | $1.2\times {10}^{-6}$ | $1.5\times {10}^{-6}$ | 481 | 49 | $1.1\times {10}^{-5}$ | $6.7\times {10}^{-6}$ | $1.1\times {10}^{-5}$ | 711 | 73 | $7.0\times {10}^{-7}$ | $6.9\times {10}^{-7}$ | $8.1\times {10}^{-7}$ |

tomc | 141 | 16 | $1.6\times {10}^{-6}$ | $1.1\times {10}^{-6}$ | $2.6\times {10}^{-6}$ | 681 | 31 | $1.6\times {10}^{-6}$ | $2.1\times {10}^{-6}$ | $2.4\times {10}^{-6}$ | 1356 | 49 | $9.0\times {10}^{-8}$ | $1.7\times {10}^{-7}$ | $2.4\times {10}^{-7}$ |

acdc | 25 | 155 | $2.8\times {10}^{-5}$ | $2.7\times {10}^{-5}$ | $3.0\times {10}^{-5}$ | 66 | 485 | $2.6\times {10}^{-6}$ | $4.0\times {10}^{-6}$ | $6.2\times {10}^{-6}$ | 110 | 749 | $2.9\times {10}^{-6}$ | $1.6\times {10}^{-6}$ | $3.3\times {10}^{-6}$ |

acdcc | 25 | 155 | $2.8\times {10}^{-5}$ | $2.7\times {10}^{-5}$ | $3.0\times {10}^{-5}$ | 106 | 375 | $2.3\times {10}^{-5}$ | $1.4\times {10}^{-5}$ | $1.5\times {10}^{-5}$ | 176 | 501 | $2.3\times {10}^{-5}$ | $3.0\times {10}^{-5}$ | $3.7\times {10}^{-5}$ |

$\mathit{t}\mathit{o}\mathit{l}={\mathbf{10}}^{-\mathbf{6}}$ | |||||||||||||||

bvp4c | 296 | 57 | $2.6\times {10}^{-8}$ | $2.5\times {10}^{-8}$ | $2.8\times {10}^{-8}$ | 319 | 160 | $1.6\times {10}^{-6}$ | $2.0\times {10}^{-6}$ | $2.6\times {10}^{-6}$ | 374 | 280 | $1.5\times {10}^{-5}$ | $1.6\times {10}^{-5}$ | $1.7\times {10}^{-5}$ |

bvp5c | 87 | 464 | $1.2\times {10}^{-8}$ | $9.3\times {10}^{-9}$ | $4.9\times {10}^{-9}$ | 203 | 3535 | $1.4\times {10}^{-8}$ | $1.9\times {10}^{-8}$ | $2.7\times {10}^{-8}$ | 1305 | 19,524 | $2.5\times {10}^{-8}$ | $4.0\times {10}^{-8}$ | $4.4\times {10}^{-8}$ |

twpbvp_m | 39 | 83 | $8.2\times {10}^{-8}$ | $8.7\times {10}^{-8}$ | $9.5\times {10}^{-8}$ | 178 | 341 | $7.0\times {10}^{-8}$ | $8.8\times {10}^{-8}$ | $9.2\times {10}^{-8}$ | 497 | 459 | $5.4\times {10}^{-9}$ | $7.1\times {10}^{-9}$ | $8.3\times {10}^{-9}$ |

twpbvpc_m | 50 | 83 | $8.2\times {10}^{-8}$ | $8.7\times {10}^{-8}$ | $9.5\times {10}^{-8}$ | 190 | 255 | $7.9\times {10}^{-8}$ | $5.5\times {10}^{-8}$ | $6.4\times {10}^{-8}$ | 423 | 375 | $8.1\times {10}^{-9}$ | $8.1\times {10}^{-9}$ | $8.9\times {10}^{-9}$ |

twpbvp_l | 50 | 90 | $9.8\times {10}^{-9}$ | $1.1\times {10}^{-8}$ | $1.2\times {10}^{-8}$ | 114 | 284 | $1.9\times {10}^{-8}$ | $2.5\times {10}^{-8}$ | $1.0\times {10}^{-7}$ | 103 | 446 | $1.0\times {10}^{-8}$ | $1.1\times {10}^{-8}$ | $1.7\times {10}^{-8}$ |

twpbvpc_l | 61 | 90 | $9.8\times {10}^{-9}$ | $1.1\times {10}^{-8}$ | $1.2\times {10}^{-8}$ | 120 | 246 | $2.4\times {10}^{-8}$ | $2.2\times {10}^{-8}$ | $3.3\times {10}^{-8}$ | 127 | 350 | $2.4\times {10}^{-8}$ | $2.2\times {10}^{-8}$ | $3.3\times {10}^{-8}$ |

tom | 161 | 17 | $8.0\times {10}^{-7}$ | $1.3\times {10}^{-6}$ | $1.6\times {10}^{-6}$ | 426 | 62 | $5.8\times {10}^{-7}$ | $7.6\times {10}^{-7}$ | $9.4\times {10}^{-7}$ | 751 | 95 | $2.1\times {10}^{-7}$ | $2.6\times {10}^{-7}$ | $2.9\times {10}^{-7}$ |

tomc | 186 | 19 | $2.1\times {10}^{-7}$ | $4.1\times {10}^{-7}$ | $4.5\times {10}^{-7}$ | 831 | 36 | $2.4\times {10}^{-7}$ | $2.0\times {10}^{-7}$ | $2.5\times {10}^{-7}$ | 826 | 56 | $2.2\times {10}^{-7}$ | $2.3\times {10}^{-7}$ | $2.6\times {10}^{-7}$ |

acdc | 50 | 158 | $1.4\times {10}^{-8}$ | $1.8\times {10}^{-8}$ | $2.1\times {10}^{-8}$ | 95 | 382 | $1.0\times {10}^{-8}$ | $1.8\times {10}^{-8}$ | $2.0\times {10}^{-8}$ | 89 | 581 | $2.7\times {10}^{-8}$ | $3.8\times {10}^{-8}$ | $4.4\times {10}^{-8}$ |

acdcc | 50 | 158 | $1.4\times {10}^{-8}$ | $1.8\times {10}^{-8}$ | $2.1\times {10}^{-8}$ | 183 | 371 | $1.8\times {10}^{-7}$ | $2.0\times {10}^{-7}$ | $2.1\times {10}^{-7}$ | 184 | 513 | $1.8\times {10}^{-7}$ | $2.0\times {10}^{-7}$ | $2.1\times {10}^{-7}$ |

**Table 5.**Nonlinear Mass spring: conditioning parameters computed using $tol={10}^{-6}$ and initial mesh with 11 equidistant points.

$\mathit{\sigma}$ | $\mathit{\kappa}$ | ${\mathit{\kappa}}_{1}$ | ${\mathit{\kappa}}_{2}$ | ${\mathit{\gamma}}_{1}$ | |
---|---|---|---|---|---|

$T=20$ | |||||

twpbvpc_m | $1.90\times {10}^{1}$ | $1.33\times {10}^{1}$ | $4.72\times {10}^{0}$ | $8.57\times {10}^{0}$ | $2.16\times {10}^{-1}$ |

tomc | $2.04\times {10}^{1}$ | $1.33\times {10}^{1}$ | $4.79\times {10}^{0}$ | $8.61\times {10}^{0}$ | $5.28\times {10}^{-1}$ |

$T=2\times {10}^{4}$ | |||||

twpbvpc_m | $1.97\times {10}^{4}$ | $1.34\times {10}^{1}$ | $4.73\times {10}^{0}$ | $8.65\times {10}^{0}$ | $5.09\times {10}^{-4}$ |

tomc | $2.08\times {10}^{4}$ | $1.66\times {10}^{1}$ | $5.42\times {10}^{0}$ | $1.12\times {10}^{1}$ | $2.11\times {10}^{-4}$ |

$T=2\times {10}^{6}$ | |||||

twpbvpc_m | $1.90\times {10}^{6}$ | $1.34\times {10}^{1}$ | $4.75\times {10}^{0}$ | $8.61\times {10}^{0}$ | $5.28\times {10}^{-6}$ |

tomc | $2.03\times {10}^{6}$ | $1.66\times {10}^{1}$ | $5.45\times {10}^{0}$ | $1.11\times {10}^{1}$ | $2.17\times {10}^{-6}$ |

**Table 6.**Nonlinear Mass spring using the variable $\tau =t/T$: conditioning parameters computed using $tol={10}^{-6}$ and initial mesh with 11 equidistant points.

$\mathit{\sigma}$ | $\mathit{\kappa}$ | ${\mathit{\kappa}}_{1}$ | ${\mathit{\kappa}}_{2}$ | ${\mathit{\gamma}}_{1}$ | |
---|---|---|---|---|---|

$T=20$ | |||||

twpbvpc_m | $1.90\times {10}^{1}$ | $5.15\times {10}^{0}$ | $4.72\times {10}^{0}$ | $4.31\times {10}^{-1}$ | $5.28\times {10}^{-1}$ |

tomc | $2.06\times {10}^{1}$ | $5.18\times {10}^{0}$ | $4.75\times {10}^{0}$ | $4.30\times {10}^{-1}$ | $2.12\times {10}^{-1}$ |

$T=2\times {10}^{4}$ | |||||

twpbvpc_m | $1.90\times {10}^{4}$ | $4.73\times {10}^{0}$ | $4.73\times {10}^{0}$ | $4.30\times {10}^{-4}$ | $5.26\times {10}^{-4}$ |

tomc | $2.08\times {10}^{4}$ | $4.75\times {10}^{0}$ | $4.75\times {10}^{0}$ | $4.31\times {10}^{-4}$ | $2.10\times {10}^{-4}$ |

$T=2\times {10}^{6}$ | |||||

twpbvpc_m | $1.90\times {10}^{6}$ | $4.75\times {10}^{0}$ | $4.75\times {10}^{0}$ | $4.31\times {10}^{-6}$ | $5.28\times {10}^{-6}$ |

tomc | $2.09\times {10}^{6}$ | $4.75\times {10}^{0}$ | $4.75\times {10}^{0}$ | $4.31\times {10}^{-6}$ | $2.09\times {10}^{-6}$ |

**Table 7.**Hypersensitive problem solved with an initial mesh with 11 equidistant points: final mesh (fM), total number of vectorized function evaluation (NVF) and mixed errors for $x,v,u$.

fM | NVF | Error x | Error v | Error u | fM | NVF | Error x | Error v | Error u | |
---|---|---|---|---|---|---|---|---|---|---|

twpbvp_m | 117 | 239 | $1.5\times {10}^{-6}$ | $3.1\times {10}^{-6}$ | $1.5\times {10}^{-6}$ | 1821 | 394 | $1.9\times {10}^{-5}$ | $3.8\times {10}^{-5}$ | $1.9\times {10}^{-5}$ |

twpbvpc_m | 140 | 237 | $1.7\times {10}^{-6}$ | $3.4\times {10}^{-6}$ | $1.7\times {10}^{-6}$ | 650 | 456 | $3.3\times {10}^{-5}$ | $6.7\times {10}^{-5}$ | $5.0\times {10}^{-5}$ |

twpbvp_l | 105 | 224 | $7.0\times {10}^{-6}$ | $2.7\times {10}^{-5}$ | $1.7\times {10}^{-5}$ | * | * | * | * | * |

twpbvpc_l | 91 | 286 | $6.6\times {10}^{-9}$ | $1.3\times {10}^{-8}$ | $6.6\times {10}^{-9}$ | 1176 | 425 | $8.2\times {10}^{-9}$ | $3.0\times {10}^{-8}$ | $1.9\times {10}^{-8}$ |

tom | 691 | 33 | $2.8\times {10}^{-9}$ | $5.5\times {10}^{-9}$ | $2.8\times {10}^{-9}$ | 636 | 169 | $2.5\times {10}^{-6}$ | $2.3\times {10}^{-5}$ | $2.1\times {10}^{-5}$ |

tomc | 681 | 46 | $5.7\times {10}^{-7}$ | $1.1\times {10}^{-6}$ | $5.7\times {10}^{-7}$ | 1941 | 134 | $4.0\times {10}^{-9}$ | $8.0\times {10}^{-9}$ | $4.0\times {10}^{-9}$ |

$\mathit{t}\mathit{o}\mathit{l}={\mathbf{10}}^{-\mathbf{6}}$ | ||||||||||

twpbvp_m | 357 | 245 | $9.8\times {10}^{-9}$ | $2.0\times {10}^{-8}$ | $1.3\times {10}^{-8}$ | 1859 | 392 | $2.6\times {10}^{-8}$ | $5.3\times {10}^{-8}$ | $2.6\times {10}^{-8}$ |

twpbvpc_m | 265 | 239 | $3.2\times {10}^{-7}$ | $6.4\times {10}^{-7}$ | $3.2\times {10}^{-7}$ | 536 | 475 | $4.4\times {10}^{-8}$ | $8.8\times {10}^{-8}$ | $4.4\times {10}^{-8}$ |

twpbvp_l | 94 | 248 | $5.3\times {10}^{-8}$ | $1.1\times {10}^{-7}$ | $5.3\times {10}^{-8}$ | * | * | * | * | * |

twpbvpc_l | 91 | 286 | $6.6\times {10}^{-9}$ | $1.3\times {10}^{-8}$ | $6.6\times {10}^{-9}$ | 1176 | 425 | $8.2\times {10}^{-9}$ | $3.0\times {10}^{-8}$ | $1.9\times {10}^{-8}$ |

tom | 691 | 33 | $2.8\times {10}^{-9}$ | $5.5\times {10}^{-9}$ | $2.8\times {10}^{-9}$ | 691 | 172 | $8.8\times {10}^{-8}$ | $2.5\times {10}^{-7}$ | $2.3\times {10}^{-7}$ |

tomc | 681 | 46 | $5.7\times {10}^{-7}$ | $1.1\times {10}^{-6}$ | $5.7\times {10}^{-7}$ | 1941 | 134 | $4.0\times {10}^{-9}$ | $8.0\times {10}^{-9}$ | $4.0\times {10}^{-9}$ |

**Table 8.**Hypersensitive problem: conditioning parameters computed using $tol={10}^{-6}$ and initial mesh with 11 equidistant points.

$\mathit{\sigma}$ | $\mathit{\kappa}$ | ${\mathit{\kappa}}_{1}$ | ${\mathit{\kappa}}_{2}$ | ${\mathit{\gamma}}_{1}$ | |
---|---|---|---|---|---|

$T=10$ | |||||

twpbvpc_m | $5.94\times {10}^{1}$ | $3.09\times {10}^{1}$ | $2.67\times {10}^{1}$ | $4.23\times {10}^{0}$ | $5.51\times {10}^{-1}$ |

twpbvpc_l | $5.95\times {10}^{1}$ | $3.09\times {10}^{1}$ | $2.67\times {10}^{1}$ | $4.23\times {10}^{0}$ | $5.49\times {10}^{-1}$ |

tomc | $6.83\times {10}^{1}$ | $3.09\times {10}^{1}$ | $2.67\times {10}^{1}$ | $4.23\times {10}^{0}$ | $3.90\times {10}^{-1}$ |

$T={10}^{4}$ | |||||

twpbvpc_m | $6.34\times {10}^{4}$ | $3.09\times {10}^{1}$ | $2.66\times {10}^{1}$ | $4.23\times {10}^{0}$ | $5.24\times {10}^{-4}$ |

twpbvpc_l | $5.80\times {10}^{4}$ | $3.09\times {10}^{1}$ | $2.67\times {10}^{1}$ | $4.23\times {10}^{0}$ | $5.61\times {10}^{-4}$ |

tomc | $6.74\times {10}^{4}$ | $3.09\times {10}^{1}$ | $2.66\times {10}^{1}$ | $4.23\times {10}^{0}$ | $3.96\times {10}^{-4}$ |

$T={10}^{6}$ | |||||

twpbvpc_m | $6.44\times {10}^{6}$ | $3.09\times {10}^{1}$ | $2.66\times {10}^{1}$ | $4.23\times {10}^{0}$ | $5.11\times {10}^{-6}$ |

twpbvpc_l | $5.97\times {10}^{6}$ | $3.09\times {10}^{1}$ | $2.67\times {10}^{1}$ | $4.23\times {10}^{0}$ | $5.54\times {10}^{-6}$ |

tomc | $6.92\times {10}^{6}$ | $4.70\times {10}^{1}$ | $9.15\times {10}^{0}$ | $3.78\times {10}^{1}$ | $3.85\times {10}^{-6}$ |

**Table 9.**Hypersensitive problem using the variable $\tau =t/T$, initial mesh with 11 equidistant points and continuation strategy on T: final mesh (fM), total number of vectorized function evaluation (NVF) and mixed errors for x,v,u.

$\mathit{T}={10}^{4}$ | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|

$\mathit{t}\mathit{o}\mathit{l}={10}^{-4}$ | $\mathit{t}\mathit{o}\mathit{l}={10}^{-6}$ | |||||||||

fM | NVF | Error x | Error v | Error u | fM | NVF | Error x | Error v | Error u | |

bvp4c | 107 | 198 | $1.1\times {10}^{-4}$ | $4.5\times {10}^{-4}$ | $3.8\times {10}^{-4}$ | 242 | 170 | $1.1\times {10}^{-6}$ | $4.6\times {10}^{-6}$ | $3.6\times {10}^{-6}$ |

bvp5c | 70 | 1277 | $8.5\times {10}^{-7}$ | $1.7\times {10}^{-6}$ | $8.5\times {10}^{-7}$ | 132 | 2874 | $4.9\times {10}^{-9}$ | $9.8\times {10}^{-9}$ | $4.9\times {10}^{-9}$ |

twpbvp_m | 59 | 266 | $2.2\times {10}^{-5}$ | $4.4\times {10}^{-5}$ | $2.2\times {10}^{-5}$ | 124 | 311 | $4.9\times {10}^{-6}$ | $8.1\times {10}^{-6}$ | $4.9\times {10}^{-6}$ |

twpbvpc_m | 101 | 210 | $9.1\times {10}^{-5}$ | $1.8\times {10}^{-4}$ | $9.1\times {10}^{-5}$ | 190 | 226 | $9.5\times {10}^{-8}$ | $1.9\times {10}^{-7}$ | $9.5\times {10}^{-8}$ |

twpbvp_l | 45 | 389 | $3.5\times {10}^{-6}$ | $1.9\times {10}^{-5}$ | $1.8\times {10}^{-5}$ | 63 | 306 | $4.9\times {10}^{-8}$ | $1.9\times {10}^{-7}$ | $1.8\times {10}^{-7}$ |

twpbvpc_l | 76 | 229 | $1.3\times {10}^{-5}$ | $2.6\times {10}^{-5}$ | $1.3\times {10}^{-5}$ | 79 | 234 | $4.7\times {10}^{-8}$ | $9.4\times {10}^{-8}$ | $4.7\times {10}^{-8}$ |

tom | 571 | 56 | $7.9\times {10}^{-7}$ | $1.8\times {10}^{-7}$ | $1.2\times {10}^{-7}$ | 746 | 59 | $1.1\times {10}^{-8}$ | $2.6\times {10}^{-8}$ | $2.1\times {10}^{-8}$ |

tomc | 951 | 46 | $4.9\times {10}^{-9}$ | $7.2\times {10}^{-9}$ | $5.8\times {10}^{-9}$ | 1231 | 52 | $1.2\times {10}^{-8}$ | $3.7\times {10}^{-9}$ | $2.3\times {10}^{-9}$ |

acdc | 56 | 491 | $4.0\times {10}^{-6}$ | $1.5\times {10}^{-5}$ | $1.4\times {10}^{-5}$ | 60 | 425 | $5.7\times {10}^{-8}$ | $1.9\times {10}^{-7}$ | $1.7\times {10}^{-7}$ |

acdcc | 130 | 672 | $2.1\times {10}^{-5}$ | $5.6\times {10}^{-5}$ | $3.6\times {10}^{-5}$ | 144 | 478 | $5.2\times {10}^{-8}$ | $1.8\times {10}^{-7}$ | $1.2\times {10}^{-7}$ |

**Table 10.**Hypersensitive problem using the variable $\tau =t/T$: conditioning parameters computed using $tol={10}^{-6}$ and initial mesh with 11 equidistant points.

$\mathit{\sigma}$ | $\mathit{\kappa}$ | ${\mathit{\kappa}}_{1}$ | ${\mathit{\kappa}}_{2}$ | ${\mathit{\gamma}}_{1}$ | |
---|---|---|---|---|---|

$T=10$ | |||||

twpbvpc_m | $5.94\times {10}^{1}$ | $2.71\times {10}^{1}$ | $2.67\times {10}^{1}$ | $4.23\times {10}^{-1}$ | $5.51\times {10}^{-1}$ |

twpbvpc_l | $5.95\times {10}^{1}$ | $2.71\times {10}^{1}$ | $2.67\times {10}^{1}$ | $4.23\times {10}^{-1}$ | $5.49\times {10}^{-1}$ |

tomc | $6.86\times {10}^{1}$ | $2.71\times {10}^{1}$ | $2.66\times {10}^{1}$ | $4.23\times {10}^{-1}$ | $3.88\times {10}^{-1}$ |

$T={10}^{4}$ | |||||

twpbvpc_m | $6.34\times {10}^{4}$ | $2.66\times {10}^{1}$ | $2.66\times {10}^{1}$ | $4.23\times {10}^{-4}$ | $5.24\times {10}^{-4}$ |

twpbvpc_l | $5.80\times {10}^{4}$ | $2.67\times {10}^{1}$ | $2.67\times {10}^{1}$ | $4.23\times {10}^{-4}$ | $5.61\times {10}^{-4}$ |

tomc | $6.74\times {10}^{4}$ | $2.66\times {10}^{1}$ | $2.66\times {10}^{1}$ | $4.23\times {10}^{-4}$ | $3.95\times {10}^{-4}$ |

$T={10}^{6}$ | |||||

twpbvpc_m | $6.52\times {10}^{6}$ | $2.66\times {10}^{1}$ | $2.66\times {10}^{1}$ | $4.23\times {10}^{-6}$ | $5.06\times {10}^{-6}$ |

twpbvpc_l | $5.72\times {10}^{6}$ | $2.67\times {10}^{1}$ | $2.67\times {10}^{1}$ | $4.23\times {10}^{-6}$ | $5.72\times {10}^{-6}$ |

tomc | $6.87\times {10}^{6}$ | $2.66\times {10}^{1}$ | $2.66\times {10}^{1}$ | $4.23\times {10}^{-6}$ | $3.88\times {10}^{-6}$ |

**Table 11.**Bang-Bang optimal control Problem (9): final mesh (fM), total number of vectorized function evaluation (NVF) and mixed errors for x, v, u.

$\mathit{t}\mathit{o}\mathit{l}={10}^{-4}$ | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|

$\mathit{\u03f5}={10}^{-3}$ | $\mathit{\u03f5}={10}^{-6}$ | |||||||||

fM | NVF | Error x | Error v | Error u | fM | NVF | Error x | Error v | Error u | |

bvp4c | 25 | 51 | $3.2\times {10}^{-4}$ | $1.8\times {10}^{-3}$ | 0 | 27 | 97 | $3.2\times {10}^{-7}$ | $4.0\times {10}^{-6}$ | 0 |

twpbvp_m | 16 | 11 | $3.0\times {10}^{-4}$ | $7.5\times {10}^{-4}$ | 0 | 16 | 11 | $2.1\times {10}^{-5}$ | $7.5\times {10}^{-7}$ | 0 |

twpbvp_l | 16 | 13 | $2.5\times {10}^{-4}$ | $7.5\times {10}^{-4}$ | 0 | 16 | 13 | $7.6\times {10}^{-5}$ | $7.5\times {10}^{-7}$ | 0 |

tom | 111 | 10 | $3.2\times {10}^{-4}$ | $1.0\times {10}^{-3}$ | 0 | 31 | 16 | $1.8\times {10}^{-4}$ | $8.8\times {10}^{-4}$ | 0 |

tomc | 121 | 10 | $3.2\times {10}^{-4}$ | $1.0\times {10}^{-3}$ | 0 | 31 | 28 | $1.8\times {10}^{-4}$ | $8.8\times {10}^{-4}$ | 0 |

acdc | 9 | 157 | $3.2\times {10}^{-4}$ | $8.7\times {10}^{-4}$ | 0 | 9 | 221 | $3.2\times {10}^{-7}$ | $1.5\times {10}^{-6}$ | 0 |

$\mathit{t}\mathit{o}\mathit{l}={\mathbf{10}}^{-\mathbf{6}}$ | ||||||||||

bvp4c | 79 | 57 | $3.2\times {10}^{-4}$ | $2.0\times {10}^{-3}$ | 0 | 47 | 93 | $3.2\times {10}^{-7}$ | $4.0\times {10}^{-6}$ | 0 |

twpbvp_m | 10 | 32 | $3.3\times {10}^{-4}$ | $1.0\times {10}^{-3}$ | 0 | 10 | 32 | $5.1\times {10}^{-6}$ | $1.0\times {10}^{-6}$ | 0 |

twpbvp_l | 17 | 66 | $3.2\times {10}^{-4}$ | $1.3\times {10}^{-3}$ | 0 | 15 | 130 | $3.2\times {10}^{-7}$ | $2.1\times {10}^{-6}$ | 0 |

tom | 231 | 19 | $3.2\times {10}^{-4}$ | $1.1\times {10}^{-3}$ | 0 | 281 | 32 | $3.3\times {10}^{-7}$ | $1.1\times {10}^{-6}$ | 0 |

tomc | 201 | 19 | $3.2\times {10}^{-4}$ | $1.1\times {10}^{-3}$ | 0 | 231 | 40 | $3.3\times {10}^{-7}$ | $1.1\times {10}^{-6}$ | 0 |

acdc | 20 | 170 | $3.2\times {10}^{-4}$ | $1.3\times {10}^{-3}$ | 0 | 17 | 242 | $3.2\times {10}^{-7}$ | $2.2\times {10}^{-6}$ | 0 |

**Table 12.**Bang-Bang optimal control problem-solving (8) using a piecewise quadratic penalty function with $\sigma ={10}^{-4}$: final mesh (fM), total number of vectorized function evaluation (NVF) and mixed errors for x, v, u.

$\mathit{t}\mathit{o}\mathit{l}={10}^{-4}$ | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|

$\mathit{\u03f5}={10}^{-3}$ | $\mathit{\u03f5}={10}^{-6}$ | |||||||||

fM | NVF | Error x | Error v | Error u | fM | NVF | Error x | Error v | Error u | |

twpbvp_m | 16 | 11 | $9.8\times {10}^{-6}$ | $3.2\times {10}^{-5}$ | $5.0\times {10}^{-5}$ | 16 | 11 | $9.8\times {10}^{-6}$ | $3.2\times {10}^{-5}$ | $5.0\times {10}^{-5}$ |

twpbvp_l | 16 | 13 | $6.4\times {10}^{-5}$ | $3.2\times {10}^{-5}$ | $5.0\times {10}^{-5}$ | 16 | 13 | $6.4\times {10}^{-5}$ | $3.2\times {10}^{-5}$ | $5.0\times {10}^{-5}$ |

tom | 111 | 10 | $2.2\times {10}^{-5}$ | $6.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ | 31 | 27 | $1.9\times {10}^{-4}$ | $8.5\times {10}^{-4}$ | $5.0\times {10}^{-5}$ |

tomc | 126 | 9 | $2.1\times {10}^{-5}$ | $6.6\times {10}^{-5}$ | $5.0\times {10}^{-5}$ | 31 | 20 | $1.9\times {10}^{-4}$ | $8.5\times {10}^{-4}$ | $5.0\times {10}^{-5}$ |

$\mathit{t}\mathit{o}\mathit{l}={\mathbf{10}}^{-\mathbf{6}}$ | ||||||||||

twpbvp_m | 8 | 32 | $2.4\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ | 8 | 32 | $2.4\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ |

twpbvp_l | 9 | 93 | $2.0\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ | 8 | 130 | $2.0\times {10}^{-5}$ | $3.7\times {10}^{-5}$ | $5.0\times {10}^{-5}$ |

tom | 231 | 19 | $2.0\times {10}^{-5}$ | $3.4\times {10}^{-5}$ | $5.0\times {10}^{-5}$ | 381 | 51 | $2.0\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ |

tomc | 261 | 20 | $2.0\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ | 241 | 56 | $2.0\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ |

**Table 13.**Bang-Bang optimal control problem-solving (8) using a piecewise quadratic penalty function with $\sigma ={10}^{-4}$ and the continuation strategy: final mesh (fM), total number of vectorized function evaluation (NVF) and mixed errors for x, v, u.

$\mathit{t}\mathit{o}\mathit{l}={10}^{-4}$ | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|

$\mathit{\u03f5}={10}^{-3}$ | $\mathit{\u03f5}={10}^{-6}$ | |||||||||||

${\mathit{N}}_{\mathit{\u03f5}}$ | fM | NVF | Error x | Error v | Error u | ${\mathit{N}}_{\mathit{\u03f5}}$ | fM | NVF | Error x | Error v | Error u | |

bvp4c | 10 | 12 | 1899 | $2.0\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ | 5 | 13 | 1214 | $2.0\times {10}^{-5}$ | $2.0\times {10}^{-5}$ | $5.0\times {10}^{-5}$ |

bvp5c | 10 | 9 | 1551 | $2.0\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ | 10 | 13 | 1442 | $2.0\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ |

acdc | 4 | 326 | $1.5\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ | 4 | 326 | $1.5\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ | ||

$\mathit{t}\mathit{o}\mathit{l}={\mathbf{10}}^{-\mathbf{6}}$ | ||||||||||||

bvp4c | 10 | 16 | 3168 | $2.0\times {10}^{-5}$ | $3.3\times {10}^{-4}$ | $5.0\times {10}^{-5}$ | 10 | 19 | 3421 | $2.0\times {10}^{-5}$ | $2.0\times {10}^{-5}$ | $5.0\times {10}^{-5}$ |

bvp5c | 10 | 13 | 3235 | $2.0\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ | 100 | 14 | 21747 | $2.0\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ |

acdc | 9 | 380 | $2.0\times {10}^{-5}$ | $6.7\times {10}^{-5}$ | $5.0\times {10}^{-5}$ | 9 | 380 | $2.0\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $5.0\times {10}^{-5}$ |

**Table 14.**Bang-Bang optimal control problem: conditioning parameters computed using $tol={10}^{-6}$.

$\mathit{\sigma}$ | $\mathit{\kappa}$ | ${\mathit{\kappa}}_{1}$ | ${\mathit{\kappa}}_{2}$ | ${\mathit{\gamma}}_{1}$ | |
---|---|---|---|---|---|

$\u03f5={10}^{-3}$ | |||||

twpbvpc_m | 1.8 | 3.3 | 2.0 | 1.3 | 1.6 |

twpbvpc_l | 1.4 | 3.3 | 2.0 | 1.3 | 1.6 |

tomc | 1.5 | 3.3 | 2.0 | 1.2 | 1.0 |

$\u03f5={10}^{-6}$ | |||||

twpbvpc_m | 2.0 | 3.2 | 2.0 | 1.2 | 1.6 |

twpbvp_l | 2.0 | 3.3 | 2.0 | 1.3 | 1.7 |

tomc | 2.1 | 3.3 | 2.0 | 1.2 | 1.0 |

**Table 15.**Bang-Bang optimal control problem with penalty: conditioning parameters computed using $tol={10}^{-6}$.

$\mathit{\sigma}$ | $\mathit{\kappa}$ | ${\mathit{\kappa}}_{1}$ | ${\mathit{\kappa}}_{2}$ | ${\mathit{\gamma}}_{1}$ | |
---|---|---|---|---|---|

$\u03f5={10}^{-3}$ | |||||

twpbvpc_m | 1.8 | 3.2 | 2.0 | 1.2 | 1.6 |

twpbvpc_l | 1.4 | 3.3 | 2.0 | 1.3 | 1.7 |

tomc | 1.4 | 3.3 | 2.0 | 1.2 | 1.0 |

$\u03f5={10}^{-6}$ | |||||

twpbvpc_m | 2.0 | 3.2 | 2.0 | 1.2 | 1.6 |

twpbvpc_l | 2.0 | 3.3 | 2.0 | 1.3 | 1.7 |

tomc | 1.3 | 3.3 | 2.0 | 1.2 | 1.0 |

**Table 16.**Longitudinal dynamics of a vehicle $T=10$, $g=9.81$, ${k}_{0}=0.02\phantom{\rule{0.166667em}{0ex}}g$, ${k}_{1}={10}^{-5}g$, ${k}_{2}=0$, ${k}_{3}=0$: final mesh (fM), total number of vectorized function evaluation (NVF) and mixed errors for x, v, u.

$\mathit{t}\mathit{o}\mathit{l}={10}^{-4}$ | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|

$\mathit{\u03f5}={10}^{-3}$ | $\mathit{\u03f5}={10}^{-6}$ | |||||||||

fM | NVF | Error x | Error v | Error u | fM | NVF | Error x | Error v | Error u | |

bvp4c | 38 | 125 | $4.4\times {10}^{-4}$ | $1.8\times {10}^{-3}$ | 0 | 32$\left(c\right)$ | 242 | $4.4\times {10}^{-7}$ | $3.1\times {10}^{-6}$ | 0 |

bvp5c | 18 | 270 | $4.4\times {10}^{-4}$ | $1.7\times {10}^{-3}$ | 0 | 18$\left(c\right)$ | 662 | $4.4\times {10}^{-7}$ | $2.1\times {10}^{-6}$ | 0 |

twpbvp_m | 38 | 54 | $4.4\times {10}^{-4}$ | $1.6\times {10}^{-3}$ | 0 | 13 | 146 | $4.0\times {10}^{-7}$ | $5.2\times {10}^{-4}$ | 0 |

twpbvp_l | 38 | 57 | $4.4\times {10}^{-4}$ | $2.0\times {10}^{-3}$ | 0 | 28 | 134 | $4.0\times {10}^{-7}$ | $7.4\times {10}^{-4}$ | 0 |

tom | 176 | 23 | $4.4\times {10}^{-4}$ | $1.6\times {10}^{-3}$ | 0 | 176$\left(c\right)$ | 50 | $4.7\times {10}^{-7}$ | $4.0\times {10}^{-5}$ | 0 |

tomc | 131 | 20 | $4.4\times {10}^{-4}$ | $1.6\times {10}^{-3}$ | 0 | 131$\left(c\right)$ | 48 | $1.1\times {10}^{-6}$ | $2.3\times {10}^{-4}$ | 0 |

acdc | 15 | 320 | $4.4\times {10}^{-4}$ | $1.1\times {10}^{-3}$ | 0 | 8 | 550 | $2.0\times {10}^{-6}$ | $1.1\times {10}^{-6}$ | 0 |

**Table 17.**Longitudinal dynamics of a vehicle $T=10$, $g=9.81$, ${k}_{0}=0.02\phantom{\rule{0.166667em}{0ex}}g$, ${k}_{1}={10}^{-5}g$, ${k}_{2}=0$, ${k}_{3}=0$: conditioning parameters computed using $tol={10}^{-6}$.

$\mathit{\sigma}$ | $\mathit{\kappa}$ | ${\mathit{\kappa}}_{1}$ | ${\mathit{\kappa}}_{2}$ | ${\mathit{\gamma}}_{1}$ | |
---|---|---|---|---|---|

$\mathit{\u03f5}={10}^{-3}$ | |||||

twpbvpc_m | $3.04\times {10}^{0}$ | $4.88\times {10}^{1}$ | $1.11\times {10}^{1}$ | $4.36\times {10}^{1}$ | $7.22\times {10}^{0}$ |

twpbvpc_l | $3.11\times {10}^{0}$ | $4.89\times {10}^{1}$ | $1.11\times {10}^{1}$ | $4.36\times {10}^{1}$ | $7.15\times {10}^{0}$ |

tomc | $3.78\times {10}^{0}$ | $2.94\times {10}^{2}$ | $7.43\times {10}^{1}$ | $2.20\times {10}^{2}$ | $4.02\times {10}^{0}$ |

$\mathbf{\u03f5}={\mathbf{10}}^{-\mathbf{6}}$ | |||||

twpbvpc_m | $3.81\times {10}^{0}$ | $4.84\times {10}^{1}$ | $1.10\times {10}^{1}$ | $4.33\times {10}^{1}$ | $6.47\times {10}^{0}$ |

twpbvpc_l | $3.83\times {10}^{0}$ | $4.84\times {10}^{1}$ | $1.10\times {10}^{1}$ | $4.33\times {10}^{1}$ | $6.47\times {10}^{0}$ |

tomc | $3.86\times {10}^{0}$ | $2.99\times {10}^{2}$ | $7.48\times {10}^{1}$ | $2.24\times {10}^{2}$ | $4.02\times {10}^{0}$ |

**Table 18.**Goddard Rocket problem (15) solved using a piecewise quadratic penalty function with $\overline{\sigma}={10}^{-4}$ and $\u03f5={10}^{-3}$: final mesh (fM), total number of vectorized function evaluation (NVF) and mixed errors for h, v, m, T and u.

$\mathit{t}\mathit{o}\mathit{l}={10}^{-4}$ | |||||||
---|---|---|---|---|---|---|---|

fM | NVF | Error h | Error v | Error m | Error T | Error u | |

bvp4c | 1388 | 8058 | $8.9\times {10}^{-10}$ | $4.9\times {10}^{-7}$ | $4.7\times {10}^{-9}$ | $4.6\times {10}^{-8}$ | $3.0\times {10}^{-5}$ |

twpbvp_m | 31 | 86 | $6.0\times {10}^{-7}$ | $3.8\times {10}^{-5}$ | $4.0\times {10}^{-5}$ | $1.1\times {10}^{-5}$ | $1.0\times {10}^{-3}$ |

twpbvp_l | 31 | 91 | $1.0\times {10}^{-6}$ | $6.9\times {10}^{-5}$ | $7.5\times {10}^{-5}$ | $1.2\times {10}^{-5}$ | $1.7\times {10}^{-3}$ |

$\mathit{t}\mathit{o}\mathit{l}={\mathbf{10}}^{-\mathbf{6}}$ | |||||||

bvp4c | 1466 | 20,898 | $4.9\times {10}^{-12}$ | $2.7\times {10}^{-9}$ | $2.6\times {10}^{-9}$ | $3.1\times {10}^{-10}$ | $1.7\times {10}^{-7}$ |

twpbvp_m | 32 | 142 | $4.6\times {10}^{-9}$ | $1.6\times {10}^{-6}$ | $1.5\times {10}^{-6}$ | $1.4\times {10}^{-7}$ | $9.8\times {10}^{-5}$ |

twpbvp_l | 33 | 169 | $3.7\times {10}^{-10}$ | $6.8\times {10}^{-8}$ | $6.5\times {10}^{-8}$ | $3.3\times {10}^{-9}$ | $3.9\times {10}^{-6}$ |

**Table 19.**Goddard Rocket Problem (15) solved using a piecewise quadratic penalty function with $\overline{\sigma}={10}^{-4}$ and the continuation strategy: final mesh (fM), total number of vectorized function evaluation (NVF) and mixed errors for h, v, m, T and u. ${}^{*}$ Observe that

`acdc`for $tol={10}^{-4},\u03f5={10}^{-6}$ obtains a solution for $\u03f5=3.98\times {10}^{-6}$.

$\mathit{t}\mathit{o}\mathit{l}={10}^{-4}$ | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

$\mathbf{\u03f5}={\mathbf{10}}^{-\mathbf{3}}$ | $\mathbf{\u03f5}={\mathbf{10}}^{-\mathbf{6}}$ | |||||||||||||

fM | NVF | Error $\mathit{h}$ | Error $\mathit{v}$ | Error $\mathit{m}$ | Error $\mathit{T}$ | Error $\mathit{u}$ | fM | NVF | Error $\mathit{h}$ | Error $\mathit{v}$ | Error $\mathit{m}$ | Error $\mathit{T}$ | Error $\mathit{u}$ | |

bvp4c | 47 | 2823 | $3.2\times {10}^{-9}$ | $1.2\times {10}^{-6}$ | $1.1\times {10}^{-6}$ | $1.2\times {10}^{-7}$ | $7.9\times {10}^{-5}$ | 138 | 46,507 | $5.0\times {10}^{-9}$ | $3.8\times {10}^{-7}$ | $4.1\times {10}^{-7}$ | $4.4\times {10}^{-8}$ | $2.3\times {10}^{-3}$ |

twpbvp_m | 16 | 268 | $7.0\times {10}^{-7}$ | $4.0\times {10}^{-5}$ | $4.4\times {10}^{-5}$ | $4.6\times {10}^{-6}$ | $8.5\times {10}^{-4}$ | 93 | 484 | $4.5\times {10}^{-9}$ | $3.4\times {10}^{-5}$ | $3.3\times {10}^{-5}$ | $2.4\times {10}^{-7}$ | $9.4\times {10}^{-2}$ |

twpbvp_l | 16 | 304 | $1.1\times {10}^{-6}$ | $7.3\times {10}^{-5}$ | $7.9\times {10}^{-5}$ | $9.4\times {10}^{-6}$ | $1.7\times {10}^{-3}$ | 225 | 627 | $3.2\times {10}^{-9}$ | $5.2\times {10}^{-7}$ | $4.9\times {10}^{-7}$ | $5.6\times {10}^{-8}$ | $1.5\times {10}^{-3}$ |

tom | 401 | 66 | $1.4\times {10}^{-7}$ | $6.8\times {10}^{-5}$ | $6.7\times {10}^{-5}$ | $1.7\times {10}^{-7}$ | $4.2\times {10}^{-3}$ | 541 | 224 | $1.6\times {10}^{-8}$ | $3.7\times {10}^{-5}$ | $3.2\times {10}^{-5}$ | $1.7\times {10}^{-7}$ | $4.2\times {10}^{-2}$ |

tomc | 291 | 62 | $5.4\times {10}^{-8}$ | $3.9\times {10}^{-5}$ | $3.7\times {10}^{-5}$ | $8.7\times {10}^{-7}$ | $2.1\times {10}^{-3}$ | 286 | 210 | $1.1\times {10}^{-8}$ | $9.5\times {10}^{-5}$ | $9.2\times {10}^{-5}$ | $8.7\times {10}^{-7}$ | $1.2\times {10}^{-1}$ |

acdc | 17 | 341 | $7.2\times {10}^{-7}$ | $8.2\times {10}^{-5}$ | $8.4\times {10}^{-5}$ | $9.3\times {10}^{-6}$ | $5.1\times {10}^{-3}$ | 24 ${}^{*}$ | 2066 | $3.8\times {10}^{-9}$ | $8.7\times {10}^{-7}$ | $7.1\times {10}^{-7}$ | $9.2\times {10}^{-8}$ | $4.8\times {10}^{-3}$ |

$\mathit{t}\mathit{o}\mathit{l}={\mathbf{10}}^{-\mathbf{6}}$ | ||||||||||||||

bvp4c | 148 | 9189 | $3.8\times {10}^{-11}$ | $7.7\times {10}^{-9}$ | $6.9\times {10}^{-9}$ | $9.1\times {10}^{-11}$ | $8.2\times {10}^{-7}$ | 1385 | 52,028 | $5.2\times {10}^{-11}$ | $2.9\times {10}^{-9}$ | $3.5\times {10}^{-9}$ | $7.9\times {10}^{-10}$ | $1.9\times {10}^{-5}$ |

twpbvp_m | 29 | 593 | $2.3\times {10}^{-8}$ | $2.3\times {10}^{-6}$ | $2.3\times {10}^{-6}$ | $3.4\times {10}^{-9}$ | $1.4\times {10}^{-4}$ | 149 | 681 | $1.8\times {10}^{-10}$ | $2.9\times {10}^{-7}$ | $2.8\times {10}^{-7}$ | $8.0\times {10}^{-9}$ | $8.2\times {10}^{-4}$ |

twpbvp_l | 32 | 646 | $4.5\times {10}^{-9}$ | $2.3\times {10}^{-6}$ | $2.2\times {10}^{-6}$ | $2.1\times {10}^{-7}$ | $1.4\times {10}^{-4}$ | 119 | 969 | $8.9\times {10}^{-10}$ | $2.9\times {10}^{-6}$ | $2.5\times {10}^{-6}$ | $1.1\times {10}^{-8}$ | $6.9\times {10}^{-3}$ |

tom | 551 | 80 | $1.6\times {10}^{-8}$ | $1.4\times {10}^{-5}$ | $1.4\times {10}^{-5}$ | $3.0\times {10}^{-8}$ | $7.3\times {10}^{-4}$ | 661 | 279 | $6.3\times {10}^{-9}$ | $1.7\times {10}^{-5}$ | $1.5\times {10}^{-5}$ | $3.0\times {10}^{-8}$ | $3.5\times {10}^{-2}$ |

tomc | 321 | 74 | $1.1\times {10}^{-7}$ | $1.7\times {10}^{-5}$ | $1.6\times {10}^{-5}$ | $2.4\times {10}^{-8}$ | $7.7\times {10}^{-4}$ | 731 | 286 | $7.3\times {10}^{-10}$ | $5.6\times {10}^{-6}$ | $5.4\times {10}^{-6}$ | $2.4\times {10}^{-8}$ | $1.2\times {10}^{-2}$ |

acdc | 28 | 496 | $4.5\times {10}^{-9}$ | $2.3\times {10}^{-6}$ | $2.2\times {10}^{-6}$ | $2.1\times {10}^{-7}$ | $1.4\times {10}^{-4}$ | 58 | 942 | $2.3\times {10}^{-10}$ | $3.5\times {10}^{-7}$ | $3.4\times {10}^{-7}$ | $3.5\times {10}^{-9}$ | $9.7\times {10}^{-4}$ |

$\mathit{\sigma}$ | $\mathit{\kappa}$ | ${\mathit{\kappa}}_{1}$ | ${\mathit{\kappa}}_{2}$ | ${\mathit{\gamma}}_{1}$ | |
---|---|---|---|---|---|

$\u03f5={10}^{-3}$ | |||||

twpbvpc_m | 4.8 | $9.1\times {10}^{2}$ | $7.3\times {10}^{2}$ | $1.8\times {10}^{2}$ | $2.2\times {10}^{2}$ |

twpbvpc_l | 4.9 | $9.0\times {10}^{2}$ | $7.2\times {10}^{2}$ | $1.8\times {10}^{2}$ | $2.2\times {10}^{2}$ |

tomc | 5.4 | $9.0\times {10}^{2}$ | $7.3\times {10}^{2}$ | $1.8\times {10}^{2}$ | $1.7\times {10}^{2}$ |

$\u03f5={10}^{-6}$ | |||||

twpbvpc_m | 5.3 | $1.0\times {10}^{3}$ | $8.2\times {10}^{2}$ | $2.0\times {10}^{2}$ | $2.0\times {10}^{2}$ |

twpbvpc_l | 5.2 | $1.0\times {10}^{3}$ | $8.1\times {10}^{2}$ | $2.0\times {10}^{2}$ | $2.0\times {10}^{2}$ |

tomc | 5.5 | $1.0\times {10}^{3}$ | $8.1\times {10}^{2}$ | $2.0\times {10}^{2}$ | $1.7\times {10}^{2}$ |

**Table 21.**Minimization of the fuel cost in the operation of a train (18) using a piecewise quadratic penalty function with $\tau ={10}^{-2}$: final mesh (fM), total number of vectorized function evaluation (NVF) and mixed errors for x, v, ${u}_{a}$, ${u}_{b}$.

$\mathit{t}\mathit{o}\mathit{l}={10}^{-4}$ | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|

$\mathbf{\u03f5}=\mathbf{1}$ | $\mathbf{\u03f5}=\mathbf{0}.\mathbf{5}$ | |||||||||||

fM | NVF | Error $\mathit{x}$ | Error $\mathit{v}$ | Error ${\mathit{u}}_{\mathit{a}}$ | Error ${\mathit{u}}_{\mathit{b}}$ | fM | NVF | Error $\mathit{x}$ | Error $\mathit{v}$ | Error ${\mathit{u}}_{\mathit{a}}$ | Error ${\mathit{u}}_{\mathit{b}}$ | |

bvp4c | 121 | 1747 | $3.0\times {10}^{-6}$ | $6.7\times {10}^{-6}$ | $3.4\times {10}^{-5}$ | $1.7\times {10}^{-5}$ | 116 | 2414 | $1.4\times {10}^{-6}$ | $1.8\times {10}^{-6}$ | $5.1\times {10}^{-5}$ | $6.3\times {10}^{-5}$ |

bvp5c | 52 | 3259 | $9.8\times {10}^{-7}$ | $5.9\times {10}^{-6}$ | $3.3\times {10}^{-5}$ | $1.8\times {10}^{-5}$ | 56 | 4295 | $5.3\times {10}^{-7}$ | $4.8\times {10}^{-6}$ | $1.4\times {10}^{-4}$ | $1.5\times {10}^{-4}$ |

twpbvp_m | 34 | 132 | $5.6\times {10}^{-6}$ | $2.3\times {10}^{-5}$ | $2.0\times {10}^{-4}$ | $9.1\times {10}^{-5}$ | 52 | 124 | $2.6\times {10}^{-2}$ | $3.3\times {10}^{-2}$ | $1.5\times {10}^{-2}$ | $6.1\times {10}^{-3}$ |

twpbvpc_m | 47 | 132 | $5.7\times {10}^{-6}$ | $2.3\times {10}^{-5}$ | $2.0\times {10}^{-4}$ | $9.1\times {10}^{-5}$ | 55 | 104 | $2.6\times {10}^{-2}$ | $3.3\times {10}^{-2}$ | $1.5\times {10}^{-2}$ | $6.2\times {10}^{-3}$ |

twpbvp_l | 33 | 136 | $9.0\times {10}^{-6}$ | $2.8\times {10}^{-5}$ | $4.3\times {10}^{-4}$ | $1.0\times {10}^{-4}$ | 223 | 124 | $2.2\times {10}^{-2}$ | $2.6\times {10}^{-2}$ | $9.9\times {10}^{-3}$ | $8.7\times {10}^{-4}$ |

twpbvpc_l | 46 | 136 | $9.0\times {10}^{-6}$ | $2.8\times {10}^{-5}$ | $4.3\times {10}^{-4}$ | $1.0\times {10}^{-4}$ | 115 | 104 | $2.2\times {10}^{-2}$ | $2.6\times {10}^{-2}$ | $9.9\times {10}^{-3}$ | $8.7\times {10}^{-4}$ |

tom | 1471 | 44 | $5.9\times {10}^{-5}$ | $3.9\times {10}^{-4}$ | $4.0\times {10}^{-4}$ | $1.4\times {10}^{-4}$ | 1091 | 45 | $4.9\times {10}^{-6}$ | $2.6\times {10}^{-5}$ | $1.1\times {10}^{-4}$ | $8.9\times {10}^{-5}$ |

tomc | 1406 | 148 | $4.0\times {10}^{-7}$ | $1.5\times {10}^{-6}$ | $2.2\times {10}^{-5}$ | $8.7\times {10}^{-6}$ | 2896 | 93 | $1.2\times {10}^{-7}$ | $3.7\times {10}^{-6}$ | $3.5\times {10}^{-5}$ | $1.5\times {10}^{-5}$ |

**Table 22.**Minimization of the fuel cost in the operation of a train (18) using a piecewise quadratic penalty function with $\tau ={10}^{-2}$ and continuation strategy: final mesh (fM), total number of vectorized function evaluation (NVF) and mixed errors for x, v, ${u}_{a}$, ${u}_{b}$.

$\mathit{t}\mathit{o}\mathit{l}={10}^{-4}$ | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|

$\mathit{\u03f5}={10}^{-2}$ | $\mathit{\u03f5}={10}^{-3}$ | |||||||||||

fM | NVF | Error x | Error v | Error ${\mathit{u}}_{\mathit{a}}$ | Error ${\mathit{u}}_{\mathit{b}}$ | fM | NVF | Error x | Error v | Error ${\mathit{u}}_{\mathit{a}}$ | Error ${\mathit{u}}_{\mathit{b}}$ | |

bvp4c | 69 | 6055 | $1.1\times {10}^{-5}$ | $3.4\times {10}^{-5}$ | $2.1\times {10}^{-3}$ | $1.9\times {10}^{-2}$ | 78 | 8213 | $1.3\times {10}^{-5}$ | $3.4\times {10}^{-5}$ | $5.2\times {10}^{-3}$ | $1.9\times {10}^{-1}$ |

bvp5c | 39 | 7180 | $6.0\times {10}^{-6}$ | $6.0\times {10}^{-5}$ | $5.5\times {10}^{-4}$ | $1.6\times {10}^{-2}$ | 59 | 8012 | $1.3\times {10}^{-6}$ | $5.0\times {10}^{-5}$ | $6.2\times {10}^{-5}$ | $1.6\times {10}^{-2}$ |

twpbvp_m | 415 | 432 | $4.0\times {10}^{-6}$ | $7.8\times {10}^{-6}$ | $1.2\times {10}^{-3}$ | $4.8\times {10}^{-8}$ | 589 | 319 | $4.1\times {10}^{-6}$ | $9.0\times {10}^{-5}$ | $2.0\times {10}^{-3}$ | $2.4\times {10}^{-8}$ |

twpbvpc_m | 132 | 359 | $5.5\times {10}^{-5}$ | $3.8\times {10}^{-4}$ | $4.2\times {10}^{-3}$ | $2.4\times {10}^{-2}$ | 589 | 319 | $4.1\times {10}^{-6}$ | $9.0\times {10}^{-5}$ | $2.0\times {10}^{-3}$ | $2.4\times {10}^{-8}$ |

twpbvp_l | 202 | 312 | $4.3\times {10}^{-5}$ | $3.9\times {10}^{-4}$ | $2.8\times {10}^{-3}$ | $9.0\times {10}^{-3}$ | 589 | 332 | $3.3\times {10}^{-6}$ | $8.1\times {10}^{-5}$ | $1.9\times {10}^{-3}$ | $1.6\times {10}^{-8}$ |

twpbvpc_l | 202 | 312 | $4.3\times {10}^{-5}$ | $3.9\times {10}^{-4}$ | $2.8\times {10}^{-3}$ | $9.0\times {10}^{-3}$ | 589 | 332 | $3.3\times {10}^{-6}$ | $8.1\times {10}^{-5}$ | $1.9\times {10}^{-3}$ | $1.6\times {10}^{-8}$ |

tom | 2201 | 99 | $1.5\times {10}^{-6}$ | $1.2\times {10}^{-4}$ | $1.7\times {10}^{-4}$ | $1.3\times {10}^{-3}$ | 2166 | 102 | $3.7\times {10}^{-5}$ | $6.8\times {10}^{-4}$ | $1.8\times {10}^{-2}$ | $1.4\times {10}^{-1}$ |

tomc | 2211 | 218 | $4.8\times {10}^{-6}$ | $1.2\times {10}^{-4}$ | $1.1\times {10}^{-3}$ | $5.2\times {10}^{-3}$ | 2886 | 230 | $6.3\times {10}^{-6}$ | $5.9\times {10}^{-5}$ | $4.2\times {10}^{-3}$ | $2.2\times {10}^{-1}$ |

acdc | 36 | 723 | $2.2\times {10}^{-6}$ | $1.2\times {10}^{-5}$ | $3.6\times {10}^{-4}$ | $9.4\times {10}^{-3}$ | 40 | 1219 | $9.4\times {10}^{-7}$ | $1.7\times {10}^{-5}$ | $7.6\times {10}^{-4}$ | $5.2\times {10}^{-9}$ |

**Table 23.**Minimization of the fuel cost in the operation of a train: conditioning parameters computed using $tol={10}^{-6}$, cond is the condition number of the matrix associated with the last nonlinear iteration.

$\mathit{\sigma}$ | $\mathit{\kappa}$ | ${\mathit{\kappa}}_{1}$ | ${\mathit{\kappa}}_{2}$ | ${\mathit{\gamma}}_{1}$ | Cond | |
---|---|---|---|---|---|---|

$\u03f5={10}^{-3}$ | ||||||

twpbvpc_m | $6.6\times {10}^{5}$ | $9.9\times {10}^{12}$ | $9.9\times {10}^{12}$ | $1.1\times {10}^{3}$ | $1.5\times {10}^{7}$ | $9.9\times {10}^{25}$ |

twpbvpc_l | $5.8\times {10}^{7}$ | $7.3\times {10}^{9}$ | $7.3\times {10}^{9}$ | $7.3\times {10}^{2}$ | $1.6\times {10}^{2}$ | $5.3\times {10}^{19}$ |

tomc | $6.6\times {10}^{0}$ | $2.8\times {10}^{3}$ | $1.5\times {10}^{3}$ | $1.3\times {10}^{3}$ | $2.0\times {10}^{2}$ | $2.4\times {10}^{15}$ |

$\u03f5={10}^{-6}$ | ||||||

twpbvpc_m | $1.1\times {10}^{8}$ | $5.0\times {10}^{10}$ | $5.0\times {10}^{10}$ | $4.7\times {10}^{2}$ | $4.9\times {10}^{2}$ | $2.5\times {10}^{21}$ |

twpbvpc_l | $8.6\times {10}^{7}$ | $7.1\times {10}^{9}$ | $7.1\times {10}^{9}$ | $4.7\times {10}^{2}$ | $1.1\times {10}^{2}$ | $5.1\times {10}^{19}$ |

tomc | $3.2\times {10}^{0}$ | $1.4\times {10}^{3}$ | $5.1\times {10}^{2}$ | $8.9\times {10}^{2}$ | $1.4\times {10}^{2}$ | $2.8\times {10}^{14}$ |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 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/).

## Share and Cite

**MDPI and ACS Style**

Mazzia, F.; Settanni, G. BVPs Codes for Solving Optimal Control Problems. *Mathematics* **2021**, *9*, 2618.
https://doi.org/10.3390/math9202618

**AMA Style**

Mazzia F, Settanni G. BVPs Codes for Solving Optimal Control Problems. *Mathematics*. 2021; 9(20):2618.
https://doi.org/10.3390/math9202618

**Chicago/Turabian Style**

Mazzia, Francesca, and Giuseppina Settanni. 2021. "BVPs Codes for Solving Optimal Control Problems" *Mathematics* 9, no. 20: 2618.
https://doi.org/10.3390/math9202618