1 Introduction

Black holes can be viewed as thermodynamic systems because they not only have temperature and entropy, but also exhibit rich critical phenomena. The famous Hawking–Page phase transition [1] was found to take place between large AdS black hole and thermal AdS space. It was also discovered that charged AdS black holes undergo a first-order phase transition analogous to the Van der Waals (VdW) liquid–gas system [2, 3]. Recently, Kubizňák and Mann [9] investigated the \(P{-}V\) criticality of charged AdS black holes in the extended space where the cosmological constant is identified as thermodynamic pressure. Their enlightening research further enhanced the analogy between charged AdS black holes and liquid–gas systems. Moreover, reentrant phase transitions [1012, 15, 22, 27] reminiscent of multicomponent liquids and Small/intermediate/large black hole phase transitions [12, 13, 22] reminiscent of solid/liquid/gas phase transitions were discovered. These findings revealed the amazingly close relation between AdS black holes and ordinary thermodynamic systems. So far there have been made many efforts concentrating on the extend phase space thermodynamics of black holes [463] that we can not list all of them here. For nice reviews, see Refs. [27, 28] and the references therein.

Among the research above, Chen et al. [31] investigated \(P-V\) criticality of four-dimensional AdS black hole in f(R) gravity. It was shown that f(R) correction influences the Gibbs free energy and the ratio \(\rho _c\). Recently, we further studied the coexistence curve and molecule number density of four-dimensional f(R) AdS black holes [47]. Specifically, we derived the analytic expressions of the universal coexistence curve that is independent of theory parameters and obtained the explicit expressions of the physical quantity describing the difference of the number densities of black hole molecules between the small and large black hole.

However, extended phase space thermodynamics of higher-dimensional f(R) AdS black holes has not been reported in the literature yet. The attempt to obtain higher-dimensional black hole solutions in f(R) gravity coupled to standard Maxwell field failed because in higher dimensions the standard Maxwell energy-momentum tensor is not traceless. Sheykhi creatively considered conformally invariant Maxwell action instead and successfully solved this problem. Both the black hole solutions and thermodynamics were thoroughly investigated [67]. In this paper, we would like to generalize this research to the extended phase space where the cosmological constant is view as a variable and identified as thermodynamic pressure. The motivation is as follows. On the one hand, studying the black holes and their thermodynamics [6473] in f(R) gravity has its own right. f(R) gravity, as a kind of modified gravity theory, serves as an alternative approach other than dark energy to explain the cosmic acceleration. It is natural to expect that the thermodynamics of black holes in f(R) gravity distinguishes itself from the thermodynamics of black holes in Einstein gravity. Moreover, the extended phase space thermodynamics of higher-dimensional black holes may reveal unique features associated with conformally invariant Maxwell field and higher-dimensional spacetime different from that of four-dimensional black holes. On the other hand, the mass should be interpreted as enthalpy rather than internal energy in the extended phase space. And the Smarr relation matches exactly with the first law of black hole thermodynamics. As stated in the first paragraph, the study of extended space thermodynamics has scored great success. Probing the thermodynamics of higher-dimensional f(R) black holes in the extended phase space will further deepen the understanding of the relation between AdS black holes and ordinary thermodynamic systems.

The organization of this paper is as follows. A short review on the thermodynamics of higher-dimensional f(R) black holes will be presented in Sect. 2. Then we will generalize the thermodynamics to the extended phase space in Sect. 3 and study the critical exponents in Sect. 4. In Sect. 5, we will discuss in detail how our results put constraint on the form of the function f(R) and we will also present a simple example. A brief conclusion will be drawn in Sect. 6.

2 A brief review on the thermodynamics of higher-dimensional f(R) black holes

The approach to obtain higher-dimensional black hole solutions from \(R+f(R)\) gravity coupled to standard Maxwell field failed because in higher dimensions the standard Maxwell energy-momentum tensor is not traceless. To solve this problem, one should consider the following conformally invariant Maxwell action instead:

