I need to calculate the Jacobian $\frac{df}{dx}$ of $f=A^{-1}b$ where $A$ and $b$ are a function of $x$, the variable towards to differentiate.
I thought
$\frac{df}{dx} = \frac{dA^{-1}}{dx} b + A^{-1}\frac{db}{dx}$
by the product rule, and since $A^{-1}A=I$,
$\frac{dA^{-1}}{dx} = A^{-1} \frac{dA}{dx} A^{-1}.$
Now the last thing i thought is
$\frac{dA}{dx} = \frac{dA}{dx_1} + \frac{dA}{dx_2} + \frac{dA}{dx_3} + \cdots $
The last step is to calculate the Jacobian of a matrix. However, if I try this for a simple example, I get a wrong answer. Can anyone see where I make the mistake? How can I calculate the Jacobian of $f=A^{-1}b$ correct if I cannot analytically invert $A$ (I can only do that numerically)?