Computes the partial derivative of a constrained cost function with respect to states. Uses central difference method while keeping parameters fixed.
Formula: ∂f/∂x_i ≈ (f(p, x+h·e_i) - f(p, x-h·e_i)) / (2h)
Parameter vector p (kept fixed)
State vector x
Constrained cost function f(p, x)
Optional numerical differentiation settings
Gradient vector ∂f/∂x
Computes the partial derivative of a constrained cost function with respect to states. Uses central difference method while keeping parameters fixed.
Formula: ∂f/∂x_i ≈ (f(p, x+h·e_i) - f(p, x-h·e_i)) / (2h)