$$\begin{aligned} S_m=-\int \mathrm{d}^nx\sqrt{-g}(F_{\mu \nu }F^{\mu \nu })^p. \end{aligned}$$
(1)

\(F_{\mu \nu }=\partial _\mu A_\nu -\partial _\nu A_\mu \) is the electromagnetic tensor, where \(A_\mu \) represents the electromagnetic potential. p is a positive integer and the above action recovers the standard Maxwell action when \(p=1\). It can be proved that the energy-momentum tensor can be traceless provided \(n=4p\). Then the action of \(R+f(R)\) gravity coupled to conformally invariant Maxwell field in n-dimensional spacetime reads

$$\begin{aligned} S=\int _\mathcal {M} \mathrm{d}^nx\sqrt{-g}[R+f(R)-(F_{\mu \nu }F^{\mu \nu })^p], \end{aligned}$$
(2)

where f(R) is an arbitrary function of scalar curvature R.

The corresponding n-dimensional black hole metric has been derived in Ref. [67] as follows:

$$\begin{aligned} \mathrm{d}s^2=-N(r)\mathrm{d}t^2+\frac{\mathrm{d}r^2}{N(r)}+r^2 \mathrm{d}\Omega ^2_{n-2}, \end{aligned}$$
(3)

where

$$\begin{aligned} N(r)=1-\frac{2m}{r^{n-3}}+\frac{q^2}{r^{n-2}}\times \frac{(-2q^2)^{(n-4)/4}}{1+f'(R_0)}-\frac{R_0}{n(n-1)}r^2. \end{aligned}$$
(4)

Note that the above black hole solutions hold for the dimensions which are multiples of four due to the restriction \(n=4p\) ensuring the traceless property of the energy-momentum tensor, i.e., \(n=4,8,12,\ldots \). When \(n=4\), the above solutions recover the solution in Ref. [64]. As argued in Ref. [67], for the case \(1+f'(R_0)>0\), there would be two inner and outer horizons, an extreme black hole or naked singularity due to different choices of parameters. However, for \(1+f'(R_0)<0\), the conserved quantities such as mass would be negative, making this case nonphysical [67].

It has been pointed out in Ref. [67] that the above solution is asymptotically AdS if one define \(R_0=-n(n-1)/l^2\). But it differs from the higher-dimensional RN-AdS black hole for its electric charge term go as \(r^{-(n-2)}\) while that of RN-AdS black holes go as \(r^{-2(n-3)}\).

The mass M, entropy S, charge Q, electric potential \(\Phi \), and Hawking temperature T was obtained as follows [67]:

$$\begin{aligned} M= & {} \frac{(n-2)\Omega _{n-2}}{8\pi }m(1+f'(R_0)),\end{aligned}$$
(5)
$$\begin{aligned} S= & {} \frac{r_+^{n-2}\Omega _{n-2}}{4}(1+f'(R_0)),\end{aligned}$$
(6)
$$\begin{aligned} Q= & {} \frac{n(-2)^{(n-4)/4}q^{(n-2)/2}\Omega _{n-2}}{16\pi \sqrt{1+f'(R_0)}},\end{aligned}$$
(7)
$$\begin{aligned} \Phi= & {} \frac{q}{r_+}\sqrt{1+f'(R_0)},\end{aligned}$$
(8)
$$\begin{aligned} T= & {} \frac{(1{+}f'(R_0)){\times }[2r_{+}^2(n-1){+}2l^2(n{-}3)]{+}(-2q^2)^{n/4}r_+^{2-n}l^2}{8\pi l^2 r_+(1{+}f'(R_0))},\nonumber \\ \end{aligned}$$
(9)

where \(\Omega _{n-2}\) denotes the volume of the unit (\(n-2\))-sphere. Note that we have corrected the typo error in the expression of T by adding the coefficient 8 in its denominator so that it can recover the Hawking temperature of four-dimensional black holes [64] when \(n=4\).

It was proved that the above physical quantities satisfy the first law of black hole thermodynamics [67],

$$\begin{aligned} \mathrm{d}M=T\mathrm{d}S+\Phi \mathrm{d}Q. \end{aligned}$$
(10)

3 Extended phase space thermodynamics of higher-dimensional f(R) black holes

In this section, we introduce the extended phase space where the cosmological constant is identified as the thermodynamic pressure while the conjugate quantity is regarded as the thermodynamic volume.

Here we adopt the following definition of pressure that is commonly used in the former literature of the extended phase space:

$$\begin{aligned} P=\frac{-\Lambda }{8\pi }=\frac{(n-1)(n-2)}{16\pi l^2}. \end{aligned}$$
(11)

Note that we have utilized the expression of the cosmological constant in the n-dimensional spacetime \(\Lambda =-\frac{(n-1)(n-2)}{2l^2}\). Comparing it with the definition of \(R_0\), one can find the relation between \(\Lambda \) and \(R_0\) as

$$\begin{aligned} R_0=\frac{2n\Lambda }{n-2}, \end{aligned}$$
(12)

which recovers the relation \(R_0=4\Lambda \) when \(n=4\).

Utilizing Eqs. (4), (5), and (11), one can derive

$$\begin{aligned} V=\left( \frac{\partial M}{\partial P}\right) _{S,Q}=\frac{(1+f'(R_0))r_+^{n-1}\Omega _{n-2}}{n-1}. \end{aligned}$$
(13)

Comparing it with the thermodynamic volume of n-dimensional RN-AdS black holes [10], one can find that it gains an extra factor \(1+f'(R_0)\) due to the effect of f(R) gravity.

Utilizing Eqs. (5), (6), (7), (8), (9), (11), and (13), the first law of black hole thermodynamics and the Smarr relation in the extended phase space can be obtained:

$$\begin{aligned}&\mathrm{d}M=T\mathrm{d}S+\Phi \mathrm{d}Q+V\mathrm{d}P,\end{aligned}$$
(14)
$$\begin{aligned}&M=\frac{n-2}{n-3}TS+\frac{(n-2)^2}{n(n-3)}\Phi Q-\frac{2}{n-3}VP. \end{aligned}$$
(15)

When \(n=4\), the above result reduces to \(M=2TS+\Phi Q-2VP\), coinciding with the Smarr relation of RN-AdS black holes.

Utilizing Eqs. (9) and (11), the equation of state can be derived as

$$\begin{aligned} P=\frac{(n-2)T}{4r_+}-\frac{(n-3)(n-2)}{16\pi r_+^2}-\frac{(n-2)2^{n/4}(-q^2)^{n/4}}{32(1+f'(R_0))\pi r_+^n}. \end{aligned}$$
(16)

Identifying the specific volume v as \(v=\frac{4r_+}{(n-2)}\), the above equation can be rewritten as

$$\begin{aligned} P=\frac{T}{v}-\frac{(n-3)}{(n-2)\pi v^2}-\frac{2^{9n/4}(-q^2)^{n/4}}{32(1+f'(R_0))\pi (n-2)^{n-1}v^n}. \end{aligned}$$
(17)

The possible critical point can be defined by

$$\begin{aligned}&\left( \frac{\partial P}{\partial v}\right) _{T=T_c, v=v_c}=0,\end{aligned}$$
(18)
$$\begin{aligned}&\left( \frac{\partial ^2 P}{\partial v^2}\right) _{T=T_c, v=v_c}=0. \end{aligned}$$
(19)

Substituting Eq. (17) into the above two equations, one can easily get

$$\begin{aligned}&-\frac{T_c}{v_c^2}+\frac{2(n-3)}{(n-2)\pi v_c^3}\nonumber \\&\quad +\frac{2^{9n/4}(-q^2)^{n/4}n}{32(1+f'(R_0))\pi (n-2)^{n-1}v_c^{n+1}}=0,\end{aligned}$$
(20)
$$\begin{aligned}&\frac{2T_c}{v_c^3}-\frac{6(n-3)}{(n-2)\pi v_c^4}\nonumber \\&\quad -\frac{2^{9n/4}(-q^2)^{n/4}n(n+1)}{32(1+f'(R_0))\pi (n-2)^{n-1}v_c^{n+2}}=0. \end{aligned}$$
(21)

Simplifying the equation that (20) \(\times \, (n+1)\, + \) (21) \(\times \,v=0\), one can derive the relation between the possible critical specific volume and critical temperature as

$$\begin{aligned} T_c=\frac{2(n-3)}{(n-1)\pi v_c}. \end{aligned}$$
(22)

Substituting Eq. (22) into Eq. (20), one can obtain

$$\begin{aligned} v_c^{n-2}=\frac{-n(n-1)2^{\frac{9n-24}{4}}(-q^2)^{n/4}}{(1+f'(R_0))(n-3)(n-2)^{n-2}}. \end{aligned}$$
(23)

Substituting Eqs. (22) and (23) into Eq. (17), the possible critical pressure can be derived as

$$\begin{aligned} P=\frac{n-3}{n\pi }\left[ \frac{-n(n-1)2^{\frac{9n-24}{4}}(-q^2)^{n/4}}{(1+f'(R_0))(n-3)(n-2)^{n-2}}\right] ^{\frac{-2}{n-2}}. \end{aligned}$$
(24)

Keeping in mind the restrictions that \(n=4p\) and \(1+f'(R_0)>0\), we can draw the conclusion from Eq. (23) that meaningful critical specific volume only exists when p is odd. Because \(v_c^{n-2}<0\) when p is even.

The ratio \(\frac{P_cv_c}{T_c}\) can be calculated as

$$\begin{aligned} \frac{P_cv_c}{T_c}=\frac{n-1}{2n}. \end{aligned}$$
(25)

The above result differs from that of higher-dimensional charged AdS black holes in Einstein gravity. However, when \(n=4\), the ratio \(\frac{P_cv_c}{T_c}\) reduces to 3 / 8, which is the same as that of four-dimensional RN-AdS black holes, implying that f(R) gravity does not influence the ratio \(\frac{P_cv_c}{T_c}\). So the result of Eq. (25) may be attributed to the effect of conformally invariant Maxwell field. Note that Ref. [31] argued that for four-dimensional f(R) black holes this ratio is influenced by the f(R) correction. This inconsistency with our results can be attributed to the fact that the pressure in Ref. [31] was defined as \(\frac{-bR_0}{32\pi }\) and different from the traditional definition by adding the factor \(b=1+1+f'(R_0)\).

In the extended phase space, the mass of black holes should be interpreted as enthalpy. Then the Gibbs free energy can be derived as

$$\begin{aligned} G=H-TS=M-TS. \end{aligned}$$
(26)

Utilizing Eqs. (5), (6), (9), and (11), one can obtain

$$\begin{aligned} G= & {} \Omega _{n-2}[\frac{(1+f'(R_0))r_+^{n-3}}{16\pi }-\frac{(1+f'(R_0))Pr_+^{n-1}}{(n-1)(n-2)}\nonumber \\&-\frac{(n-1)2^{\frac{n-20}{4}}(-q^2)^{n/4}}{\pi r_+}]. \end{aligned}$$
(27)

Some specific cases will be discussed as follows.

Case 1 \(p=1\)

When \(p=1\), one can obtain

$$\begin{aligned}&T_c=\frac{\sqrt{6(1+f'(R_0))}}{18\pi q},\;v_c=\frac{2\sqrt{6}\,q}{\sqrt{1+f'(R_0)}},\nonumber \\&\quad P_c=\frac{1+f'(R_0)}{96\pi q^2}, \end{aligned}$$
(28)

recovering the critical Hawking temperature and critical volume of four-dimensional f(R) AdS black holes [31]. However, the numerator of our critical pressure is \(1+f'(R_0)\) instead of \((1+f'(R_0))^2\) since due to different definitions of P.

The Gibbs free energy reduces to

$$\begin{aligned} G=\frac{(1+f'(R_0))r_+}{4}-\frac{2(1+f'(R_0)) P \pi r_+^3}{3}+\frac{3q^2}{4r_+}, \end{aligned}$$
(29)

which matches Eq. 24 in Ref. [31] except the extra factor \((1+f'(R_0))\) in the second term due to different definitions of P.

Case 2 \(p=2\)

When \(p=2\), Eq. (23) reduces to

$$\begin{aligned} v_c^{6}=\frac{-3584q^4}{3645(1+f'(R_0))}<0, \end{aligned}$$
(30)

from which one cannot obtain positive real root for the critical specific volume. So there is no meaningful critical point for eight-dimensional f(R) AdS black holes. This result is quite different from four-dimensional f(R) AdS black holes. It may be attributed to the combined effect of f(R) gravity and conformally invariant Maxwell field.

Case 3 \(p=3\)

When \(p=3\), the critical quantities can be calculated as

$$\begin{aligned}&v_c^{10}=\frac{11\times 2^{13}q^6}{3\times 5^{10}(1+f'(R_0))},\end{aligned}$$
(31)
$$\begin{aligned}&T_c=\frac{18}{11\pi v_c},\end{aligned}$$
(32)
$$\begin{aligned}&P_c=\frac{3}{4\pi v_c^2},\end{aligned}$$
(33)
$$\begin{aligned}&\frac{P_cv_c}{T_c}=\frac{11}{24}. \end{aligned}$$
(34)

From above, one can safely draw the conclusion that the critical physical quantities depend on both the parameter q and the term \(f'(R_0)\), which reflects the effect of f(R) gravity. With the increasing of q, both \(T_c\) and \(P_c\) decrease while \(v_c\) increases. With the increasing of \(f'(R_0)\), both \(T_c\) and \(P_c\) increase while \(v_c\) decreases. However, the ratio \(\frac{P_cv_c}{T_c}\) keeps constant. Table 1 lists the relevant critical quantities for different choices of parameters.

Table 1 Critical quantities for \(p=3\)

Utilizing Eqs. (17) and (27), one can derive both the equation of state and the Gibbs free energy for the case \(p=3\) as

$$\begin{aligned} P= & {} \frac{T}{v}-\frac{9}{10\pi v^2}+\frac{2^{27}q^6}{32\times 10^{11}(1+f'(R_0))\pi v^{12}},\end{aligned}$$
(35)
$$\begin{aligned} G= & {} 0.412314(1+f'(R_0))r_+^{9}-0.18841(1+f'(R_0))\nonumber \\&\times Pr_+^{11}+\frac{18.1418q^6}{r_+}. \end{aligned}$$
(36)

To gain an intuitive understanding, we plot the \(P-v\) graph in Fig. 1a and Gibbs free energy graph in Fig. 1b for the case \(q=1,f'(R_0)=0.2\). The isotherm can be divided into three branches when the temperature is lower than the critical temperature. Both the large radius branch and the small radius branch are stable while the medium radius branch is unstable. Phase transitions analogous to the van der Waals liquid–gas system take place between the small black hole and the large black hole. Classical swallow tail behavior, characteristic of first-order phase transitions, can also be observed in the Gibbs free energy graph.

Fig. 1
figure 1

a P vs. v for \(p=3,q=1,f'(R_0)=0.2\). b G vs. T for \(p=3,q=1,f'(R_0)=0.2\)

4 Critical exponents of higher-dimensional f(R) black holes

To investigate the critical behavior near the critical point, we would like to calculate the relevant critical exponents as follows:

$$\begin{aligned}&C_v\propto |t|^{-\alpha },\end{aligned}$$
(37)
$$\begin{aligned}&\eta \propto |t|^{\beta },\end{aligned}$$
(38)
$$\begin{aligned}&\kappa _T\propto |t|^{-\gamma },\end{aligned}$$
(39)
$$\begin{aligned}&|P-P_c|\propto |v-v_c|^{\delta }. \end{aligned}$$
(40)

From the definitions above, one can see clearly that \(\alpha \) and \(\gamma \) characterize the behavior of fixed volume specific heat \(C_v\) and isothermal compressibility coefficient \(\kappa _T\) respectively while \(\beta \) reflects the behavior of the order parameter \(\eta \). The last critical exponent \(\delta \) describes the behavior of the critical isotherm.

The fixed volume specific heat \(C_v\) equals zero, because the entropy S is independent of the Hawking temperature T, which can be witnessed from Eq. (6). Then the conclusion that \(\alpha =0\) can be drawn.

To characterize to what extent the physical quantities approach the critical point, it would be convenient to introduce the notations below

$$\begin{aligned} t=\frac{T}{T_c}-1,\;\;\epsilon =\frac{v}{v_c}-1,\;\;p=\frac{P}{P_c}. \end{aligned}$$
(41)

Utilizing Eq. (41), Eq. (17) can be expanded as follows near the critical point:

$$\begin{aligned} p=1+a_{10}t+a_{01}\epsilon +a_{11}t\epsilon +a_{02}\epsilon ^2+a_{03}\epsilon ^3+O(t\epsilon ^2,\epsilon ^4). \end{aligned}$$
(42)

where

$$\begin{aligned} a_{01}= & {} a_{02}=0,\end{aligned}$$
(43)
$$\begin{aligned} a_{10}= & {} \frac{T_c}{P_cv_c},\end{aligned}$$
(44)
$$\begin{aligned} a_{11}= & {} -\frac{T_c}{P_cv_c},\end{aligned}$$
(45)
$$\begin{aligned} a_{03}= & {} -\frac{T_c}{P_cv_c}+\frac{4(n-3)}{(n-2)\pi v_c^2P_c}\nonumber \\&+\frac{2^{9n/4}n(n+1)(n+2)(-q^2)^{n/4}}{192(n-2)^{n-1}(1+f'(R_0))\pi v_c^{n}P_c}. \end{aligned}$$
(46)

Denoting the large black hole and small black hole with the subscripts l and s respectively, one can obtain

$$\begin{aligned} 1+a_{10}t+a_{11}t\epsilon _l+a_{03}\epsilon _l^3=1+a_{10}t+a_{11}t\epsilon _s+a_{03}\epsilon _s^3. \end{aligned}$$
(47)

The above equation is based on the fact that during the phase transition the pressure keeps constant.

According to Maxwell’s equal area law,

$$\begin{aligned} \int ^{\epsilon _s}_{\epsilon _l}\epsilon \frac{\mathrm{d}p}{\mathrm{d}\epsilon }\mathrm{d} \epsilon =0. \end{aligned}$$
(48)

Utilizing Eq. (42), one can easily obtain

$$\begin{aligned} \frac{\mathrm{d}p}{\mathrm{d}\epsilon }=a_{11}t+3a_{03}\epsilon ^2, \end{aligned}$$
(49)

Substituting it into Eq. (48), one can get

$$\begin{aligned} a_{11}t(\epsilon ^2_s-\epsilon ^2_l)+\frac{3}{2} a_{03}(\epsilon ^4_s-\epsilon ^4_l)=0. \end{aligned}$$
(50)

From Eqs. (32) and (35), one can obtain

$$\begin{aligned} \epsilon _l=-\epsilon _s=\sqrt{\frac{-a_{11}t}{a_{03}}}. \end{aligned}$$
(51)

So

$$\begin{aligned} \eta =v_l-v_s=v_c(\epsilon _l-\epsilon _s)=2v_c\epsilon _l\propto \sqrt{-t}, \end{aligned}$$
(52)

Comparing it with the definition of \(\beta \), one can conclude that \(\beta =1/2\).

The isothermal compressibility coefficient \(\kappa _T\) can be calculated as

$$\begin{aligned} \kappa _T=\left. -\frac{1}{v}\frac{\partial v}{\partial P}\right| _{v_c}\propto \left. -\frac{1}{\frac{\partial p}{\partial \epsilon }}\right| _{\epsilon =0}=-\frac{1}{a_{11}t}, \end{aligned}$$
(53)

yielding \(\gamma =1\).

Substituting \(t=0\) into Eq. (42), one can get

$$\begin{aligned} p-1=a_{03}\epsilon ^3, \end{aligned}$$
(54)

Comparing it with the definition of \(\delta \), one can draw the conclusion that \(\delta =3\).

Our results of critical exponents are exactly the same as those obtained before for other AdS black holes in the former literature [9, 10, 31, 32], implying that neither f(R) gravity nor conformally invariant Maxwell field influence the critical exponents. This can be attributed to the mean field theory.

5 Discussions on the constraint on the function f(R)

Till now, we have accomplished the research goal of generalizing the thermodynamics of higher-dimensional f(R) black holes to the extended phase space. It is shown that the critical physical quantities depend on the term \(f'(R_0)\), showing the effect of f(R) gravity. Note that the investigated black hole solution depends on the form of the function f(R). Here, we will show that how our results put constraint on the form of the function f(R).

From Eq. (4), one can see clearly that the term \(1+f'(R_0)\) appears in the function N(r), thus influencing the black hole metric. The black hole solution is asymptotically AdS if one define \(R_0=-n(n-1)/l^2\). With this definition, \(R_0\) is proportional to cosmological constant, which can be witnessed from Eq. (12). So the analyses in this paper contain the underlying assumption that \(R_0\) is negative. It can be viewed as the first constraint that our results put on the function f(R) since \(R_0\) can be non-negative in general.

The second constraint comes from the physical consideration. As reviewed in Sect. 2, there would be two inner and outer horizons, an extreme black hole or naked singularity due to different choices of parameters for the case \(1+f'(R_0)>0\). However, for \(1+f'(R_0)<0\), the conserved quantities such as mass would be negative, making this case nonphysical [67].

An example will be presented below for one to see how these two conditions constraint the specific form of f(R). Considering a simple case that \(f(R)=a_0R^2+b_0R^3\), one can easily derive

$$\begin{aligned} 1+f'(R_0)=1+2a_0R_0+3b_0R_0^2. \end{aligned}$$
(55)

To obtain \(R_0\), we can seek help from the important relation presented in the former literature. Considering the trace of the equation of motion, Refs.  [67, 69] derived that

$$\begin{aligned} R_0(1+f'(R_0))-\frac{n}{2}(R_0+f(R_0))=0. \end{aligned}$$
(56)

Substituting \(f(R)=a_0R^2+b_0R^3\) into the above relation, one can derive

$$\begin{aligned} -\frac{R_0}{2}[b_0(n-6)R_0^2+a_0(n-4)R_0+n-2]=0. \end{aligned}$$
(57)

Solving Eq. (57), one can obtain its nonzero roots as

$$\begin{aligned} R_0=\frac{(4-n)a_0\mp \sqrt{(n-4)^2a_0^2-4(n-2)(n-6)b_0}}{2b_0(n-6)}. \end{aligned}$$
(58)

Substituting Eq. (58) into Eq. (55), one can further get

$$\begin{aligned} 1+f'(R_0)=\frac{n\left[ (n-4)a_0^2-4b_0(n-6)\mp a_0\sqrt{(n-4)^2a_0^2-4(n-2)(n-6)b_0}\right] }{2b_0(n-6)^2}. \end{aligned}$$
(59)

Solving both the inequalities \(R_0<0\) and \(1+f'(R_0)>0\), one can figure out the restriction on the model parameter \(a_0\) and \(b_0\).

Due to the restriction that \(n=4p\), n can be chosen as 4, 8, 12. When \(n=4\), Eqs. (58) and (59) reduce to

$$\begin{aligned} R_0= & {} -\frac{1}{\sqrt{b_0}},\end{aligned}$$
(60)
$$\begin{aligned} 1+f'(R_0)= & {} \frac{4a_0\sqrt{b_0}+8b_0}{2b_0}. \end{aligned}$$
(61)

Note that we have omitted the positive root of \(R_0\). And one can easily obtain the restriction on \(a_0\) and \(b_0\) to be \(b_0>0, a_0>-2\sqrt{b_0}\). Similarly, one can find the constraint for the cases \(n=8,12\) and other models of f(R).

6 Conclusions

In this paper, we generalize the former research on the thermodynamics of higher-dimensional f(R) black holes to the extended phase space, where the cosmological constant is viewed as a variable. We introduce the traditional definition of thermodynamic pressure as \(P=-\frac{\Lambda }{8\pi }\) and derive its conjugate quantity as thermodynamic volume. It is shown that the thermodynamic volume gains an extra factor \(1+f'(R_0)\) due to the effect of f(R) gravity. We obtain both the first law of black hole thermodynamics and the Smarr relation in the extended phase space.

With the definition of thermodynamic pressure, we also derive the equation of state. By solving the critical condition equations, we obtain the analytic expressions for the possible critical Hawking temperature, pressure and specific volume. We also list the numerical results of critical quantities for different choices of parameters. It is proved that meaningful critical specific volume only exists when p is odd. The critical physical quantities depend on both the parameter q and the term \(f'(R_0)\). With the increasing of q, both \(T_c\) and \(P_c\) decrease while \(v_c\) increases. With the increasing of \(f'(R_0)\), both \(T_c\) and \(P_c\) increase while \(v_c\) decreases. However, the ratio \(\frac{P_cv_c}{T_c}\) keeps constant. It is shown that the ratio \(P_cv_c/T_c\) differs from that of higher-dimensional charged AdS black holes in Einstein gravity. However, when \(n=4\), the ratio \(\frac{P_cv_c}{T_c}\) reduces to 3 / 8, which is the same as that of four-dimensional RN-AdS black holes, implying that f(R) gravity does not influence the ratio \(\frac{P_cv_c}{T_c}\). So our results may be attributed to the effect of conformally invariant Maxwell field. Note that Ref. [31] argued that for four-dimensional f(R) black holes this ratio is influenced by the f(R) correction. This inconsistency with our results can be attributed to the fact that the pressure in Ref. [31] was defined as \(\frac{-bR_0}{32\pi }\) and different from the traditional definition by adding the factor \(b=1+1+f'(R_0)\).

To probe the phase transition, we derive the explicit expression of the Gibbs free energy. \(P-v\) graph and Gibbs free energy graph are also plotted. The isotherm can be divided into three branches when the temperature is lower than the critical temperature. Both the large radius branch and the small radius branch are stable, while the medium radius branch is unstable. Phase transitions analogous to the van der Waals liquid–gas system take place between the small black hole and the large black hole. Classical swallow tail behavior, characteristic of first-order phase transitions, can also be observed in the Gibbs free energy graph. To investigate the critical behavior near the critical point, critical exponents are calculated. It is shown that these exponents are exactly the same as those of other AdS black holes reported in the literature before, implying that neither f(R) gravity nor conformally invariant Maxwell field influence the critical exponents. This can be attributed to the mean field theory. Since the investigated black hole solution depends on the form of the function f(R), we discuss in detail how our results put constraint on the form of the function f(R) and we also present a simple example.

Our research further deepen the understanding of relation between AdS black holes and liquid–gas systems. On the other hand, our research also discover some unique characteristics that may be attributed to the combined effect of f(R) gravity and conformally invariant Maxwell field. Reference [70] discovered an interesting relation between the solutions of a class of pure f(R) gravity and those of Einstein conformally invariant Maxwell source. This may be a promising direction to probe the rich physics behind the interesting critical phenomena that we reported in this paper. Further investigation is called for.