An optimal control problem with variable structure is studied in this paper. The first variation and increment of the associated functional $J(s_1)$ are derived. An explicit analytical expression for the functional’s gradient is obtained, and its differentiability under certain conditions is established. Furthermore, an analytical
representation of $J(s_1)$ is provided, and its validity is rigorously proved. Based on this analysis, an algorithm is developed for solving the considered problem.