Appendix A: Signature of the definition of \(\xi \)
In this appendix, we would show that if we choose an opposite signature of the definition of \(\xi \) given by Ref. [17], i.e.,
$$\begin{aligned} \xi =-\delta X^R, \end{aligned}$$
(A1)
then it seems self-consistent that the variation of energy density obtained by different ways would be the same. Similarly to [17], assume that
$$\begin{aligned} N_{R\Theta \Phi }=q(X^R)\sin X^{\Theta }, \end{aligned}$$
(A2)
where q is an arbitrary function of \(X^R\). By Eq. (17), the number density can be expressed as
$$\begin{aligned} \nu =\frac{q(X^R)}{r^2}\sqrt{e^{-2\Lambda }\left( \frac{\partial X^R}{\partial r}\right) ^2-e^{-2\Phi }\left( \frac{\partial X^R}{\partial t}\right) ^2} \,. \end{aligned}$$
(A3)
If we choose \(\xi =-\delta X^R\), then the variation of Eq. (A3) gives
$$\begin{aligned} \delta \nu =-\nu \left( \frac{\partial \xi }{\partial r}+\left( \frac{1}{\nu }\frac{\partial \nu }{\partial r}+\frac{\partial \Lambda }{\partial r}+\frac{2}{r}\right) \xi +\lambda \right) . \end{aligned}$$
(A4)
In general relativity, following the main processes presented in [17], we find that
$$\begin{aligned} \lambda _{GR}=-\frac{r}{2}e^{2\Lambda }\varrho '\nu \xi . \end{aligned}$$
(A5)
Together with the background equation of motion
$$\begin{aligned} \varrho '\nu =p+\rho =\frac{2}{r}e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial r}+\frac{\partial \Phi }{\partial r}\right) , \end{aligned}$$
(A6)
substituting Eq. (A5) into Eq. (A4) yields
$$\begin{aligned} \delta \nu _{GR} = -\nu \left( \frac{\partial \xi }{\partial r}+\frac{2}{r}\xi -\frac{\partial \Phi }{\partial r}\xi +\frac{1}{\nu }\frac{\partial \nu }{\partial r}\xi \right) . \end{aligned}$$
(A7)
However, the variation of the energy density \(\delta \rho \) can also be written as [12]
$$\begin{aligned} \delta \rho _{GR}=-\frac{1}{r^2}\frac{\partial }{\partial r}[r^2(p+\rho )\xi ] \,, \end{aligned}$$
(A8)
combining with Eq. (A6), directly calculation shows that
$$\begin{aligned} \delta \rho _{GR} =\varrho '\delta \nu _{GR}. \end{aligned}$$
(A9)
Generalize to f(R) theories, Eq.(A5) becomes to
$$\begin{aligned} \lambda _{f(R)}=\mathcal {F}^{-1}\left( \frac{\partial b}{\partial r}-\frac{\partial \Phi }{\partial r}b-e^{2\Lambda }\varrho '\nu \xi \right) , \end{aligned}$$
(A10)
then
$$\begin{aligned} \delta \nu _{f(R)}= & {} -\nu \left( \frac{\partial \xi }{\partial r}+\left( \frac{1}{\nu }\frac{\partial \nu }{\partial r}+\frac{2}{r}+\frac{\partial \Lambda }{\partial r}\right) \xi +\lambda \right) \nonumber \\= & {} -\nu \left( \frac{\partial \xi }{\partial r}+\left( \frac{1}{\nu }\frac{\partial \nu }{\partial r}+\frac{2}{r}-\frac{\partial \Phi }{\partial r}\right) \xi +\mathcal {F}^{-1}\frac{\partial b}{\partial r}\right. \nonumber \\&\left. -\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r}b+f_R''\mathcal {F}^{-1} \right) . \end{aligned}$$
(A11)
Take the variation of Eq.(33) in f(R) theories,
$$\begin{aligned} \delta \rho _{f(R)}= & {} -\varrho '\nu \frac{\partial \xi }{\partial r}-\mathcal {F}^{-1}\varrho '\nu \frac{\partial b}{\partial r}+\left[ \varrho '\nu \frac{\partial \Phi }{\partial r} +\frac{\varrho '^2}{\varrho ''}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. -\frac{2}{r}\varrho '\nu -\varrho '\nu f_R''\mathcal {F}^{-1}\right] \xi +\mathcal {F}^{-1}\varrho '\nu \frac{\partial \Phi }{\partial r}b \nonumber \\= & {} -\varrho '\nu \left[ \frac{\partial \xi }{\partial r}+\mathcal {F}^{-1}\frac{\partial b}{\partial r}-\frac{\partial \Phi }{\partial r}\xi +\frac{1}{\nu }\frac{\partial \nu }{\partial r}\xi +\frac{2}{r}\xi \right. \nonumber \\&\left. +f_R''\mathcal {F}^{-1}\xi -\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r}b \right] \nonumber \\= & {} \varrho '\delta \nu _{f(R)}. \end{aligned}$$
(A12)
So Eqs. (A9) and A12) show that it is self-consistent if we define the “Lagrangian displacement” as \(\xi =-\delta X^R\).
Appendix B: Detailed calculation and result of dynamical stability criterion
In this appendix, we will show the detailed calculations of how to obtain the criterion for dynamical stability. The main goal is to eliminate the time-evolution terms in Eq. (28). Some relationships are repeatedly used, such as Eq. (21). We also use the background equation of motion, which takes the form
$$\begin{aligned} p+\rho =\varrho '\nu =e^{-2\Lambda }\left( \frac{\partial \Phi }{\partial r}+\frac{\partial \Lambda }{\partial r}\right) \mathcal {F}-e^{-2\Lambda }f_R''. \end{aligned}$$
(B1)
We already have time-evolution equations of variables b, \(\lambda \) and \(\xi \), see Eqs. (24), (25) and (26). From Eq. (24), we obtain
$$\begin{aligned} \mathcal {F}\frac{\partial ^2\phi }{\partial r^2}= & {} -\frac{\partial \mathcal {F}}{\partial r}\frac{\partial \phi }{\partial r} +2e^{2\Lambda -2\Phi }\left( \frac{\partial \Lambda }{\partial r}-\frac{\partial \Phi }{\partial r}\right) \frac{\partial ^2b}{\partial t^2}\nonumber \\&+e^{2\Lambda -2\Phi }\frac{\partial }{\partial r}\frac{\partial ^2b}{\partial t^2} -\left( \frac{\partial ^2\Phi }{\partial r^2}-\frac{2}{r^2}\right) \frac{\partial b}{\partial r} \nonumber \\&-\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \frac{\partial ^2b}{\partial r^2} \nonumber \\&-\left( -\frac{2}{r^2}\frac{\partial \Lambda }{\partial r}+\frac{2}{r}\frac{\partial ^2\Lambda }{\partial r^2} +\frac{\partial ^2\Lambda }{\partial r^2}\frac{\partial \Phi }{\partial r}+\frac{\partial \Lambda }{\partial r}\frac{\partial ^2\Phi }{\partial r^2} \right. \nonumber \\&\left. -2\frac{\partial \Phi }{\partial r}\frac{\partial ^2\Phi }{\partial r^2}-\frac{\partial ^3\Phi }{\partial r^3}\right) b \nonumber \\&-\left( \frac{2}{r}\frac{\partial \Lambda }{\partial r}+\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}-\left( \frac{\partial \Phi }{\partial r}\right) ^2 -\frac{\partial ^2\Phi }{\partial r^2}\right) \frac{\partial b}{\partial r} \nonumber \\&+\left( 2\left( \frac{\partial ^2\Phi }{\partial r^2}-\frac{2}{r^2}\right) \mathcal {F} +2\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \frac{\partial \mathcal {F}}{\partial r}\right. \nonumber \\&\left. +\frac{12}{r^3}f_R-\frac{6}{r^2}f_R'\right) \lambda +\left( 2\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \mathcal {F}-\frac{6}{r^2}f_R\right) \frac{\partial \lambda }{\partial r} \nonumber \\&+2e^{2\Lambda }\frac{\partial \Lambda }{\partial r}\varrho ''\nu \delta \nu +e^{2\Lambda }\varrho '''\frac{\partial \nu }{\partial r}\nu \delta \nu +e^{2\Lambda }\varrho ''\frac{\partial \nu }{\partial r}\delta \nu \nonumber \\&+e^{2\Lambda }\varrho ''\nu \frac{\partial \delta \nu }{\partial r} \,. \end{aligned}$$
(B2)
Note that Eq. (23) yields
$$\begin{aligned}&\mathcal {F}e^{2\Lambda -2\Phi }\frac{\partial ^2\lambda }{\partial t^2}\nonumber \\&\quad = e^{2\Lambda -2\Phi }\left( \frac{\partial }{\partial r}\frac{\partial ^2b}{\partial t^2} -\frac{\partial \Phi }{\partial r}\frac{\partial ^2b}{\partial t^2}-e^{2\Lambda }\varrho '\nu \frac{\partial ^2\xi }{\partial t^2}\right) . \end{aligned}$$
(B3)
Together with Eqs. (25) and (B3), and then using Eq. (B2), we obtain
$$\begin{aligned}&\mathcal {F}e^{2\Lambda }\left( R-\frac{2}{r^2}\right) \lambda +\mathcal {F}\frac{e^{2\Lambda }b}{2f_{RR}} +\mathcal {F}\left( \frac{2}{r}+2\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\quad \left. -\frac{\partial \Lambda }{\partial r}\right) \frac{\partial \phi }{\partial r} -\mathcal {F}\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \frac{\partial \lambda }{\partial r}\nonumber \\&\quad +2e^{2\Lambda -2\Phi }\left( \frac{\partial \Lambda }{\partial r}-\frac{\partial \Phi }{\partial r}\right) \frac{\partial ^2b}{\partial t^2} \nonumber \\&\quad -\left( \frac{\partial ^2\Phi }{\partial r^2}-\frac{2}{r^2}\right) \frac{\partial b}{\partial r} -\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \frac{\partial ^2b}{\partial r^2}\nonumber \\&\quad -\left( -\frac{2}{r^2}\frac{\partial \Lambda }{\partial r}+\frac{2}{r}\frac{\partial ^2\Lambda }{\partial r^2} +\frac{\partial ^2\Lambda }{\partial r^2}\frac{\partial \Phi }{\partial r}+\frac{\partial \Lambda }{\partial r}\frac{\partial ^2\Phi }{\partial r^2} \right. \nonumber \\&\quad \left. -2\frac{\partial \Phi }{\partial r}\frac{\partial ^2\Phi }{\partial r^2}-\frac{\partial ^3\Phi }{\partial r^3}\right) b \nonumber \\&\quad -\left( \frac{2}{r}\frac{\partial \Lambda }{\partial r}+\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}-\left( \frac{\partial \Phi }{\partial r}\right) ^2 -\frac{\partial ^2\Phi }{\partial r^2}\right) \frac{\partial b}{\partial r}\nonumber \\&\quad +\left( 2\left( \frac{\partial ^2\Phi }{\partial r^2}-\frac{2}{r^2}\right) \mathcal {F} +2\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \frac{\partial \mathcal {F}}{\partial r}\right. \nonumber \\&\quad \left. +\frac{12}{r^3}f_R-\frac{6}{r^2}f_R'\right) \lambda \nonumber \\&\quad +\left( 2\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \mathcal {F}-\frac{6}{r^2}f_R\right) \frac{\partial \lambda }{\partial r} +2e^{2\Lambda }\frac{\partial \Lambda }{\partial r}\varrho ''\nu \delta \nu \nonumber \\&\quad +e^{2\Lambda }\varrho '''\frac{\partial \nu }{\partial r}\nu \delta \nu \nonumber \\&\quad +e^{2\Lambda }\varrho ''\frac{\partial \nu }{\partial r}\delta \nu +e^{2\Lambda }\varrho ''\nu \frac{\partial \delta \nu }{\partial r} -\frac{\partial \mathcal {F}}{\partial r}\frac{\partial \phi }{\partial r} \nonumber \\&\quad +e^{2\Lambda -2\Phi }\frac{\partial \Phi }{\partial r}\frac{\partial ^2b}{\partial t^2} -e^{2\Lambda }\varrho '\nu \frac{\partial \phi }{\partial r}\nonumber \\&\quad -e^{2\Lambda }\nu \left( \frac{\partial }{\partial r}+\frac{\partial \Phi }{\partial r}\right) (\varrho ''\delta \nu ) = 0 \,. \end{aligned}$$
(B4)
Simplified this relation we have
$$\begin{aligned}&\frac{6}{r^2}\mathcal {F}^{-1}f_Re^{2\Lambda -2\Phi }\frac{\partial ^2b}{\partial t^2} = -\mathcal {F}e^{2\Lambda }\left( R-\frac{2}{r^2}\right) \lambda \nonumber \\&\quad -\mathcal {F}\frac{e^{2\Lambda }b}{2f_{RR}} +\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \frac{\partial ^2b}{\partial r^2} \nonumber \\&\quad +\left( -\frac{2}{r^2}\frac{\partial \Lambda }{\partial r}+\frac{2}{r}\frac{\partial ^2\Lambda }{\partial r^2} +\frac{\partial ^2\Lambda }{\partial r^2}\frac{\partial \Phi }{\partial r}+\frac{\partial \Lambda }{\partial r}\frac{\partial ^2\Phi }{\partial r^2} \right. \nonumber \\&\quad \left. -2\frac{\partial \Phi }{\partial r}\frac{\partial ^2\Phi }{\partial r^2}-\frac{\partial ^3\Phi }{\partial r^3}\right) b \nonumber \\&\quad +\left( \frac{2}{r}\frac{\partial \Lambda }{\partial r}+\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}-\left( \frac{\partial \Phi }{\partial r}\right) ^2 -\frac{2}{r^2}\right) \frac{\partial b}{\partial r} \nonumber \\&\quad -\left( 2\left( \frac{\partial ^2\Phi }{\partial r^2}-\frac{2}{r^2}\right) \mathcal {F} +2\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \frac{\partial \mathcal {F}}{\partial r}\right. \nonumber \\&\quad \left. +\frac{12}{r^3}f_R-\frac{6}{r^2}f_R'\right) \lambda \nonumber \\&\quad +\left( \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) -\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \frac{\partial \mathcal {F}}{\partial r}\lambda \nonumber \\&\quad -\left( \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) -\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \nonumber \\&\quad \times \left( \frac{\partial ^2b}{\partial r^2}-\frac{\partial ^2\Phi }{\partial r^2}b-\frac{\partial \Phi }{\partial r}\frac{\partial b}{\partial r} -2e^{2\Lambda }\frac{\partial \Lambda }{\partial r}\varrho '\nu \xi \right. \nonumber \\&\quad \left. -e^{2\Lambda }\varrho ''\frac{\partial \nu }{\partial r}\nu \xi -e^{2\Lambda }\varrho '\frac{\partial \nu }{\partial r}\xi -e^{2\Lambda }\varrho '\nu \frac{\partial \xi }{\partial r}\right) \nonumber \\&\quad -e^{2\Lambda }\varrho ''\frac{\partial \nu }{\partial r}\delta \nu +\left( \frac{\partial \Phi }{\partial r}-2\frac{\partial \Lambda }{\partial r}+\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \nonumber \\&\quad \times \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \frac{\partial b}{\partial r}+\left( \frac{\partial \Phi }{\partial r}-2\frac{\partial \Lambda }{\partial r}+\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \nonumber \\&\quad \times \,\left( \frac{2}{r}\frac{\partial \Lambda }{\partial r} +\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}-\left( \frac{\partial \Phi }{\partial r}\right) ^2-\frac{\partial ^2\Phi }{\partial r^2}\right) b \nonumber \\&\quad -\left( \frac{\partial \Phi }{\partial r}-2\frac{\partial \Lambda }{\partial r}+\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \nonumber \\&\quad \times \left( 2\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \mathcal {F}-\frac{6}{r^2}f_R\right) \lambda \nonumber \\&\quad -\frac{6}{r^2}\mathcal {F}^{-1}f_Re^{2\Lambda }\varrho ''\nu \delta \nu . \end{aligned}$$
(B5)
Now we pay attention to Eq. (28)
$$\begin{aligned} \mathcal {P}_{Dyn}= & {} \int _r -r^2e^{3\Lambda -\Phi }\varrho '\nu \xi \frac{\partial ^2\xi }{\partial t^2} +r^2 e^{\Lambda -\Phi }\lambda \frac{\partial ^2b}{\partial t^2}\nonumber \\&+r^2e^{\Lambda -\Phi }b\frac{\partial ^2\lambda }{\partial t^2}. \end{aligned}$$
(B6)
Substituting Eqs. (25) and (26) into Eq. (B6), and using integration by parts, then
$$\begin{aligned} \mathcal {P}_{Dyn}= & {} \int _r r^2e^{\Lambda +\Phi }\xi \varrho '\nu \frac{\partial \phi }{\partial r} -2re^{\Lambda +\Phi }\nu \varrho ''\xi \delta \nu \nonumber \\&-r^2e^{\Lambda +\Phi }\frac{\partial \Lambda }{\partial r}\nu \varrho ''\xi \delta \nu -r^2e^{\Lambda +\Phi }\nu \varrho ''\frac{\partial \xi }{\partial r}\delta \nu \nonumber \\&+r^2e^{\Lambda +\Phi }\varrho '\frac{\partial \Phi }{\partial r}\xi \delta \nu +r^2 e^{\Lambda -\Phi }\mathcal {F}^{-2}\nonumber \\&\times \left( -e^{2\Lambda }\varrho '\nu b-\frac{6}{r^2}f_R b -\mathcal {F}e^{2\Lambda }\varrho '\nu \xi \right) \frac{\partial ^2b}{\partial t^2} \nonumber \\&+r^2e^{\Lambda +\Phi }b\mathcal {F}^{-1}\varrho '\nu \frac{\partial \phi }{\partial r} -2re^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho ''\nu b\delta \nu \nonumber \\&-r^2e^{\Lambda +\Phi }\frac{\partial \Lambda }{\partial r}\mathcal {F}^{-1}\varrho ''\nu b\delta \nu \nonumber \\&+r^2e^{\Lambda +\Phi }\frac{\partial \Phi }{\partial r}\mathcal {F}^{-1}\varrho 'b\delta \nu -r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho ''\nu \frac{\partial b}{\partial r}\delta \nu \nonumber \\&+r^2\mathcal {F}^{-2}e^{\Lambda +\Phi }\frac{\partial \mathcal {F}}{\partial r}\varrho ''\nu b\delta \nu . \end{aligned}$$
(B7)
Together with Eqs. (24) and (B5), all time-evolution terms eliminated in \(\mathcal {P}_{Dyn}\),
$$\begin{aligned} \mathcal {P}_{Dyn}= & {} \int _r r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\left\{ -\varrho '\nu \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \xi \frac{\partial b}{\partial r}\right. \nonumber \\&\left. -\varrho '\nu \left( \frac{2}{r}\frac{\partial \Lambda }{\partial r} +\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}-\left( \frac{\partial \Phi }{\partial r}\right) ^2 -\frac{\partial ^2\Phi }{\partial r^2}\right) \xi b \right. \nonumber \\&+\varrho '\nu \left( 2\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \mathcal {F} -\frac{6}{r^2}f_R\right) \xi \lambda \nonumber \\&+\varrho '\nu e^{2\Lambda }\varrho ''\nu \xi \delta \nu -\frac{2}{r}\mathcal {F}\nu \varrho ''\xi \delta \nu -\mathcal {F}\frac{\partial \Lambda }{\partial r}\nu \varrho ''\xi \delta \nu \nonumber \\&-\mathcal {F}\nu \varrho ''\frac{\partial \xi }{\partial r}\delta \nu +\mathcal {F}\varrho '\frac{\partial \Phi }{\partial r}\xi \delta \nu \nonumber \\&-\mathcal {F}^{-1}\varrho '\nu \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) b\frac{\partial b}{\partial r} \nonumber \\&-\mathcal {F}^{-1}\varrho '\nu \left( \frac{2}{r}\frac{\partial \Lambda }{\partial r}+\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r} -\left( \frac{\partial \Phi }{\partial r}\right) ^2-\frac{\partial ^2\Phi }{\partial r^2}\right) b^2\nonumber \\&+\mathcal {F}^{-1}\varrho '\nu \left( 2\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \mathcal {F} -\frac{6}{r^2}f_R\right) b\lambda \nonumber \\&+\mathcal {F}^{-1}\varrho '\nu e^{2\Lambda }\varrho ''\nu b\delta \nu -\frac{2}{r}\varrho ''\nu b\delta \nu -\frac{\partial \Lambda }{\partial r}\varrho ''\nu b\delta \nu \nonumber \\&-\varrho ''\nu \frac{\partial b}{\partial r}\delta \nu +\mathcal {F}^{-1}\frac{\partial \mathcal {F}}{\partial r}\varrho ''\nu b\delta \nu \nonumber \\&+\mathcal {F}\left( R-\frac{2}{r^2}\right) b\lambda +\mathcal {F}\frac{b^2}{2f_{RR}} -\frac{6}{r^2} e^{-2\Lambda }\mathcal {F}^{-1}f_R b\frac{\partial ^2b}{\partial r^2} \nonumber \\&-e^{-2\Lambda } \left( -\frac{2}{r^2}\frac{\partial \Lambda }{\partial r}+\frac{2}{r}\frac{\partial ^2\Lambda }{\partial r^2} +\frac{\partial ^2\Lambda }{\partial r^2}\frac{\partial \Phi }{\partial r}+\frac{\partial \Lambda }{\partial r}\frac{\partial ^2\Phi }{\partial r^2}\right. \nonumber \\&\left. -2\frac{\partial \Phi }{\partial r}\frac{\partial ^2\Phi }{\partial r^2}-\frac{\partial ^3\Phi }{\partial r^3}\right) b^2 \nonumber \\&-e^{-2\Lambda }\left( \frac{2}{r}\frac{\partial \Lambda }{\partial r}+\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}-\left( \frac{\partial \Phi }{\partial r}\right) ^2 -\frac{2}{r^2}\right) b\frac{\partial b}{\partial r} \nonumber \\&+e^{-2\Lambda }\left( 2\left( \frac{\partial ^2\Phi }{\partial r^2}-\frac{2}{r^2}\right) \mathcal {F} +2\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \frac{\partial \mathcal {F}}{\partial r}\right. \nonumber \\&\left. +\frac{12}{r^3}f_R-\frac{6}{r^2}f_R'\right) b\lambda \nonumber \\&-e^{-2\Lambda }\left( \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) -\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \frac{\partial \mathcal {F}}{\partial r}b\lambda \nonumber \\&+e^{-2\Lambda }\left( \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) -\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) b \nonumber \\&\times \left( -\frac{\partial ^2\Phi }{\partial r^2}b-\frac{\partial \Phi }{\partial r}\frac{\partial b}{\partial r} -2e^{2\Lambda }\frac{\partial \Lambda }{\partial r}\varrho '\nu \xi -e^{2\Lambda }\varrho ''\frac{\partial \nu }{\partial r}\nu \xi \right. \nonumber \\&\left. -e^{2\Lambda }\varrho '\frac{\partial \nu }{\partial r}\xi -e^{2\Lambda }\varrho '\nu \frac{\partial \xi }{\partial r}\right) \nonumber \\&-e^{-2\Lambda }\left( \frac{\partial \Phi }{\partial r}-2\frac{\partial \Lambda }{\partial r}+\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \nonumber \\&\times \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) b\frac{\partial b}{\partial r} \nonumber \\&-e^{-2\Lambda }\left( \frac{\partial \Phi }{\partial r}-2\frac{\partial \Lambda }{\partial r} +\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \nonumber \\&\times \left( \frac{2}{r}\frac{\partial \Lambda }{\partial r} +\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}-\left( \frac{\partial \Phi }{\partial r}\right) ^2 -\frac{\partial ^2\Phi }{\partial r^2}\right) b^2 \nonumber \\&+e^{-2\Lambda }\left( \frac{\partial \Phi }{\partial r}-2\frac{\partial \Lambda }{\partial r} +\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \nonumber \\&\times \left( 2\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \mathcal {F}-\frac{6}{r^2}f_R\right) b\lambda \nonumber \\&\left. +\mathcal {F}^{-1}\frac{6}{r^2}f_R\varrho ''\nu b\delta \nu \right\} . \end{aligned}$$
(B8)
This is the explicit expression of \(\mathcal {P}_{Dyn}=(\psi , \mathcal {T}\psi )\) for f(R) gravity. Since the integration by parts would be used in the following calculation, we denote the terms associated with \(\mathcal {C}_{Dyn}^i\) by \(\mathcal {P}_{Dyn}^i\). Now we can read off each \(\mathcal {P}_{Dyn}^i\) coefficients from Eq. (B8) one by one:
The first term is the \(\left( \frac{\partial b}{\partial r}\right) ^2\) term,
$$\begin{aligned} \mathcal {P}_{Dyn}^1 = \int _r (\mathcal {F}^{-2}r^2e^{\Lambda +\Phi }\varrho ''\nu ^2 +6\mathcal {F}^{-2}e^{-\Lambda +\Phi }f_R)\left( \frac{\partial b}{\partial r}\right) ^2,\nonumber \\ \end{aligned}$$
(B9)
hence
$$\begin{aligned} \mathcal {C}_{Dyn}^1 = \mathcal {F}^{-2}r^2e^{\Lambda +\Phi }\varrho ''\nu ^2+6\mathcal {F}^{-2}e^{-\Lambda +\Phi }f_R. \end{aligned}$$
(B10)
The second term is the \(\left( \frac{\partial \xi }{\partial r}\right) ^2\) term,
$$\begin{aligned} \mathcal {P}_{Dyn}^2 = \int _r r^2e^{\Lambda +\Phi }\varrho ''\nu ^2\left( \frac{\partial \xi }{\partial r}\right) ^2, \end{aligned}$$
(B11)
so
$$\begin{aligned} \mathcal {C}_{Dyn}^2 = r^2e^{\Lambda +\Phi }\varrho ''\nu ^2. \end{aligned}$$
(B12)
The third term is the \(\xi \frac{\partial b}{\partial r}\) term:
$$\begin{aligned} \mathcal {P'}_{Dyn}^3= & {} \int _r -r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho '\nu \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \xi \frac{\partial b}{\partial r}\nonumber \\&+r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho '\nu \left( 2\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) -\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \nonumber \\&\times \xi \frac{\partial b}{\partial r} -r^2e^{\Lambda +\Phi }\mathcal {F}^{-2}\varrho '\nu e^{2\Lambda }\varrho ''\nu ^2\xi \frac{\partial b}{\partial r}\nonumber \\&+2re^{\Lambda +\Phi }\varrho ''\nu ^2\mathcal {F}^{-1}\xi \frac{\partial b}{\partial r} +r^2e^{\Lambda +\Phi }\frac{\partial \Lambda }{\partial r}\varrho ''\nu ^2\mathcal {F}^{-1}\xi \frac{\partial b}{\partial r} \nonumber \\&-r^2e^{\Lambda +\Phi }\varrho '\nu \frac{\partial \Phi }{\partial r}\mathcal {F}^{-1}\xi \frac{\partial b}{\partial r}+r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho ''\nu ^2\nonumber \\&\left( \left( \frac{\partial \Lambda }{\partial r}+\frac{2}{r}+\frac{1}{\nu }\frac{\partial \nu }{\partial r}\right) -\mathcal {F}^{-1}e^{2\Lambda }\varrho '\nu \right) \xi \frac{\partial b}{\partial r} \nonumber \\= & {} \int _r \left[ r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho '\nu \left( \left( -\frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) -\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \right. \nonumber \\&\left. -2r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\left( \frac{\partial \Phi }{\partial r}-\frac{2}{r}-\mathcal {F}^{-1}f_R''\right) \varrho ''\nu ^2 \right] \xi \frac{\partial b}{\partial r}.\nonumber \\ \end{aligned}$$
(B13)
And the fourth term is the \(b\frac{\partial \xi }{\partial r}\) term:
$$\begin{aligned} \mathcal {P'}_{Dyn}^4= & {} \int _r -r^2e^{\Lambda +\Phi }\nu \varrho ''\frac{\partial \xi }{\partial r}\delta \nu +r^2e^{\Lambda +\Phi }\mathcal {F}^{-2}\varrho '\nu e^{2\Lambda }\varrho ''\nu b\delta \nu \nonumber \\&-2re^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho ''\nu b\delta \nu -r^2e^{\Lambda +\Phi }\frac{\partial \Lambda }{\partial r}\mathcal {F}^{-1}\varrho ''\nu b\delta \nu \nonumber \\&+r^2\mathcal {F}^{-2}e^{\Lambda +\Phi }\frac{\partial \mathcal {F}}{\partial r}\varrho ''\nu b\delta \nu \nonumber \\&-r^2\mathcal {F}^{-1}e^{\Lambda +\Phi }\varrho '\nu \left( \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) -\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) b\frac{\partial \xi }{\partial r}\nonumber \\&+r^2\mathcal {F}^{-2}e^{\Lambda +\Phi }\frac{6}{r^2}f_R\varrho ''\nu b\delta \nu \nonumber \\= & {} \int _r \left[ -2r^2e^{\Lambda +\Phi }\varrho ''\nu ^2\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. -r^2\mathcal {F}^{-1}e^{\Lambda +\Phi }\varrho '\nu \left( \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \right. \right. \nonumber \\&\left. \left. -\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \right] b\frac{\partial \xi }{\partial r}. \end{aligned}$$
(B14)
Note that using integration by parts and dropping boundary terms, \(\int _r\xi \frac{\partial b}{\partial r}\) terms and \(\int _r b\frac{\partial \xi }{\partial r}\) terms can translate to each other. To compare with the coefficients of thermodynamical stability criterion, we can rewrite the coefficients \(\mathcal {P'}_{Dyn}^3\) and \(\mathcal {P'}_{Dyn}^4\) as
$$\begin{aligned} \mathcal {P'}_{Dyn}^3= & {} \mathcal {P}_{Dyn}^3+\int _r r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho '\nu \nonumber \\&\times \left( -\frac{\partial \Phi }{\partial r}-\frac{2}{r} +\frac{6}{r^2}f_R\mathcal {F}^{-1}\right) \xi \frac{\partial b}{\partial r} \nonumber \\= & {} \mathcal {P}_{Dyn}^3+\mathcal {P}_{Dyn}^{3\leftrightarrow 4} +\int _r r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho '\nu \nonumber \\&\times \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r} -\frac{6}{r^2}f_R\mathcal {F}^{-1}\right) b\frac{\partial \xi }{\partial r}, \end{aligned}$$
(B15)
where
$$\begin{aligned} \mathcal {P}_{Dyn}^3= & {} \int _r \left[ -4e^{\Phi +\Lambda }\mathcal {F}^{-2}\varrho '\nu (f_R-r f_R')\right. \nonumber \\&\left. -2r^2e^{\Phi +\Lambda }\mathcal {F}^{-1}\varrho ''\nu ^2\left( \frac{\partial \Phi }{\partial r}-\frac{2}{r}-f_R''\mathcal {F}^{-1}\right) \right] \nonumber \\&\times \xi \frac{\partial b}{\partial r} \,, \nonumber \\ \end{aligned}$$
(B16)
and
$$\begin{aligned} \mathcal {P}_{Dyn}^{3\leftrightarrow 4}= & {} \int _r\frac{\partial }{\partial r}\left[ r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho '\nu \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right. \right. \nonumber \\&\left. \left. -\frac{6}{r^2}f_R\mathcal {F}^{-1}\right) \right] b \xi \,.\nonumber \\ \end{aligned}$$
(B17)
It is worthy noting that \(\mathcal {P}_{Dyn}^{3\leftrightarrow 4}\) should be considered when we obtain the coefficient \(\mathcal {C}_{Dyn}^8\) of \(b\xi \) term in subsequent calculation. We also have
$$\begin{aligned} \mathcal {P}_{Dyn}^{4}= & {} \mathcal {P'}_{Dyn}^{4} +\int \limits r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho '\nu \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right. \nonumber \\&\left. -\frac{6}{r^2}f_R\mathcal {F}^{-1}\right) b\frac{\partial \xi }{\partial r} \nonumber \\= & {} \int _r -2r^2e^{\Lambda +\Phi }\varrho ''\nu ^2\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r}b\frac{\partial \xi }{\partial r}. \end{aligned}$$
(B18)
From Eqs. B16) and (B18) we get
$$\begin{aligned} \mathcal {C}_{Dyn}^3= & {} -4e^{\Phi +\Lambda }\mathcal {F}^{-2}\varrho '\nu (f_R-r f_R')\nonumber \\&-2r^2e^{\Phi +\Lambda }\mathcal {F}^{-1}\varrho ''\nu ^2\left( \frac{\partial \Phi }{\partial r}-\frac{2}{r}-f_R''\mathcal {F}^{-1}\right) ,\nonumber \\ \end{aligned}$$
(B19)
and
$$\begin{aligned} \mathcal {C}_{Dyn}^4 = -2r^2e^{\Lambda +\Phi }\varrho ''\nu ^2\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r}. \end{aligned}$$
(B20)
The fifth term is the \(\frac{\partial \xi }{\partial r}\frac{\partial b}{\partial r}\) term:
$$\begin{aligned} \mathcal {P}_{Dyn}^5= & {} \int \limits _r r^2e^{\Lambda +\Phi }\varrho ''\nu ^2\frac{\partial \xi }{\partial r}\mathcal {F}^{-1}\frac{\partial b}{\partial r}\nonumber \\&+r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho ''\nu ^2\frac{\partial b}{\partial r}\frac{\partial \xi }{\partial r} \nonumber \\= & {} \int _r 2r^2\mathcal {F}^{-1}e^{\Lambda +\Phi }\varrho ''\nu ^2\frac{\partial \xi }{\partial r}\frac{\partial b}{\partial r}, \end{aligned}$$
(B21)
so
$$\begin{aligned} \mathcal {C}_{Dyn}^5 = 2r^2\mathcal {F}^{-1}e^{\Lambda +\Phi }\varrho ''\nu ^2. \end{aligned}$$
(B22)
The calculation of last three terms \(\mathcal {P}_{Dyn}^6\), \(\mathcal {P}_{Dyn}^7\) and \(\mathcal {P}_{Dyn}^8\) are very complicated, so we just show the main steps in our manuscript. Note that \(\mathcal {F}=f_R'+\frac{2}{r}f_R\), which yields
$$\begin{aligned} \frac{\partial \mathcal {F}}{\partial r}=f_R''+\frac{2}{r}\mathcal {F}-\frac{6}{r^2}f_R=f_R''+\frac{3}{r}f_R'-\frac{1}{r}\mathcal {F}. \end{aligned}$$
(B23)
This relation would be used frequently below.
The sixth term is the \(b^2\) term, select all terms contain \(b^2\) in Eq. (B8), then direct calculation gives
$$\begin{aligned} \mathcal {P}_{Dyn}^6= & {} \int _r r^2e^{-\Lambda +\Phi }\mathcal {F}^{-1}\left\{ -e^{2\Lambda }\mathcal {F}^{-1}\varrho '\nu \left( \frac{2}{r}\frac{\partial \Lambda }{\partial r}+\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r} \right. \right. \nonumber \\&\left. -\left( \frac{\partial \Phi }{\partial r}\right) ^2-\frac{\partial ^2\Phi }{\partial r^2}\right) b^2 \nonumber \\&-\frac{\partial \Phi }{\partial r} \left[ -\frac{2}{r^2}-\frac{6}{r^2}\mathcal {F}^{-1}f_R'+2\left( \frac{\partial \Phi }{\partial r}\right) ^2 +\frac{6}{r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. -\frac{\partial \Phi }{\partial r}\mathcal {F}^{-1}f_R''+\frac{36}{r^3}\mathcal {F}^{-1}f_R \right. \nonumber \\&-\frac{2}{r}\mathcal {F}^{-1}f_R''-\frac{6}{r^2}\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r}f_R +\frac{6}{r^2}\mathcal {F}^{-1}f_R\frac{\partial \Lambda }{\partial r}\nonumber \\&\left. -\frac{72}{r^4}\mathcal {F}^{-2}f_R^2 +\frac{12}{r^2}\mathcal {F}^{-2}f_Rf_R''\right] b^2 \nonumber \\&+e^{2\Lambda }\mathcal {F}\frac{1}{2f_{RR}}b^2 -\left( -\frac{2}{r^2}\frac{\partial \Lambda }{\partial r}+\frac{2}{r}\frac{\partial ^2\Lambda }{\partial r^2} +\frac{\partial ^2\Lambda }{\partial r^2}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. +\frac{\partial \Lambda }{\partial r}\frac{\partial ^2\Phi }{\partial r^2} -2\frac{\partial \Phi }{\partial r}\frac{\partial ^2\Phi }{\partial r^2}-\frac{\partial ^3\Phi }{\partial r^3}\right) b^2 \nonumber \\&-\left( \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) -\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \frac{\partial ^2\Phi }{\partial r^2}b^2 \nonumber \\&-\left( \frac{\partial \Phi }{\partial r}-2\frac{\partial \Lambda }{\partial r}+\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \nonumber \\&\times \left( \frac{2}{r}\frac{\partial \Lambda }{\partial r} +\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}-\left( \frac{\partial \Phi }{\partial r}\right) ^2-\frac{\partial ^2\Phi }{\partial r^2}\right) b^2 \nonumber \\&+\left[ -\frac{2}{r}\frac{\partial \Lambda }{\partial r}-\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r} -\frac{6}{r^2}\mathcal {F}^{-1}f_R'+3\left( \frac{\partial \Phi }{\partial r}\right) ^2\right. \nonumber \\&\left. +\frac{6}{r}\frac{\partial \Phi }{\partial r}-\frac{\partial \Phi }{\partial r}\mathcal {F}^{-1}f_R''+\frac{36}{r^3}\mathcal {F}^{-1}f_R \right. \nonumber \\&-\frac{2}{r}\mathcal {F}^{-1}f_R''-\frac{6}{r^2}\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r}f_R +\frac{6}{r^2}\mathcal {F}^{-1}f_R\frac{\partial \Lambda }{\partial r}\nonumber \\&\left. -\frac{72}{r^4}\mathcal {F}^{-2}f_R^2+\frac{12}{r^2}\mathcal {F}^{-2}f_Rf_R''\right] b\frac{\partial b}{\partial r} \nonumber \\&+\left[ -\frac{12}{r^2}\mathcal {F}^{-2}\frac{\partial \mathcal {F}}{\partial r}f_R\right. \nonumber \\&\left. +\frac{6}{r^2}\mathcal {F}^{-1}\left( -\frac{\partial \Lambda }{\partial r}+\frac{\partial \Phi }{\partial r}\right) f_R +\frac{6}{r^2}\mathcal {F}^{-1}f_R'\right] b\frac{\partial b}{\partial r} \nonumber \\&-\left( \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) -\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \frac{\partial \Phi }{\partial r}b\frac{\partial b}{\partial r} \nonumber \\&-\left( 2\frac{\partial \Phi }{\partial r}-\frac{\partial \Lambda }{\partial r}+\frac{6}{r^2}\mathcal {F}^{-1}f_R -\mathcal {F}^{-1}f_R''\right) \nonumber \\&\times \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) b\frac{\partial b}{\partial r} \nonumber \\&+\frac{2}{r}e^{2\Lambda }\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r}\varrho ''\nu ^2b^2 +e^{2\Lambda }\mathcal {F}^{-1}\nonumber \\&\times \,\left( \frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r} +2\left( \frac{\partial \Phi }{\partial r}\right) ^2\right) \varrho ''\nu ^2b^2\nonumber \\&-2e^{2\Lambda }\mathcal {F}^{-2}\frac{\partial \mathcal {F}}{\partial r}\frac{\partial \Phi }{\partial r}\varrho ''\nu ^2b^2 \nonumber \\&+e^{2\Lambda }\mathcal {F}^{-1}\frac{\partial ^2\Phi }{\partial r^2}\varrho ''\nu ^2b^2 -e^{2\Lambda }\mathcal {F}^{-1}\left( \frac{\partial \Phi }{\partial r}\right) ^2\frac{\varrho '''\varrho '}{\varrho ''}\nu ^2b^2\nonumber \\&\left. -2e^{2\Lambda }\mathcal {F}^{-1}\left( \frac{\partial \Phi }{\partial r}\right) ^2\varrho '\nu b^2 \right\} \,. \end{aligned}$$
(B24)
Simplifying Eq. (B24) and we obtain the coefficient \(\mathcal {C}_{Dyn}^6\) as
$$\begin{aligned} \mathcal {C}_{Dyn}^6= & {} -r^2e^{-\Lambda +\Phi }\mathcal {F}^{-1} \left[ 10\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. +3\frac{\partial \Lambda }{\partial r}\left( \frac{\partial \Phi }{\partial r}\right) ^2 -3\frac{\partial \Phi }{\partial r}\frac{\partial ^2\Phi }{\partial r^2}+\frac{4}{r^2}\frac{\partial \Lambda }{\partial r} +\frac{2}{r}\frac{\partial ^2\Lambda }{\partial r^2} \right. \nonumber \\&+\frac{\partial ^2\Lambda }{\partial r^2}\frac{\partial \Phi }{\partial r} +2\frac{\partial \Lambda }{\partial r}\frac{\partial ^2\Phi }{\partial r^2}-\frac{\partial ^3\Phi }{\partial r^3} -\frac{4}{r}\frac{\partial ^2\Phi }{\partial r^2}-\frac{2}{r^2}\frac{\partial \Phi }{\partial r}\nonumber \\&\left. -\frac{2}{r}\left( \frac{\partial \Lambda }{\partial r}\right) ^2-\left( \frac{\partial \Lambda }{\partial r}\right) ^2\frac{\partial \Phi }{\partial r} \right] \nonumber \\&+r^2e^{-\Lambda +\Phi }\mathcal {F}^{-2} \left( \frac{6}{r^2}\frac{\partial \Lambda }{\partial r}+\frac{6}{r}\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. -\frac{6}{r}\left( \frac{\partial \Phi }{\partial r}\right) ^2-\frac{6}{r}\frac{\partial ^2\Phi }{\partial r^2}-\frac{12}{r^2}\frac{\partial \Phi }{\partial r}\right) f_R' \nonumber \\&+r^2e^{-\Lambda +\Phi }\mathcal {F}^{-2}\left( \frac{2}{r}\frac{\partial \Lambda }{\partial r}+\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. -\frac{\partial ^2\Phi }{\partial r^2}-\frac{4}{r}\frac{\partial \Phi }{\partial r}\right) f_R''+r^2e^{\Lambda +\Phi }\frac{1}{2f_{RR}} \nonumber \\&+r^2e^{\Lambda +\Phi }\mathcal {F}^{-2}\left( \frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r} +2\left( \frac{\partial \Phi }{\partial r}\right) ^2\right. \nonumber \\&\left. +\frac{4}{r}\frac{\partial \Phi }{\partial r} +\frac{\partial ^2\Phi }{\partial r^2}\right) \varrho ''\nu ^2 \nonumber \\&+2r^2e^{\Lambda +\Phi }\mathcal {F}^{-3}\left( -\frac{3}{r}f_R'-f_R''\right) \frac{\partial \Phi }{\partial r}\varrho ''\nu ^2\nonumber \\&-r^2e^{\Lambda +\Phi }\mathcal {F}^{-2}\left( \frac{\partial \Phi }{\partial r}\right) ^2\frac{\varrho '''\varrho '}{\varrho ''}\nu ^2 \nonumber \\&-2r^2e^{\Lambda +\Phi }\mathcal {F}^{-2}\left( \frac{\partial \Phi }{\partial r}\right) ^2\varrho '\nu \nonumber \\&+6e^{-\Lambda +\Phi }\mathcal {F}^{-3}\frac{\partial \Phi }{\partial r}\left( 3f_R'+r f_R''\right) f_R' \,. \end{aligned}$$
(B25)
The seventh term is the \(\xi ^2\) term, select all terms contain \(\xi ^2\) in Eq. (B8) we have
$$\begin{aligned} \mathcal {P}_{Dyn}^7= & {} \int \limits _r -r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho '\nu \left[ 2\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \mathcal {F}\right. \nonumber \\&\left. -\frac{6}{r^2}f_R\right] \mathcal {F}^{-1}e^{2\Lambda }\varrho '\nu \xi ^2 \nonumber \\&-r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho '\nu e^{2\Lambda }\varrho ''\nu ^2\left[ \left( \frac{\partial \Lambda }{\partial r} +\frac{2}{r}+\frac{1}{\nu }\frac{\partial \nu }{\partial r}\right) \right. \nonumber \\&\left. -\mathcal {F}^{-1}e^{2\Lambda }\varrho '\nu \right] \xi ^2 \nonumber \\&+2re^{\Lambda +\Phi }\varrho ''\nu ^2\left[ \left( \frac{\partial \Lambda }{\partial r}+\frac{2}{r}+\frac{1}{\nu }\frac{\partial \nu }{\partial r}\right) \right. \nonumber \\&\left. -\mathcal {F}^{-1}e^{2\Lambda }\varrho '\nu \right] \xi ^2 \nonumber \\&+r^2e^{\Lambda +\Phi }\frac{\partial \Lambda }{\partial r}\varrho ''\nu ^2\left[ \left( \frac{\partial \Lambda }{\partial r}+\frac{2}{r} +\frac{1}{\nu }\frac{\partial \nu }{\partial r}\right) \right. \nonumber \\&\left. -\mathcal {F}^{-1}e^{2\Lambda }\varrho '\nu \right] \xi ^2 \nonumber \\&-r^2e^{\Lambda +\Phi }\varrho '\nu \frac{\partial \Phi }{\partial r}\left[ \left( \frac{\partial \Lambda }{\partial r}+\frac{2}{r}+\frac{1}{\nu }\frac{\partial \nu }{\partial r}\right) \right. \nonumber \\&\left. -\mathcal {F}^{-1}e^{2\Lambda }\varrho '\nu \right] \xi ^2 \nonumber \\&+r^2e^{\Lambda +\Phi }\varrho ''\nu ^2\left[ \left( \frac{\partial \Lambda }{\partial r}+\frac{2}{r}+\frac{1}{\nu }\frac{\partial \nu }{\partial r}\right) \right. \nonumber \\&\left. -\mathcal {F}^{-1}e^{2\Lambda }\varrho '\nu \right] \xi \frac{\partial \xi }{\partial r} \nonumber \\&-r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\varrho '\nu e^{2\Lambda }\varrho ''\nu ^2\xi \frac{\partial \xi }{\partial r}\nonumber \\&+2re^{\Lambda +\Phi }\varrho ''\nu ^2\xi \frac{\partial \xi }{\partial r} \nonumber \\&+r^2e^{\Lambda +\Phi }\frac{\partial \Lambda }{\partial r}\varrho ''\nu ^2\xi \frac{\partial \xi }{\partial r} -r^2e^{\Lambda +\Phi }\varrho '\nu \frac{\partial \Phi }{\partial r}\xi \frac{\partial \xi }{\partial r} \,.\nonumber \\ \end{aligned}$$
(B26)
Using integration by parts we obtain the simplified result of \(\mathcal {P}_{Dyn}^7\)
$$\begin{aligned} \mathcal {P}_{Dyn}^7= & {} \int \limits _r r^2e^{\Lambda +\Phi }\varrho '\nu \left[ -\frac{\partial \Phi }{\partial r}\frac{\partial \Lambda }{\partial r}-2\left( \frac{\partial \Phi }{\partial r}\right) ^2\right. \nonumber \\&\left. +2\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r}f_R''-\frac{4}{r}\frac{\partial \Lambda }{\partial r}-\frac{2}{r}\frac{\partial \Phi }{\partial r} \right. \nonumber \\&\left. +\frac{4}{r}\mathcal {F}^{-1}f_R''+\frac{6}{r^2}\mathcal {F}^{-1}f_R\frac{\partial \Lambda }{\partial r}\right. \nonumber \\&\left. +\frac{6}{r^2}\mathcal {F}^{-1}f_R\frac{\partial \Phi }{\partial r} -\frac{6}{r^2}\mathcal {F}^{-2}f_R f_R''+\frac{\partial ^2\Phi }{\partial r^2}\right] \nonumber \\&+r^2e^{\Lambda +\Phi }\varrho ''\nu ^2\left[ \frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}+2\left( \frac{\partial \Phi }{\partial r}\right) ^2\right. \nonumber \\&\left. +\frac{\partial ^2\Phi }{\partial r^2} -\frac{2}{r}\frac{\partial \Lambda }{\partial r}-\frac{4}{r}\frac{\partial \Phi }{\partial r}+\frac{2}{r^2} \right. \nonumber \\&-\frac{\partial \Lambda }{\partial r}\mathcal {F}^{-1}f_R''-3\frac{\partial \Phi }{\partial r}\mathcal {F}^{-1}f_R''+2\mathcal {F}^{-2}f_R''^2\nonumber \\&\left. -\frac{6}{r^2}\mathcal {F}^{-2}f_R f_R''-\mathcal {F}^{-1}f_R'''+\frac{4}{r}\mathcal {F}^{-1}f_R''\right] \nonumber \\&+r^2e^{\Lambda +\Phi }\frac{\varrho '''\varrho '}{\varrho ''}\nu ^2\left[ \frac{2}{r}\frac{\partial \Phi }{\partial r}-\left( \frac{\partial \Phi }{\partial r}\right) ^2 \right. \nonumber \\&\left. +\frac{\partial \Phi }{\partial r}f_R''\mathcal {F}^{-1}\right] \,. \end{aligned}$$
(B27)
So \(\mathcal {C}_{Dyn}^7\) can be obtained. Using Eq. (B1) we find that \(\mathcal {C}_{Dyn}^7\) can be written as
$$\begin{aligned} \mathcal {C}_{Dyn}^7= & {} r^2e^{\Lambda +\Phi }\varrho '\nu \left[ -\frac{\partial \Phi }{\partial r}\frac{\partial \Lambda }{\partial r}-2\left( \frac{\partial \Phi }{\partial r}\right) ^2 +2\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r}f_R''\right. \nonumber \\&\left. -\frac{1}{r}\frac{\partial \Lambda }{\partial r}+\frac{1}{r}\frac{\partial \Phi }{\partial r}+\frac{1}{r}\mathcal {F}^{-1}f_R'' -\frac{3}{r}\mathcal {F}^{-2}f_R'\varrho '\nu +\frac{\partial ^2\Phi }{\partial r^2}\right] \nonumber \\&+r^2e^{\Lambda +\Phi }\varrho ''\nu ^2\left[ 2\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r} +\left( \frac{\partial \Phi }{\partial r}\right) ^2-\frac{6}{r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&+\frac{1}{r^2}+\frac{e^{2\Lambda }}{r^2}-e^{2\Lambda }\frac{R}{2} -\frac{\partial \Lambda }{\partial r}\mathcal {F}^{-1}f_R''-3\frac{\partial \Phi }{\partial r}\mathcal {F}^{-1}f_R'' \nonumber \\&\left. +2\mathcal {F}^{-2}f_R''^2+\frac{2}{r^2}\mathcal {F}^{-2}f_R f_R''-\mathcal {F}^{-1}f_R'''+\frac{4}{r}\mathcal {F}^{-2}f_R''f_R' \right] \nonumber \\&+r^2e^{\Lambda +\Phi }\frac{\varrho '''\varrho '}{\varrho ''}\nu ^2\left[ \frac{2}{r}\frac{\partial \Phi }{\partial r}-\left( \frac{\partial \Phi }{\partial r}\right) ^2 +\frac{\partial \Phi }{\partial r}f_R''\mathcal {F}^{-1}\right] .\nonumber \\ \end{aligned}$$
(B28)
The last term is the \(b\xi \) term, select all \(b\xi \) terms in Eq. (B8), with the addition of Eq. (B17), we have
$$\begin{aligned} \mathcal {P}_{Dyn}^8= & {} \int \limits _r r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\left\{ -\varrho '\nu \left( \frac{2}{r}\frac{\partial \Lambda }{\partial r}+\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}\right. \right. \nonumber \\&\left. -\left( \frac{\partial \Phi }{\partial r}\right) ^2 -\frac{\partial ^2\Phi }{\partial r^2}\right) b\xi \nonumber \\&-\varrho '\nu \left( 2\left( \frac{\partial \Phi }{\partial r}\right) ^2+\frac{4}{r}\frac{\partial \Phi }{\partial r} -\frac{6}{r^2}\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r}f_R\right) b\xi \nonumber \\&+\left( \frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}+\left( \frac{\partial \Phi }{\partial r}\right) ^2 -\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r}f_R''\right) \varrho ''\nu ^2b\xi \nonumber \\&-\frac{2}{r}\frac{\partial \Phi }{\partial r}\varrho ''\nu ^2 b\xi -\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}\varrho ''\nu ^2 b\xi +\varrho '\nu \left( \frac{\partial \Phi }{\partial r}\right) ^2b\xi \nonumber \\&-\left( -\frac{2}{r^2}+\frac{4}{r}\frac{\partial \Lambda }{\partial r}-\frac{4}{r}\frac{\partial \Phi }{\partial r} +2\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. -2\left( \frac{\partial \Phi }{\partial r}\right) ^2-2\frac{\partial ^2\Phi }{\partial r^2}\right) \varrho '\nu b\xi \nonumber \\&-\mathcal {F}^{-1}\left[ 2\left( \frac{\partial ^2\Phi }{\partial r^2}-\frac{2}{r^2}\right) \mathcal {F} +\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \frac{\partial \mathcal {F}}{\partial r}\right. \nonumber \\&\left. +\frac{12}{r^3}f_R-\frac{6}{r^2}f_R'+\frac{6}{r^2}\mathcal {F}^{-1}\frac{\partial \mathcal {F}}{\partial r}f_R\right] \varrho '\nu b\xi \nonumber \\&+\left( \left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) -\frac{6}{r^2}\mathcal {F}^{-1}f_R\right) \nonumber \\&\times \left( -2\frac{\partial \Lambda }{\partial r}\varrho '\nu +\frac{\partial \Phi }{\partial r}\varrho '\nu +\frac{\varrho '^2}{\varrho ''}\frac{\partial \Phi }{\partial r}\right) b\xi \nonumber \\&-\mathcal {F}^{-1}\left[ 2\frac{\partial \Phi }{\partial r}-\frac{\partial \Lambda }{\partial r}+\frac{6}{r^2}\mathcal {F}^{-1}f_R -\mathcal {F}^{-1}f_R''\right] \nonumber \\&\times \left[ 2\left( \frac{\partial \Phi }{\partial r}+\frac{2}{r}\right) \mathcal {F}-\frac{6}{r^2}f_R\right] \varrho '\nu b\xi \nonumber \\&-\mathcal {F}^{-1}\frac{6}{r^2}f_R\varrho ''\nu ^2 \left( \frac{2}{r}+\frac{\varrho '}{\varrho ''\nu }\frac{\partial \Phi }{\partial r}-\frac{\partial \Phi }{\partial r}+\mathcal {F}^{-1}f_R''\right) b\xi \nonumber \\&-\mathcal {F}^{-1}\varrho '\nu e^{2\Lambda }\varrho ''\nu ^2 \left( \frac{2}{r}+\frac{\varrho '}{\varrho ''\nu }\frac{\partial \Phi }{\partial r}-\frac{\partial \Phi }{\partial r}+\mathcal {F}^{-1}f_R''\right) b\xi \nonumber \\&+\frac{2}{r}\varrho ''\nu ^2 \left( \frac{2}{r}+\frac{\varrho '}{\varrho ''\nu }\frac{\partial \Phi }{\partial r}-\frac{\partial \Phi }{\partial r}+\mathcal {F}^{-1}f_R''\right) b\xi \nonumber \\&+\frac{\partial \Lambda }{\partial r}\varrho ''\nu ^2 \left( \frac{2}{r}+\frac{\varrho '}{\varrho ''\nu }\frac{\partial \Phi }{\partial r}-\frac{\partial \Phi }{\partial r}+\mathcal {F}^{-1}f_R''\right) b\xi \nonumber \\&-\mathcal {F}^{-1}\frac{\partial \mathcal {F}}{\partial r}\varrho ''\nu ^2 \left( \frac{2}{r}+\frac{\varrho '}{\varrho ''\nu }\frac{\partial \Phi }{\partial r}-\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. \left. +\mathcal {F}^{-1}f_R''\right) b\xi \right\} +\mathcal {P}_{Dyn}^{3\leftrightarrow 4} \,. \end{aligned}$$
(B29)
After some calculations we obtain
$$\begin{aligned} \mathcal {P}_{Dyn}^8= & {} \int \limits _r 2r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r} \left( \frac{\partial \Phi }{\partial r}-\frac{2}{r}-\mathcal {F}^{-1}f_R''\right) \varrho ''\nu ^2b\xi \nonumber \\&-r^2e^{\Lambda +\Phi }\left( \frac{4}{r}\frac{\partial \Lambda }{\partial r}+2\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}-2\frac{\partial ^2\Phi }{\partial r^2} +\frac{2}{r}\frac{\partial \Phi }{\partial r}\right) \nonumber \\&\mathcal {F}^{-1}\varrho '\nu b\xi -r^2e^{\Lambda +\Phi }\frac{6}{r}\mathcal {F}^{-2}\frac{\partial \Phi }{\partial r}f_R'\varrho '\nu b\xi \,, \end{aligned}$$
(B30)
which yields
$$\begin{aligned} \mathcal {C}_{Dyn}^8= & {} 2r^2e^{\Lambda +\Phi }\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r} \left( \frac{\partial \Phi }{\partial r}-\frac{2}{r}-\mathcal {F}^{-1}f_R''\right) \varrho ''\nu ^2 \nonumber \\&-r^2e^{\Lambda +\Phi }\left( \frac{4}{r}\frac{\partial \Lambda }{\partial r}+2\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}-2\frac{\partial ^2\Phi }{\partial r^2} +\frac{2}{r}\frac{\partial \Phi }{\partial r}\right) \nonumber \\&\mathcal {F}^{-1}\varrho '\nu -r^2e^{\Lambda +\Phi }\frac{6}{r}\mathcal {F}^{-2}\frac{\partial \Phi }{\partial r}f_R'\varrho '\nu \,. \end{aligned}$$
(B31)
Substituting these coefficient \(\mathcal {C}_{Dyn}^i\) into Eq. (29) gives the dynamical stability criterion for perfect fluid in f(R) theories.
Degenerate to general relativity, \(f(R)=R\), hence \(b=\delta f_R=0\), and only \(\mathcal {C}_{Dyn}^2\,_{degenerate}\) and \(\mathcal {C}_{Dyn}^7\,_{degenerate}\) terms remain. It is easy to check that
$$\begin{aligned} \mathcal {P}_{Dyn}\,_{degenerate}= & {} \int \limits _r \mathcal {C}_{Dyn}^2\,_{degenerate}\left( \frac{\partial \xi }{\partial r}\right) ^2\nonumber \\&+\mathcal {C}_{Dyn}^7\,_{degenerate}\xi ^2 \end{aligned}$$
(B32)
is equivalent to the dynamical stability criterion given by Eq. (97) of Ref. [17].
Appendix C: Detailed calculation and result of thermodynamical stability criterion
In this appendix, we will show the detailed calculations of the explicitly form of thermodynamical stability criterion, \(\delta ^2S\). From Eqs. (refdelsgt) and (41), we obtain the second variation of \(\sqrt{h}\) as
$$\begin{aligned} \delta ^2\sqrt{h}=r^2e^{\Lambda }\lambda ^2+r^2e^{\Lambda }\delta \lambda \,, \end{aligned}$$
(C1)
and the second variation of \(\rho \) as
$$\begin{aligned} \delta ^2\rho= & {} \frac{\delta b}{r^2}+\frac{4e^{-2\Lambda }}{r^2}\left( 2r\frac{\partial \Lambda }{\partial r}-1\right) f_R\lambda ^2 -\frac{2e^{-2\Lambda }}{r}f_R\frac{\partial }{\partial r}\lambda ^2\nonumber \\&-\frac{4e^{-2\Lambda }}{r^2}\left( 2r\frac{\partial \Lambda }{\partial r}-1\right) b\lambda -\frac{2e^{-2\Lambda }}{r^2}\left( 2r\frac{\partial \Lambda }{\partial r}-1\right) f_R\delta \lambda \nonumber \\&+\frac{4e^{-2\Lambda }}{r}b\frac{\partial \lambda }{\partial r}+\frac{e^{-2\Lambda }}{r^2}\left( 2r\frac{\partial \Lambda }{\partial r}-1\right) \delta b\nonumber \\&-\frac{2e^{-2\Lambda }}{r}f_R\frac{\partial }{\partial r}\lambda ^2+\frac{2e^{-2\Lambda }}{r}f_R\frac{\partial }{\partial r}\delta \lambda -\frac{b}{2}\delta R-\frac{R}{2}\delta b \nonumber \\&-4e^{-2\Lambda }f_R''\lambda ^2 +4e^{-2\Lambda }b''\lambda +2e^{-2\Lambda }f_R''\delta \lambda -e^{-2\Lambda }\delta b''\nonumber \\&+4e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial r}-\frac{2}{r}\right) f_R'\lambda ^2 -2e^{-2\Lambda }f_R'\frac{\partial }{\partial r}\lambda ^2 \nonumber \\&-2e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial r}-\frac{2}{r}\right) b'\lambda -2e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial r}-\frac{2}{r}\right) f_R'\delta \lambda \nonumber \\&+e^{-2\Lambda }f_R'\frac{\partial }{\partial r}\delta \lambda +2e^{-2\Lambda }\left( \frac{\partial \lambda }{\partial r}\right) \cdot b' \nonumber \\&-2e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial r}-\frac{2}{r}\right) b'\lambda +e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial r}-\frac{2}{r}\right) \delta b' \,. \end{aligned}$$
(C2)
Now we can calculate the terms in the righthand side of Eq. (30) one by one. Note that in spherical symmetry case \(\int _C\) becomes \(\int _r\). The first term in the righthand side of Eq. (30) can be calculated as
$$\begin{aligned} \int \limits _r\frac{2}{T}\delta \rho \delta \sqrt{h}= & {} \int \limits _r 2e^{\Phi +\Lambda }r^2 \left[ \frac{1}{r^2}b\lambda \right. \nonumber \\&\left. -\frac{2e^{-2\Lambda }}{r^2}\left( 2r\frac{\partial \Lambda }{\partial r}-1\right) f_R\lambda ^2 +\frac{e^{-2\Lambda }}{r}f_R\frac{\partial }{\partial r}\lambda ^2 \right. \nonumber \\&+\frac{e^{-2\Lambda }}{r^2}\left( 2r\frac{\partial \Lambda }{\partial r}-1\right) b\lambda -\frac{R}{2}b\lambda \nonumber \\&+2e^{-2\Lambda }f_R''\lambda ^2-e^{-2\Lambda }b''\lambda \nonumber \\&-2e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial r}-\frac{2}{r}\right) f_R'\lambda ^2 +\frac{1}{2}e^{-2\Lambda }f_R'\frac{\partial }{\partial r}\lambda ^2\nonumber \\&\left. +e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial r}-\frac{2}{r}\right) b'\lambda \right] \,. \end{aligned}$$
(C3)
Using integration by parts we obtain
$$\begin{aligned} \int \limits _r \frac{2}{T}\delta \rho \delta \sqrt{h}= & {} \int \limits _r e^{\Phi +\Lambda }r^2 \left[ e^{-2\Lambda }\left( \frac{4}{r}\frac{\partial \Phi }{\partial r}-2\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}\right. \right. \nonumber \\&\left. +2\left( \frac{\partial \Phi }{\partial r}\right) ^2+2\frac{\partial ^2\Phi }{\partial r^2}\right) b\lambda \nonumber \\&+2e^{-2\Lambda }\frac{\partial \Phi }{\partial r}b'\lambda +2e^{-2\Lambda }b'\frac{\partial \lambda }{\partial r} \nonumber \\&+\left( -3(p+\rho )+e^{-2\Lambda }\left( \frac{4}{r}\frac{\partial \Phi }{\partial r}+\frac{2}{r^2}\right) f_R \right. \nonumber \\&\left. \left. +e^{-2\Lambda }\left( 2\frac{\partial \Phi }{\partial r}+\frac{4}{r}\right) f_R'\right) \lambda ^2 \right] \,. \end{aligned}$$
(C4)
With Eq. (C2), the second term in the righthand side of Eq. (30) becomes
$$\begin{aligned} \int \limits _r\frac{1}{T}\sqrt{h}\delta ^2\rho= & {} \int \limits _r e^{\Phi +\Lambda }r^2 \cdot \left[ \frac{\delta b}{r^2}+\frac{4e^{-2\Lambda }}{r^2}\left( 2r\frac{\partial \Lambda }{\partial r}-1\right) f_R\lambda ^2 \right. \nonumber \\&-\frac{2e^{-2\Lambda }}{r}f_R\frac{\partial }{\partial r}\lambda ^2-\frac{4e^{-2\Lambda }}{r^2}\left( 2r\frac{\partial \Lambda }{\partial r}-1\right) b\lambda \nonumber \\&-\frac{2e^{-2\Lambda }}{r^2}\left( 2r\frac{\partial \Lambda }{\partial r}-1\right) f_R\delta \lambda +\frac{4e^{-2\Lambda }}{r}b\frac{\partial \lambda }{\partial r}\nonumber \\&+\frac{e^{-2\Lambda }}{r^2}\left( 2r\frac{\partial \Lambda }{\partial r}-1\right) \delta b -\frac{2e^{-2\Lambda }}{r}f_R\frac{\partial }{\partial r}\lambda ^2 \nonumber \\&+\frac{2e^{-2\Lambda }}{r}f_R\frac{\partial }{\partial r}\delta \lambda -\frac{b}{2}\delta R-\frac{R}{2}\delta b-4e^{-2\Lambda }f_R''\lambda ^2\nonumber \\&+4e^{-2\Lambda }b''\lambda +2e^{-2\Lambda }f_R''\delta \lambda -e^{-2\Lambda }\delta b'' \nonumber \\&+4e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial r}-\frac{2}{r}\right) f_R'\lambda ^2 \nonumber \\&-2e^{-2\Lambda }f_R'\frac{\partial }{\partial r}\lambda ^2 -2e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial r}-\frac{2}{r}\right) b'\lambda \nonumber \\&-2e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial r}-\frac{2}{r}\right) f_R'\delta \lambda \nonumber \\&+e^{-2\Lambda }f_R'\frac{\partial }{\partial r}\delta \lambda +2e^{-2\Lambda }\left( \frac{\partial \lambda }{\partial r}\right) \cdot b'\nonumber \\&-2e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial r}-\frac{2}{r}\right) b'\lambda \nonumber \\&\left. +e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial r}-\frac{2}{r}\right) \delta b' \right] \,. \end{aligned}$$
(C5)
Using integration by parts, we obtain the simplified expression as
$$\begin{aligned} \int \limits _r\frac{1}{T}\sqrt{h}\delta ^2\rho= & {} \int \limits _r e^{\Phi +\Lambda }r^2 \cdot \left\{ \left[ \frac{4e^{-2\Lambda }}{r}\left( \frac{\partial \Lambda }{\partial r}+\frac{\partial \Phi }{\partial r}\right) f_R\right. \right. \nonumber \\&\left. \left. +2e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial \Phi }+\frac{\partial \Phi }{\partial r}\right) f_R'-2e^{-2\Lambda }f_R''\right] \lambda ^2 \right. \nonumber \\&+\left[ e^{-2\Lambda }f_R''-e^{-2\Lambda }f_R'\left( \frac{\partial \Phi }{\partial r}+\frac{\partial \Lambda }{\partial r}\right) \right. \nonumber \\&\left. -2e^{-2\Lambda }\left( \frac{\partial \Lambda }{\partial r}+\frac{\partial \Phi }{\partial r}\right) \frac{f_R}{r}\right] \delta \lambda \nonumber \\&\left. -\frac{4e^{-2\Lambda }}{r^2}\left( 2r\frac{\partial \Lambda }{\partial r}-1\right) b\lambda +\frac{4e^{-2\Lambda }}{r}b\frac{\partial \lambda }{\partial r}\right. \nonumber \\&\left. -\frac{b}{2}\delta R-2e^{-2\Lambda }b'\frac{\partial \lambda }{\partial r} -4e^{-2\Lambda }\frac{\partial \Phi }{\partial r}b'\lambda \right\} \,.\nonumber \\ \end{aligned}$$
(C6)
The third term in the righthand side of Eq. (30) is \(\int _r\frac{1}{T}(p+\rho )\delta ^2\sqrt{h}\), which can be written as
$$\begin{aligned} \int \limits _r\frac{1}{T}(p+\rho )\delta ^2\sqrt{h}= \int \limits _re^{\Phi }(p+\rho )[e^{\Lambda }r^2\lambda ^2+e^{\Lambda }r^2\delta \lambda ] \,.\nonumber \\ \end{aligned}$$
(C7)
And the fourth term in the righthand side of Eq. (30) is
$$\begin{aligned} \int \limits _r-\frac{1}{T}\frac{\delta p\delta \rho }{p+\rho }\sqrt{h}= -\int \limits _r e^{\Phi +\Lambda }r^2\varrho ''(\delta \nu )^2. \end{aligned}$$
(C8)
Together with Eqs. C4), (C6), (C7) and (C8), the second variation of total entropy takes the form
$$\begin{aligned} \delta ^2S= & {} \int \limits _r \left( -4e^{\Phi -\Lambda }r\frac{\partial \Lambda }{\partial r}-2e^{\Phi -\Lambda }r^2\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. +2e^{\Phi -\Lambda }r^2\left( \frac{\partial \Phi }{\partial r}\right) ^2+2e^{\Phi -\Lambda }r^2\frac{\partial ^2\Phi }{\partial r^2}\right) \mathcal {F}^{-1}\nonumber \\&\times \left[ -\varrho '\nu e^{2\Lambda }\xi b+\frac{1}{2}\frac{\partial }{\partial r}b^2-\frac{\partial \Phi }{\partial r}b^2 \right] \nonumber \\&+\left[ \left( 4e^{\Phi -\Lambda }r\frac{\partial \Phi }{\partial r}+2e^{\Phi -\Lambda }\right) f_R\right. \nonumber \\&\left. +\left( 2e^{\Phi -\Lambda }r^2\frac{\partial \Phi }{\partial r}+4e^{\Phi -\Lambda }r\right) f_R'\right] \nonumber \\&\times \mathcal {F}^{-2}\left[ (\varrho '\nu )^2e^{4\Lambda }\xi ^2 +\left( \frac{\partial }{\partial r}b\right) ^2+\left( \frac{\partial \Phi }{\partial r}\right) ^2b^2 \right. \nonumber \\&-2\varrho '\nu e^{2\Lambda }\xi \frac{\partial }{\partial r}b+2\varrho '\nu e^{2\Lambda }\xi \frac{\partial \Phi }{\partial r}b\nonumber \\&\left. -2\frac{\partial \Phi }{\partial r}b\frac{\partial }{\partial r}b\right] -e^{\Phi +\Lambda }r^2\frac{b^2}{2f_{RR}} \nonumber \\&-\left( 2e^{\Phi -\Lambda }\frac{\partial \Phi }{\partial r}r^2+4e^{\Phi -\Lambda }r \right) \nonumber \\&\times \mathcal {F}^{-1}\left[ -\varrho '\nu e^{2\Lambda }\xi \frac{\partial b}{\partial r} +\left( \frac{\partial b}{\partial r}\right) ^2-\frac{1}{2}\frac{\partial \Phi }{\partial r}\frac{\partial }{\partial r}b^2 \right] \nonumber \\&-e^{\Phi +\Lambda }r^2 \varrho '' \left[ -\nu \frac{\partial \xi }{\partial r}-\mathcal {F}^{-1}\nu \frac{\partial b}{\partial r}+\mathcal {F}^{-1}\nu \frac{\partial \Phi }{\partial r}b\right. \nonumber \\&\left. +\left( \nu \frac{\partial \Phi }{\partial r} +\frac{\varrho '}{\varrho ''}\frac{\partial \Phi }{\partial r}-\frac{2}{r}\nu -\nu f_R''\mathcal {F}^{-1}\right) \xi \right] ^2 \,. \end{aligned}$$
(C9)
The \(\delta \nu \) terms in Eq. (C8) can be calculated by Eqs. (A4) and (23). It is worthy noting that all second variation of variables, such as \(\delta b\) and \(\delta \lambda \), vanish. That is because we assume that the system state is deviated only slightly from equilibrium state. Now the coefficients \(\mathcal {C}_{Thermo}^1\) to \(\mathcal {C}_{Thermo}^8\) can be directly read off from Eq. (C9).
The first term is the \(\left( \frac{\partial b}{\partial r}\right) ^2\) term
$$\begin{aligned} \mathcal {C}_{Thermo}^1= & {} \left[ \left( 4e^{\Phi -\Lambda }r\frac{\partial \Phi }{\partial r}+2e^{\Phi -\Lambda }\right) f_R\right. \nonumber \\&\left. +\left( 2e^{\Phi -\Lambda }r^2\frac{\partial \Phi }{\partial r}+4e^{\Phi -\Lambda }r\right) f_R'\right] \mathcal {F}^{-2} \nonumber \\&-\left( 2e^{\Phi -\Lambda }\frac{\partial \Phi }{\partial r}r^2+4e^{\Phi -\Lambda }r \right) \mathcal {F}^{-1}\nonumber \\&-e^{\Phi +\Lambda }r^2\varrho ''(\mathcal {F}^{-1}\nu )^2 \nonumber \\= & {} -\mathcal {F}^{-2}(6e^{\Phi -\Lambda }f_R+e^{\Phi +\Lambda }\varrho '' r^2\nu ^2). \end{aligned}$$
(C10)
The second term is the \(\left( \frac{\partial \xi }{\partial r}\right) ^2\) term
$$\begin{aligned} \mathcal {C}_{Thermo}^2 = -e^{\Phi +\Lambda }r^2\varrho ''\nu ^2 \,. \end{aligned}$$
(C11)
The third term is the \(\xi \frac{\partial b}{\partial r}\) term
$$\begin{aligned} \mathcal {C}_{Thermo}^3= & {} 2e^{\Phi -\Lambda }\left[ \left( 2r\frac{\partial \Phi }{\partial r}+1\right) f_R\right. \nonumber \\&\left. +\left( r^2\frac{\partial \Phi }{\partial r}+2r\right) f_R'\right] \mathcal {F}^{-2}\left( -2\varrho '\nu e^{2\Lambda }\right) \nonumber \\&-\left( 2e^{\Phi -\Lambda }\frac{\partial \Phi }{\partial r}r^2+4e^{\Phi -\Lambda }r\right) \nonumber \\&\mathcal {F}^{-2}\left( \frac{2}{r}f_R+f_R'\right) (-\varrho '\nu e^{2\Lambda }) \nonumber \\&-2e^{\Phi +\Lambda }r^2\varrho ''\left( \nu \frac{\partial \Phi }{\partial r} +\frac{\varrho '}{\varrho ''}\frac{\partial \Phi }{\partial r} \right. \nonumber \\&\left. -\frac{2}{r}\nu -\nu f_R''\mathcal {F}^{-1}\right) (-\mathcal {F}^{-1}\nu ) \nonumber \\= & {} 4e^{\Phi +\Lambda }\mathcal {F}^{-2}\varrho '\nu (f_R-r f_R')\nonumber \\&+2r^2e^{\Phi +\Lambda }\mathcal {F}^{-1}\varrho ''\nu ^2\left( \frac{\partial \Phi }{\partial r}-\frac{2}{r}-f_R''\mathcal {F}^{-1}\right) \,.\nonumber \\ \end{aligned}$$
(C12)
The fourth term is the \(b\frac{\partial \xi }{\partial r}\) term
$$\begin{aligned} \mathcal {C}_{Thermo}^4 = 2e^{\Phi +\Lambda }r^2\mathcal {F}^{-1}\varrho ''\nu ^2\frac{\partial \Phi }{\partial r} \,. \end{aligned}$$
(C13)
The fifth term is the \(\frac{\partial \xi }{\partial r}\frac{\partial b}{\partial r}\) term
$$\begin{aligned} \mathcal {C}_{Thermo}^5= & {} -2e^{\Phi +\Lambda }r^2\mathcal {F}^{-1}\varrho ''\nu ^2. \end{aligned}$$
(C14)
Since integration by parts will be used when we calculate the sixth term \(b^2\) and the seventh term \(\xi ^2\). Similarly to Appendix 1, we denote the terms associated with \(\mathcal {C}_{Thermo}^6\) and \(\mathcal {C}_{Thermo}^7\) by \(\mathcal {P}_{Thermo}^6\) and \(\mathcal {P}_{Thermo}^7\), respectively. Select all terms contain \(b^2\) in Eq. (C9), we get the sixth term as
$$\begin{aligned} \mathcal {P}_{Thermo}^6= & {} \int \limits _r e^{\Phi -\Lambda }\left( -2r\frac{\partial \Lambda }{\partial r}\right. \nonumber \\&\left. -r^2\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r} +r^2\left( \frac{\partial \Phi }{\partial r}\right) ^2 +r^2\frac{\partial ^2\Phi }{\partial r^2}\right) \mathcal {F}^{-1}\frac{\partial }{\partial r}b^2 \nonumber \\&+2e^{\Phi -\Lambda }\left( -2r\frac{\partial \Lambda }{\partial r} -r^2\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. +r^2\left( \frac{\partial \Phi }{\partial r}\right) ^2 +r^2\frac{\partial ^2\Phi }{\partial r^2}\right) \mathcal {F}^{-1}\left( -\frac{\partial \Phi }{\partial r}\right) b^2 \nonumber \\&+2e^{\Phi -\Lambda }\left[ \left( 2r\frac{\partial \Phi }{\partial r}+1\right) f_R +\left( r^2\frac{\partial \Phi }{\partial r}+2r\right) f_R'\right] \nonumber \\&\mathcal {F}^{-2} \left( \frac{\partial \Phi }{\partial r}\right) ^2b^2 \nonumber \\&-2e^{\Phi -\Lambda }\left[ \left( 2r\frac{\partial \Phi }{\partial r}+1\right) f_R +\left( r^2\frac{\partial \Phi }{\partial r}+2r\right) f_R'\right] \nonumber \\&\mathcal {F}^{-2}\frac{\partial \Phi }{\partial r}\frac{\partial }{\partial r}b^2 \nonumber \\&-e^{\Phi +\Lambda }r^2\frac{b^2}{2f_{RR}} -\left( e^{\Phi -\Lambda }\frac{\partial \Phi }{\partial r}r^2+2e^{\Phi -\Lambda }r\right) \nonumber \\&\mathcal {F}^{-1}\left( -\frac{\partial \Phi }{\partial r}\right) \frac{\partial }{\partial r}b^2 \nonumber \\&-e^{\Phi +\Lambda }r^2\varrho ''\left( \mathcal {F}^{-1}\nu \frac{\partial \Phi }{\partial r}\right) ^2 b^2\nonumber \\&-2e^{\Phi +\Lambda }r^2\varrho ''\left( -\mathcal {F}^{-1}\nu \frac{\partial b}{\partial r}\right) \left( \mathcal {F}^{-1}\nu \frac{\partial \Phi }{\partial r}b\right) .\nonumber \\ \end{aligned}$$
(C15)
Simplifying Eq. (C15) yields
$$\begin{aligned} \mathcal {P}_{Thermo}^6= & {} \int \limits _r e^{\Phi -\Lambda }\mathcal {F}^{-1}\left[ 4r\frac{\partial \Lambda }{\partial r}+2r^2\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. -2r^2\frac{\partial ^2\Phi }{\partial r^2}+r\frac{\partial \Phi }{\partial r}\right] \frac{\partial \Phi }{\partial r}b^2 \nonumber \\&-e^{\Phi +\Lambda }r^2\frac{b^2}{2f_{RR}} -e^{\Phi +\Lambda }r^2\varrho ''\mathcal {F}^{-2}\nu ^2\left( \frac{\partial \Phi }{\partial r}\right) ^2b^2\nonumber \\&+3e^{\Phi -\Lambda }r\mathcal {F}^{-2}\left( \frac{\partial \Phi }{\partial r}\right) ^2f_R'b^2 \nonumber \\&-e^{\Phi -\Lambda }\left[ 2r\frac{\partial \Lambda }{\partial r}+r^2\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. -r^2\frac{\partial ^2\Phi }{\partial r^2} -r\frac{\partial \Phi }{\partial r}\right] \mathcal {F}^{-1}\frac{\partial }{\partial r}b^2 \nonumber \\&-3rf_R'e^{\Phi -\Lambda }\mathcal {F}^{-2}\frac{\partial \Phi }{\partial r}\frac{\partial }{\partial r}b^2\nonumber \\&+e^{\Phi +\Lambda }r^2\varrho ''\mathcal {F}^{-2}\nu ^2\frac{\partial \Phi }{\partial r}\frac{\partial }{\partial r}b^2 \,. \end{aligned}$$
(C16)
Using integration by parts, and after many calculations, we obtain the simplified result takes the form
$$\begin{aligned} \mathcal {P}_{Thermo}^6= & {} \int \limits _re^{\Phi -\Lambda }\left[ 10r\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r} +3r^2\frac{\partial \Lambda }{\partial r}\left( \frac{\partial \Phi }{\partial r}\right) ^2 \right. \nonumber \\&-3r^2\frac{\partial ^2\Phi }{\partial r^2}\frac{\partial \Phi }{\partial r}+4\frac{\partial \Lambda }{\partial r}+2r\frac{\partial ^2\Lambda }{\partial r^2} +r^2\frac{\partial ^2\Lambda }{\partial r^2}\frac{\partial \Phi }{\partial r} \nonumber \\&+2r^2\frac{\partial \Lambda }{\partial r}\frac{\partial ^2\Phi }{\partial r^2}-r^2\frac{\partial ^3\Phi }{\partial r^3} -2\frac{\partial \Phi }{\partial r}-4r\frac{\partial ^2\Phi }{\partial r^2}\nonumber \\&\left. -2r\left( \frac{\partial \Lambda }{\partial r}\right) ^2 -r^2\left( \frac{\partial \Lambda }{\partial r}\right) ^2\frac{\partial \Phi }{\partial r}\right] \mathcal {F}^{-1}b^2 \nonumber \\&+e^{\Phi -\Lambda }\left( -2r\frac{\partial \Lambda }{\partial r}-r^2\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. +r^2\frac{\partial ^2\Phi }{\partial r^2}+4r\frac{\partial \Phi }{\partial r}\right) \mathcal {F}^{-2}f_R''b^2 \nonumber \\&+e^{\Phi -\Lambda }\left( -6\frac{\partial \Lambda }{\partial r}\right. \nonumber \\&\left. -3r\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r} +3r\frac{\partial ^2\Phi }{\partial r^2}+12\frac{\partial \Phi }{\partial r}\right) \mathcal {F}^{-2}f_R'b^2 \nonumber \\&+f_R'e^{\Phi -\Lambda }\left( 6r\left( \frac{\partial \Phi }{\partial r}\right) ^2 -3r\frac{\partial \Phi }{\partial r}\frac{\partial \Lambda }{\partial r}\right) \mathcal {F}^{-2}b^2\nonumber \\&+3rf_R'e^{\Phi -\Lambda }\mathcal {F}^{-2}\frac{\partial ^2\Phi }{\partial r^2}b^2 \nonumber \\&-e^{\Phi +\Lambda }r^2\varrho ''\mathcal {F}^{-2}\nu ^2\left[ \frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r} +2\left( \frac{\partial \Phi }{\partial r}\right) ^2\right. \nonumber \\&\left. +\frac{4}{r}\frac{\partial \Phi }{\partial r}+\frac{\partial ^2\Phi }{\partial r^2}\right] b^2 \nonumber \\&-6rf_R'e^{\Phi -\Lambda }\mathcal {F}^{-3}\left( \frac{3}{r}f_R'+f_R''\right) \frac{\partial \Phi }{\partial r}b^2\nonumber \\&+e^{\Phi +\Lambda }r^2\frac{\varrho '''\varrho '}{\varrho ''}\mathcal {F}^{-2}\nu ^2\left( \frac{\partial \Phi }{\partial r}\right) ^2b^2 \nonumber \\&+2e^{\Phi +\Lambda }r^2\mathcal {F}^{-3}\left( \frac{3}{r}f_R'+f_R''\right) \varrho ''\nu ^2\frac{\partial \Phi }{\partial r}b^2\nonumber \\&+2e^{\Phi +\Lambda }r^2\mathcal {F}^{-2}\varrho '\nu \left( \frac{\partial \Phi }{\partial r}\right) ^2b^2\nonumber \\&-e^{\Phi +\Lambda }r^2\frac{b^2}{2f_{RR}} \,. \end{aligned}$$
(C17)
which means that \(\mathcal {C}_{Thermo}^6\) can be written as
$$\begin{aligned} \mathcal {C}_{Thermo}^6= & {} r^2e^{\Phi -\Lambda }\mathcal {F}^{-1}\left[ \frac{10}{r}\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r} +3\frac{\partial \Lambda }{\partial r}\left( \frac{\partial \Phi }{\partial r}\right) ^2 \right. \nonumber \\&-3\frac{\partial ^2\Phi }{\partial r^2}\frac{\partial \Phi }{\partial r}+\frac{4}{r^2}\frac{\partial \Lambda }{\partial r} +\frac{2}{r}\frac{\partial ^2\Lambda }{\partial r^2} \nonumber \\&+\frac{\partial ^2\Lambda }{\partial r^2}\frac{\partial \Phi }{\partial r}+2\frac{\partial \Lambda }{\partial r}\frac{\partial ^2\Phi }{\partial r^2}-\frac{\partial ^3\Phi }{\partial r^3} -\frac{2}{r^2}\frac{\partial \Phi }{\partial r}\nonumber \\&\left. -\frac{4}{r}\frac{\partial ^2\Phi }{\partial r^2}-\frac{2}{r}\left( \frac{\partial \Lambda }{\partial r}\right) ^2 -\left( \frac{\partial \Lambda }{\partial r}\right) ^2\frac{\partial \Phi }{\partial r}\right] \nonumber \\&+e^{\Phi -\Lambda }\mathcal {F}^{-2}\left( -2r\frac{\partial \Lambda }{\partial r}\right. \nonumber \\&\left. -r^2\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r} +r^2\frac{\partial ^2\Phi }{\partial r^2}+4r\frac{\partial \Phi }{\partial r}\right) f_R'' \nonumber \\&+e^{\Phi -\Lambda }\mathcal {F}^{-2}\left( -6\frac{\partial \Lambda }{\partial r}-6r\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r} +6r\frac{\partial ^2\Phi }{\partial r^2}\right. \nonumber \\&\left. +12\frac{\partial \Phi }{\partial r}+6r\left( \frac{\partial \Phi }{\partial r}\right) ^2\right) f_R' \nonumber \\&-e^{\Phi +\Lambda }r^2\mathcal {F}^{-2}\varrho ''\nu ^2\left[ \frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r} +2\left( \frac{\partial \Phi }{\partial r}\right) ^2\right. \nonumber \\&\left. +\frac{4}{r}\frac{\partial \Phi }{\partial r}+\frac{\partial ^2\Phi }{\partial r^2}\right] \nonumber \\&-6re^{\Phi -\Lambda }\mathcal {F}^{-3}\left( \frac{3}{r}f_R'+f_R''\right) \frac{\partial \Phi }{\partial r}f_R'\nonumber \\&+e^{\Phi +\Lambda }r^2\mathcal {F}^{-2}p\frac{\varrho '''\varrho '}{\varrho ''}\nu ^2\left( \frac{\partial \Phi }{\partial r}\right) ^2 \nonumber \\&+2e^{\Phi +\Lambda }r^2\mathcal {F}^{-3}\left( \frac{3}{r}f_R'+f_R''\right) \varrho ''\nu ^2\frac{\partial \Phi }{\partial r}\nonumber \\&+2e^{\Phi +\Lambda }r^2\mathcal {F}^{-2}\varrho '\nu \left( \frac{\partial \Phi }{\partial r}\right) ^2 \nonumber \\&-e^{\Phi +\Lambda }r^2\frac{1}{2f_{RR}} \,. \end{aligned}$$
(C18)
Select all terms contain \(\xi ^2\) in Eq. (C9), then the seventh term takes the form
$$\begin{aligned} \mathcal {P}_{Thermo}^7= & {} \int \limits 2e^{\Phi -\Lambda }\left[ \left( 2r\frac{\partial \Phi }{\partial r}+1\right) f_R\right. \nonumber \\&\left. +\left( r^2\frac{\partial \Phi }{\partial r}+2r\right) f_R'\right] \mathcal {F}^{-2}\varrho '^2\nu ^2e^{4\Lambda }\xi ^2 \nonumber \\&-e^{\Phi +\Lambda }r^2\frac{\varrho ''}{\varrho '^2}\left( \varrho '\nu \frac{\partial \Phi }{\partial r} +\frac{\varrho '^2}{\varrho ''}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. -\frac{2}{r}\varrho '\nu -\varrho '\nu f_R''\mathcal {F}^{-1}\right) ^2\xi ^2 \nonumber \\&-2e^{\Phi +\Lambda }r^2\varrho ''\left( -\nu \frac{\partial \xi }{\partial r}\right) \left( \nu \frac{\partial \Phi }{\partial r}+\frac{\varrho '}{\varrho ''}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. -\frac{2}{r}\nu -\nu f_R''\mathcal {F}^{-1}\right) \xi \,. \end{aligned}$$
(C19)
Simplifying Eq. (C19) and using integration by parts, after some calculations we obtain that
$$\begin{aligned}&\mathcal {P}_{Thermo}^7 \nonumber \\&\quad = \int \limits e^{\Lambda +\Phi }r^2\varrho '\nu \left[ e^{2\Lambda }\varrho '\nu \frac{3}{r}f_R'\mathcal {F}^{-2}\right. \nonumber \\&\qquad \left. +2\left( \frac{\partial \Phi }{\partial r}\right) ^2+\frac{\partial \Phi }{\partial r}\frac{\partial \Lambda }{\partial r}\right. \nonumber \\&\qquad \left. -\frac{1}{r}\frac{\partial \Phi }{\partial r}+\frac{1}{r}\frac{\partial \Lambda }{\partial r}-2f_R''\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r}-\frac{1}{r}f_R''\mathcal {F}^{-1}-\frac{\partial ^2\Phi }{\partial r^2} \right] \xi ^2 \nonumber \\&\qquad +e^{\Lambda +\Phi }r^2\varrho ''\nu ^2\left[ -\left( \frac{\partial \Phi }{\partial r}\right) ^2-2\frac{\partial \Phi }{\partial r}\frac{\partial \Lambda }{\partial r} +\frac{6}{r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\qquad \left. -\frac{1}{r^2} -\frac{e^{2\Lambda }}{r^2}+e^{2\Lambda }\frac{R}{2}+3f_R''\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r} +f_R''\mathcal {F}^{-1}\frac{\partial \Lambda }{\partial r} \right. \nonumber \\&\qquad \left. +f_R'''\mathcal {F}^{-1}-2f_R''^2\mathcal {F}^{-2}-\frac{2}{r^2}f_R''f_R\mathcal {F}^{-2} -\frac{4}{r}f_R''f_R'\mathcal {F}^{-2}\right] \xi ^2 \nonumber \\&\qquad +e^{\Lambda +\Phi }r^2\frac{\varrho '''\varrho '}{\varrho ''}\nu ^2\left[ \left( \frac{\partial \Phi }{\partial r}\right) ^2-\frac{2}{r}\frac{\partial \Phi }{\partial r} \right. \nonumber \\&\qquad \left. -\frac{\partial \Phi }{\partial r}f_R''\mathcal {F}^{-1}\right] \xi ^2 , \end{aligned}$$
(C20)
hence
$$\begin{aligned} \mathcal {C}_{Thermo}^7= & {} e^{\Lambda +\Phi }r^2\varrho '\nu \left[ e^{2\Lambda }\varrho '\nu \frac{3}{r}f_R'\mathcal {F}^{-2}+2\left( \frac{\partial \Phi }{\partial r}\right) ^2\right. \nonumber \\&+\frac{\partial \Phi }{\partial r}\frac{\partial \Lambda }{\partial r}-\frac{1}{r}\frac{\partial \Phi }{\partial r}\nonumber \\&\left. +\frac{1}{r}\frac{\partial \Lambda }{\partial r}-2f_R''\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r}-\frac{1}{r}f_R''\mathcal {F}^{-1}-\frac{\partial ^2\Phi }{\partial r^2}\right] \nonumber \\&+e^{\Lambda +\Phi }r^2\varrho ''\nu ^2\left[ -\left( \frac{\partial \Phi }{\partial r}\right) ^2-2\frac{\partial \Phi }{\partial r}\frac{\partial \Lambda }{\partial r} +\frac{6}{r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&-\frac{1}{r^2}-\frac{e^{2\Lambda }}{r^2}+e^{2\Lambda }\frac{R}{2}+3f_R''\mathcal {F}^{-1}\frac{\partial \Phi }{\partial r} \nonumber \\&+f_R''\mathcal {F}^{-1}\frac{\partial \Lambda }{\partial r} +f_R'''\mathcal {F}^{-1}-2f_R''^2\mathcal {F}^{-2}\nonumber \\&\left. -\frac{2}{r^2}f_R''f_R\mathcal {F}^{-2} -\frac{4}{r}f_R''f_R'\mathcal {F}^{-2}\right] \nonumber \\&+e^{\Lambda +\Phi }r^2\frac{\varrho '''\varrho '}{\varrho ''}\nu ^2\left[ \left( \frac{\partial \Phi }{\partial r}\right) ^2-\frac{2}{r}\frac{\partial \Phi }{\partial r} \right. \nonumber \\&\left. -\frac{\partial \Phi }{\partial r}f_R''\mathcal {F}^{-1}\right] , \end{aligned}$$
(C21)
The last term is the \(b\xi \) term, this term is not complicated, so \(\mathcal {C}_{Thermo}^8\) can be directly read off from Eq. (C9),
$$\begin{aligned} \mathcal {C}_{Thermo}^8= & {} 2e^{\Phi -\Lambda }\left[ -2r\frac{\partial \Lambda }{\partial r} -r^2\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. +r^2\left( \frac{\partial \Phi }{\partial r}\right) ^2+r^2\frac{\partial ^2\Phi }{\partial r^2}\right] \mathcal {F}^{-1}(-\varrho '\nu e^{2\Lambda }) \nonumber \\&+2e^{\Phi -\Lambda }\left[ \left( 2r\frac{\partial \Phi }{\partial r}+1\right) f_R\right. \nonumber \\&\left. +\left( r^2\frac{\partial \Phi }{\partial r}+2r\right) f_R'\right] \mathcal {F}^{-2}\left( 2\varrho '\nu e^{2\Lambda }\frac{\partial \Phi }{\partial r} \right) \nonumber \\&-2e^{\Phi +\Lambda }r^2\varrho '' \left( \nu \frac{\partial \Phi }{\partial r}+\frac{\varrho '}{\varrho ''}\frac{\partial \Phi }{\partial r} -\frac{2}{r}\nu \right. \nonumber \\&\left. -\nu f_R''\mathcal {F}^{-1}\right) \mathcal {F}^{-1}\nu \frac{\partial \Phi }{\partial r} \nonumber \\= & {} \mathcal {F}^{-1}\varrho '\nu e^{\Phi +\Lambda }\left( 4r\frac{\partial \Lambda }{\partial r}+2r^2\frac{\partial \Lambda }{\partial r}\frac{\partial \Phi }{\partial r}\right. \nonumber \\&\left. +2r\frac{\partial \Phi }{\partial r}-2r^2\frac{\partial ^2\Phi }{\partial r^2}\right) \nonumber \\&+6\mathcal {F}^{-2}\varrho '\nu e^{\Phi +\Lambda }\frac{\partial \Phi }{\partial r}r f_R'\nonumber \\&-2\mathcal {F}^{-1}e^{\Phi +\Lambda }r^2\varrho ''\nu ^2\frac{\partial \Phi }{\partial r} \left( \frac{\partial \Phi }{\partial r}-\frac{2}{r}-f_R''\mathcal {F}^{-1}\right) .\nonumber \\ \end{aligned}$$
(C22)
Substituting these coefficients \(\mathcal {C}_{Thermo}^i\) into Eq. (42) we obtain the thermodynamical stability criterion for perfect fluid in f(R) theories.