Qualitative and quantitative analysis of optimal-control problems and inverse problems in mathematical physics largely implies the calculation of functional gradients giving optimality criteria or closing errors. As a rule, this procedure is used in calculating necessary extremum conditions and in gradient methods. If a system under study is linear, then calculation of a functional gradient presents no serious difficulties. Yet, in nonlinear problems of mathematical physics there arise substantial difficulties stemming from the fact that, as the control (parameter to be identified) is put to variation, the state function of the system also undergo changes. Thus, for the functional gradient to be found, differentiability of the state function with respect to control must be established. Substantiation of this property for nonlinear infinite-dimensional systems is a point far from being trivial. Moreover, the example given below shows that, although the system of interest contains no nonsmooth expressions, the required property can be violated. This circumstance does not allow one to calculate functional gradients by standard methods and use traditional optimization methods. Nonetheless, the system under study displays a property that can be considered as a weak form of differentiability of the state function with respect to control. As a result, we arrive at the notion of extended derivative of an operator, presenting generalization of the classical types of operator derivatives. With the help of this notion, one can find a functional gradient even if its direct determination is impossible. In this way, we can enlarge the area of applicability of optimization methods. It is shown that, for extended derivatives, an analogue to the inverse function theorem can be formulated which makes it possible to give a general scheme permitting calculation of functional gradients in nonlinear problems of mathematical physics even in those cases in which the state function turns out to be a nondifferentiable function of the control variable.