Remove unnecessary calculations to compute total derivative when there are state variables
Summary
The calculation of the total derivatives of f
when there are state variables w
is made according to the forumla:
\dfrac{df}{dx}(x,y,w) = \dfrac{\partial f}{\partial x}(x,y,w) - \dfrac{\partial f}{\partial y,w}(x,y) \left[\dfrac{\partial R}{\partial y,w}(x,y)\right]^{-1} \dfrac{\partial R}{\partial x}(x,y).
In the current version of the code, for a given set of variables x
, the quantity computed was instead \dfrac{df}{dx, w}(x,y,w)
, resulting in unnecessary computations and an output dictionnary with possibly unwanted entries.