Please help me to determine the Jacobian matrix of $n$ functions with $n$ parameters with C++.
I know MATLAB has the possibility to determine the Jacobian matrix by using
jacobian(f,v), but I have to use C++.
I will appreciate your help.
This is not an easy task, and I wonder whether or not you should also ask at StackOverflow. You certainly do not want to hardcode symbolic derivatives in C++ all by your lonesome, so I would recommend reading the following sources.
Automatic Differentiation has a great set of C/C++ toolkits designed specifically for automatic differentiation (creatively titled, of course). I have also read that many people embed different bits within their code, like maxima. Finally, the source code for this symbolic differentiation software is freely available, and can likely be adapted to suit your needs.
I hope this helps!
For c++, have a look at Eigen’s numerical differentiation module. I personally only used the nonlinear solvers from Eigen, but they use the same numerical differentiation module to evaluate the jacobian numerically).