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