We study resonances of nonlinear systems of differential equations, including but not limited to the equations of motion of a particle moving in a potential. We use the calculus of variations to determine the minimal additive forcing function that induces a desired terminal response, such as an energy in the case of a physical system. We include the additional constraint that only select degrees of freedom be forced, corresponding to a very general class of problems in which not all of the degrees of freedom in an experimental system are accessible to forcing. We find that certain Lagrange multipliers take on a fundamental physical role as the effective forcing experienced by the degrees of freedom which are not forced directly. Furthermore, we find that the product of the displacement of nearby trajectories and the effective total forcing function is a conserved quantity. We demonstrate the efficacy of this methodology with several examples.