  In this paper, we derive explicit second-order necessary and sufficient
optimality conditions of a local minimizer to an optimal control problem for a
quasilinear second-order partial differential equation with a piecewise smooth
but not differentiable nonlinearity in the leading term. The key argument rests
on the analysis of level sets of the state. Specifically, we show that if a
function vanishes on the boundary and its the gradient is different from zero
on a level set, then this set decomposes into finitely many closed simple
curves. Moreover, the level sets depend continuously on the functions defining
these sets. We also prove the continuity of the integrals on the level sets. In
particular, Green's first identity is shown to be applicable on an open set
determined by two functions with nonvanishing gradients. In the second part to
this paper, the explicit sufficient second-order conditions will be used to
derive error estimates for a finite-element discretization of the control
problem.
