# Implicit A-Stable Peer Triplets for ODE Constrained Optimal Control Problems
## 2 Materials and Methods
### Construction of Peer Triplets
#### 2.4.3 A-Stable Methods  
By extensive searches with the full six-parameter family of diagonally-implicit four-stage methods many A-stable methods were found even with nodes in \([0,1]\). In fact, regions with A-stable methods exist in at least three of the eight octants in \((d_{1},d_{3},d_{4})\)-space. Surprisingly, however, for none of these methods the last node \(c_{4}\) was the rightmost one. In addition, it may be unexpected that some of the diagonal elements of \(A\) and \(K\) have negative signs. This does not cause stability problems if \(a_{ii}K_{ii}>0\), \(i=1,\ldots,s\), see also (72). A-stability assured, the search procedure tried to minimize a linear combination \(err_{s}+\delta\|A^{-1}B\|_{\infty}\) of the error constant and the norm of the stability matrix with small \(\delta<10^{-3}\) to account for the different magnitudes of these data. As mentioned in Remark 2, it was also necessary to include the damping factor \(|\lambda_{2}|\) in the minimization process. One of the best A-stable standard methods with general nodes was named AP4o43 dig. Its coefficients are given in Appendix A.3. It has an error constant \(err_{4}\leq 0.0260\) and damping factor \(|\lambda_{2}|\doteq 0.798\), see Table 3. No block structure was chosen in the boundary methods in order to avoid large norms of the mixed stability matrices \(BA_{0}^{-1},B_{N}A^{-1},A_{N}^{-1}B_{N}\), see Table 2.  
It was observed that properties of the methods may improve, if the nodes have a wider spread than the standard interval \([0,1]\). In our setting, the general vector \(w\) allows for an end evaluation \(y_{h}(T)\) at any place between the nodes. Since an evaluation roughly in the middle of all nodes may have good properties, in a further search the nodes were restricted to the interval \([0,2]\). Indeed, all characteristic data of the method AP4o43 die with extended nodes presented in Appendix A.4 have improved. As mentioned before, the standard method is invariant under a common node-shift and a nearly minimal error constant was obtained with the node increments \(d_{1}=\frac{10}{17}\), \(d_{3}=-1\) and \(d_{4}=\frac{2}{3}\). Then, the additional freedom in the choice of \(c_{2}\) was needed for the boundary methods, since the conditions (73) could only be satisfied in a small interval around \(c_{2}=\frac{5}{4}\). The full node vector with this choice has alternating node increments since \(c_{3}<c_{1}<c_{2}<c_{4}\). The method is A-stable, its error constant \(err_{4}\leq 0.0136\) is almost half as large as for the method AP4o43 dig, and \(\|A^{-1}B\|_{\infty}\leq 6.1\) and \(|\lambda_{2}|\leq\frac{2}{3}\) are smaller, too. The data of the boundary methods can be found in Table 2.  
For medium-sized ODE problems, where direct solvers for the stage equations may be used, an additional helpful feature is diagonal singly-implicitness of the standard method. In our context this means that the triangular matrices \(K^{-1}A\) and \(AK^{-1}\) have a constant value \(\theta\) in the main diagonal. Using the ansatz  
\[a_{ii}=\theta\kappa_{ii},\ i=1,\ldots,s,\]  
for \(A=(a_{ij})\) and \(K=(\kappa_{ij})\), the order conditions from Table 1 lead to a cubic equation for \(\theta\) with no rational solutions, in general. In order to avoid pollution of the algebraic elimination through superfluous terms caused by rounding errors, numerical solutions for this cubic equations were not used until the very end. This means that also the order conditions for the boundary methods were solved with \(\theta\) as a free parameter, only the final evaluation of the coefficients in Appendix A.5 was performed with its numerical value. In addition, in the Matlab-search for A-stable methods, the cubic equation was solved numerically and it turned out that the largest positive solution gave the best properties. Hence, this Peer triplet was named AP4o43 sil.