Solution (source code)

= Solution

Differentiate $g^{ac}g_{cb}=\delta^a_b$ while holding the coordinate system fixed. The <variation of inverse metric> obeys
$$
(\delta g^{ac})g_{cb}+g^{ac}\delta g_{cb}=0.
$$
Multiplication by the inverse <metric tensor> gives
$$
\boxed{\delta g^{cd}=-g^{ca}g^{db}\delta g_{ab}.}
$$
This is the <matrix> inverse <derivative> written with <tensor> indices. A variation of the <metric tensor> is symmetric, so the right-hand side is symmetric in $c,d$.