# Implicit A-Stable Peer Triplets for ODE Constrained Optimal Control Problems
## 1 Introduction
Following a _first-discretize-and-then-optimize_ approach, we apply an \(s\)-stage implicit Peer two-step method to (2) and (3) with approximations \(Y_{ni}\approx y(t_{n}+c_{i}h)\) and \(U_{ni}\approx u(t_{n}+c_{i}h)\), \(i=1,\ldots,s\), on an equi-spaced time grid \(\{t_{0},\ldots,t_{N+1}\}\subset[0,T]\) with step size \(h=(T-t_{0})/(N+1)\) and nodes \(c_{1},\ldots,c_{s}\), which are fixed for all time steps, to get the discrete constraint nonlinear optimal control problem  
\[\text{minimize}\ C\big{(}y_{h}(T)\big{)} \tag{9}\] \[\text{subject to}\ A_{0}Y_{0}=a\otimes y_{0}+hb\otimes f(y_{0},u_ {0})+hK_{0}F(Y_{0},U_{0}),\] (10) \[\text{subject to}\ y^{\prime}(t)= f\big{(}y(t),u(t)\big{)},\quad u(t)\in U_{ad},\ t\in(0,T],\]0 (11) \[\text{subject to}\ y^{\prime}(t)= f\big{(}y(t),u(t)\big{)},\quad u(t)\in U_{ad},\ t\in(0,T],\]1  
with long vectors \(Y_{n}=(Y_{ni})_{i=1}^{s}\in\mathbb{R}^{sm}\), \(U_{n}=(U_{ni})_{i=1}^{s}\in\mathbb{R}^{sd}\), and \(F(Y_{n},U_{n})=\big{(}f(Y_{ni},U_{ni})\big{)}_{i=1}^{s}\). Further, \(y_{h}(T)\approx y(T)\), \(u_{0}\approx u(0)\), and \(a,b,w\in\mathbb{R}^{s}\) are additional parameter vectors at both interval ends, \(A_{n},B_{n},K_{n}\in\mathbb{R}^{s\times s}\), and \(I\in\mathbb{R}^{m\times m}\) being the identity matrix. We will use the same symbol for a coefficient matrix like \(A\) and its Kronecker product \(A\otimes I\) as a mapping from the space \(\mathbb{R}^{sm}\) to itself. In contrast to one-step methods, Peer two-step methods compute \(Y_{n}\) from the previous stage vector \(Y_{n-1}\). Hence, also a starting method, given in (10), for the first time interval \([t_{0},t_{1}]\) is required. On each subinterval, Peer methods may be defined by three coefficient matrices \(A_{n}\), \(B_{n}\), \(K_{n}\), where \(A_{n}\) and \(K_{n}\) are assumed to be nonsingular. For practical reasons, this general version will not be used, the coefficients in the inner grid points will belong to a fixed Peer method \((A_{n},B_{n},K_{n})\equiv(A,B,K)\), \(n=1,\ldots,N-1\). The last forward step has the same form as the standard steps but uses exceptional coefficients \((A_{N},B_{N},K_{N})\) to allow for a better approximation of the end conditions. The KKT conditions (5)-(7) for ODE-constrained optimal control problems on a time interval \([0,T]\) lead to a boundary value problem for a system of two differential equations, see Section 2.1. The first one corresponds to the original _forward_ ODE for the state solution \(y(t)\) and the second one is a linear, _adjoint_ ODE for a Lagrange multiplier \(p(t)\). It is well known that numerical methods for such problems may have to satisfy additional order conditions for the adjoint equation [2; 5; 14; 16; 17; 18]. While these additional conditions are rather mild for one-step methods they may lead to severe restrictions for other types of methods such as multistep and Peer methods, especially at the right-hand boundary at the end point \(T\). Here, the order for the approximation of the adjoint equation may be limited to one. For Peer methods, this question was discussed first in [19] and the adjoint boundary condition at \(T\) was identified as the most critical point. In a more recent article [13], these bottlenecks could be circumvented by two measures. First, equivalent formulations of the forward method are not equivalent for the adjoint formulation and using a redundant formulation of Peer methods with three coefficient matrices \((A,B,K)\) adds additional free parameters. The second measure is to consider different methods for the first and last time interval. Hence, instead of one single Peer method (which will be called the standard method) we discuss _triplets_ of Peer methods consisting of a common standard method \((A,B,K)\) for all subintervals of the grid from the interior of \([0,T]\), plus a starting method \((A_{0},K_{0})\) for the first subinterval and an end method \((A_{N},B_{N},K_{N})\) for the last one. These two boundary methods may have lower order than the standard method since they are used only once.