How do I calculate the perturbations to the metric determinant for 3º order? From the post How do I calculate the perturbations to the metric determinant?,
I'm trying to calculate the expansion of the metric's determinant $\sqrt{-g}$ up to 3rd order. I saw in another post the procedure until further notice. but I'm not understanding this step:
\begin{align}
&= \sqrt{-\det{b}}\left(1 + \frac{1}{2}\operatorname{tr}(b^{-1}h)-\frac{1}{4}\operatorname{tr}{(b^{-1}h)^2} + \frac{1}{2}\left(\frac{1}{2}\operatorname{tr}(b^{-1}h)-\frac{1}{4}\operatorname{tr}{(b^{-1}h)^2}\right)^2\right) + \mathcal O(h^3)\\
&= \sqrt{-\det{b}}\left(1 + \frac{1}{2}\operatorname{tr}(b^{-1}h)-\frac{1}{4}\operatorname{tr}{(b^{-1}h)^2} + \frac{1}{8}\operatorname{tr}^2{(b^{-1}h)}\right) + \mathcal O(h^3)\\
\end{align}
I also don't understand how Tr and Tr² is calculated. Can anybody help me?
 A: Following the calculations from the post you reference, note that all they have done is Taylor expand the logarithm and then the exponential. For that, we need to know the following Taylor identities:
\begin{align}
\exp(x)=&1+x+\frac{1}{2!}x^2+\frac{1}{3!}x^3+\dots\\
\log(1+x)=&x-\frac{1}{2}x^2+\frac{1}{3}x^3+\dots
\end{align}
Therefore we have:
\begin{align}
\sqrt{-\det{g}}=&\sqrt{-\det{b}}\exp{\left[\frac{1}{2}\log{\det{1+b^{-1}h}}\right]}\\
=&\sqrt{-\det{b}}\exp{\left[\frac{1}{2}\rm{tr}\,{\log{1+b^{-1}h}}\right]}\\
=&\sqrt{-\det{b}}\exp{\left[\frac{1}{2}\rm{tr}\left[b^{-1}h-\frac{1}{2}(b^{-1}h)^2+\frac{1}{3}(b^{-1}h)^3+\dots\right]\right]}\\
=&\sqrt{-\det{b}}\exp{\left[\frac{1}{2}\rm{tr}(b^{-1}h)-\frac{1}{4}\rm{tr}(b^{-1}h)^2+\frac{1}{6}\rm{tr}(b^{-1}h)^3+\dots\right]}\\
=&\sqrt{-\det{b}}\left[1+\frac{1}{2}\rm{tr}(b^{-1}h)-\frac{1}{4}\rm{tr}(b^{-1}h)^2+\frac{1}{6}\rm{tr}(b^{-1}h)^3\right.\\
&\left.+\frac{1}{2}\left(\frac{1}{2}\rm{tr}(b^{-1}h)-\frac{1}{4}\rm{tr}(b^{-1}h)^2+\frac{1}{6}\rm{tr}(b^{-1}h)^3\right)^2+\frac{1}{3!}\left(\frac{1}{2}\rm{tr}(b^{-1}h)-\frac{1}{4}\rm{tr}(b^{-1}h)^2+\frac{1}{6}\rm{tr}(b^{-1}h)^3\right)^3+\dots\right].
\end{align}
From there you just need to substitute $b$ for your backround metric (being $b=1$ for Minkowski) and compute just up the order 3 terms in the same way they do in the original post. Hope this is useful :)
