We develop a general framework based on the functional derivative to extract nonlinear dynamical response functions from the temporal evolution of physical quantities, without explicitly computing multipoint correlation functions. We validate our approach by calculating the second-and third-order optical responses in the Rice—Mele model and further apply it to a many-body interacting system using a tensor network method. This framework is broadly applicable to any method that can compute real-time dynamics, offering a powerful and versatile tool for investigating nonlinear responses in dynamical systems.
