This question had a great answer for efficiently updating the matrix expression
$$(A+gB)^{-1}$$
for new values of the scalar $g$. I have a similar expression, only with an additional $g^2C$ term that I would like to efficiently update for new values of $g$.
$$(A+gB+g^2C)^{-1}$$
My immediate thought was to make the substitution $B_1 = B + gC$ and use the same tactic in a chain, i.e.:
$$(A+gB_1)^{-1} = B_1^{-1} P_1(D_1+gI)^{-1}P_1^{-1}$$
where $P_1$ and $D_1$ come from the eigenvalue decomposition
$$AB_1^{-1} = P_1 D_1 P_1^{-1}$$
and
$$B_1^{-1} = (B + gC)^{-1} = C^{-1}P(D+gI)^{-1}P^{-1}$$
where $P$ and $D$ come from the eigenvalue decomposition
$$BC^{-1} = P D P^{-1}$$
This ended up not being a great route to go down because it requires finding eigenvalue decomposition of $AB_1^{-1}$ for every update of $g$.
Is there another approach that might be more fruitful, or am I just trying to chase something that isn't there?
EDIT:
$A$ ,$B$, and $C$ are all symmetric and complex. $C$ is invertable but $A$ and $B$ aren't necessarily so. If you have a solution that needs to violate any of these constraints, I would still definitely be interested in hearing it.