A wealth of literature exists on theoretical and computational aspects of control problems for ordinary differential equations. This includes in particular results on necessary and sufficient optimality conditions. Exemplarily, we mention the fundamental works [11,15] in which it was shown that a two-norm discrepancy cannot be avoided in the continuous case. Other recent work on such problems includes , , and . Research on control problems governed by partial differential equations has started more recently as did the investigation of optimality conditions for these problems. First, nonlinear parabolic control problems were considered, for example, in , then elliptic problems . Some of the most recent work is [5,20] in which such problems with control and state constraints are treated. Second order sufficient optimality conditions (SSC) for elliptic control problems without such constraints were considered in [12,13] while SSC were shown and partly also numerically verified for finite element (semi-) discretizations of the one dimensional Burgers equation in [26,27]. The establishment of SSC requires a highly technical machinery including the use of a third norm as was done before in [6,14].
The verification of the, partly restrictive, continuous optimality condition is possible only in rare circumstances, such as an analytically known solution for which all conditions can be evaluated analytically; for a parabolic example, see . For the numerical solution of such control problems there are two different approaches, a direct discretization of the entire problem leading to a large finite-dimensional constrained optimization problem. This approach has also been called ``all-at-once'' method, see, for example, , ``one-shot'' method, "full discretization approach" etc. An iterative method can be applied in function space resulting in a series of infinite-dimensional linear-quadratic control problems which then still need to be discretized. The literature on the latter is quite extensive while the former has more recently been considered for the solution of real-life problems, when progress had been made on solution techniques for very large constrained nonlinear programming (NLP) problems. Exemplarily, we cite the special issue .
In - we have considered general semilinear elliptic control problems with control and state constraints. The first-order necessary conditions were formally derived in the continuous case. These were compared to the finite-dimensional conditions for a direct finite-difference discretization of the control problem and the latter was solved by applying state-of-the-art interior point and SQP methods.
The direct discretization will lead to huge NLP's for three-dimensional elliptic or two and three-dimensional parabolic problems. If the discretization is consistent, preferably of higher order in the discretization parameter, the numerical verification of the SSC for these problems, even for relatively coarse discretizations, may be expected to yield clues on the optimality of the approximated continuous solution. It is in this spirit that below a class of both parabolic and elliptic control problems in one respectively two space dimensions is considered. The problems are discretized and the SSC are verified. Since the parabolic problem is that from [1,9] and the elliptic problems are the ones from - with the exception of the problems for which singular or bang-bang controls were obtained, our results are supplementing those in these papers. In fact, the present work is the result of discussions with our coauthor of these papers. The approach presented below has been developed in the spirit of techniques used for ODE control problems, see e.g. . It must be noted, however, that our problems contain pointwise state constraints. Except in special cases it has not been shown, yet, that then the standard SSC are sufficient for (local) optimality. This problem was discussed in the elliptic case in  and is even more delicate in the parabolic case .
In the following section both the parabolic and elliptic control problems are stated. Some known SSC results are quoted in the third section. In section 4 the way in which the discrete SSC are verified is described followed by results for cases from the above sources in section 5. Concluding remarks are made in the last section.