The functions and are sufficiently smooth and are of appropriate dimension. The upper subscript denotes the dependence on the stepsize. The optimization variable will comprise both the discretized state and control variables.

The form (3.1) will be achieved by solving
the elliptic equation (2.2)
with the standard five-point-star discretization scheme.
Choose a number
and the stepsize
Consider the mesh points

and define the following sets of indices residing either in the domain or on the boundary , resp. on the subsets of the boundary:

Obviously, we have ; define further .

Now we shall present discretization schemes for the
distributed control problem that are similar to those for boundary controls
considered in Part 1 [23].
The optimization variable in (3.1) is taken as the vector

The remaining state variables are are determined by the Dirichlet condition (2.4) as

The derivative in the direction of the outward normal is approximated by the expression where

Then the discrete form of the Neumann boundary condition (2.3) leads to the

The application of the five-point-star to the elliptic equation in (2.2) yields the following

Note that the Dirichlet condition (3.3) is used in this equation to substitute the variables for . The control and state inequality constraints (2.5) and (2.6) yield the

Observe that these inequality constraints do not depend on the meshsize . The discretized form of the cost function (2.1) is

In summary, the relations (3.5)-(3.9) define
a NLP-problem of the form (3.1).
The corresponding Lagrangian function is

where the Lagrange multipliers , and are associated with the equality constraints (3.5) and (3.6), resp. the inequality constraints (3.7) and (3.8). In addition, the multipliers and satisfy the complementarity conditions corresponding to (2.14):

In the next step we discuss the necessary conditions of optimality:

For

In these equations, the up to now undefined multipliers are set to

which is in accordance with the Dirichlet condition (2.12). We deduce from equations (3.11) that the Lagrange multipliers satisfy the five-point-star difference equations for the adjoint equation in (2.10) if we use the following approximations for the multiplier function and the regular Borel measure ,

where in the second relation denotes a square centered at with area . Recall the decomposition (2.15) of the measure . If the singular part of the measure vanishes, i.e. holds, then (3.13) yields the following approximation for the density ,

In case that the measure is a delta distribution, we obtain from (3.13) the approximation

For indices on the boundary , e.g., for , we obtain

These relations represent the discrete version of the Neumann boundary condition (2.11) if we approximate the regular Borel measure on the boundary by

where denotes a line segment of length on centered at If the singular part in the decomposition (2.15) vanishes resp. if the measure is a delta distribution, we obtain the following approximations

Finally, necessary conditions with respect to the *control variables*
for
are determined by

From this equation we recover the discrete version of the control law (2.13), if we use the same identification as in (3.13).

2000-10-06