1 Motivation

Higher dimensional gravities sometimes give rise to more interesting possibilities than the four-dimensional theories. This major leap can help solve the problem of “hierarchy of scales”. Many higher dimensional models have been formulated in recent years. The well-known generalization of Einstein’s gravity is the Lovelock gravity [1,2,3]. The equations of motion obtained in this gravity are still second order. Due to the topological background of Lovelock gravity, the corresponding Gauss–Bonnet term in the action does not possess any dynamical contribution in four dimensional geometries. Similarly, the third order Lovelock term gives contributions to the gravitational field equations in spacetime dimensions greater than or equal to seven. The generalization to this theory which contains the cubic and quartic curvature terms and possess dynamical contributions in five spacetime dimensions is the quasi-topological gravity [4,5,6]. The equations of motion for second, third [4, 5], and fourth order [6] quasi-topological gravities are also second order for the spherically symmetric metric and are nontrivial in five and higher dimensions. Nevertheless, the field equations for generic line elements are of order four, and quasi-topological Lagrangian varies with the spacetime dimension. It is also crucial to remember that, up to a certain factor, the linearized equations of quasi-topological gravity correlate with the linearized equations of Einstein’s gravity on maximally symmetric backgrounds. Recently, the generalized cubic quasi-topological gravity has also been established [7]. This extended theory allows Schwarzschild-like solutions and also leads to Einstein’s gravity in an adequate limit. In addition, this theory also develops the same degrees of freedom as Einstein’s gravity. This generalized model can also be used to draw conclusions about Lovelock, quasi-topological and Einsteinian cubic [8] theories. Furthermore, it has been confirmed that any effective action of gravity theory containing higher curvature terms can be made to resemble the action of some generalized quasi-topological gravity. Note that this can be accomplished if one redefines the metric tensor [9]. Besides vacuum solutions [7], the charged solutions in generalized quasi-topological gravities have also been found in Ref. [10]. It has also been proven that the ensemble of cubic invariants referring to five dimensional quasi-topological gravity, when expressed in four dimensional spacetime, simplifies to the form that represents four dimensional Einsteinian gravity with second order equations of motion in the FLRW ansatz. Notably, the inflationary period in this instance is entirely geometrical [11].

The holographic investigation of the conformal field theories in various dimensions (greater than or equal to four) may also be affordable in the backdrop of quasi-topological gravity [5]. The lower non-zero value for the ratio between the shear viscosity and entropy can also be found in a particular region of the continuum of quasi-topological gravitational couplings [12]. In the AdS/CFT correspondence, quasi-topological gravity can offer sufficient coupling constants that have a one-to-one correspondence with the central charges, enabling the construction of gravitational spacetimes [5, 13,14,15,16,17]. Furthermore, since the terms of quasi-topological gravity are not truly topological, so, the nontrivial gravitational effects in fewer dimensions are also possible. Therefore, this theory has priority over the Lovelock gravity [6]. The causality for the CFT can be sustained by imposing certain constraints on the coupling constants of this extended theory [18,19,20]. Thus, it might be very interesting to study black holes and black branes in quasi-topological gravity. In this context, quasi-topological black holes have been investigated in the literature [4, 5, 21,22,23]. Two families of solutions for the neutral and Maxwellian charged quasi-topological black holes were derived in Refs. [6, 24]. The black hole solution in cubic quasi-topological gravity with power-Maxwell source has been constructed in Ref. [25]. The solutions describing Lifshitz quartic quasi-topological black holes were found in Ref. [26].

In this paper we investigate the hairy black holes of quartic quasi-topological gravity. To achieve this we non-minimally couple the scalar field with gravity by employing the technique discovered by Oliva and Ray [27]. This approach leads to the development of numerous hairy black hole solutions in different gravity theories, where the scalar field is well-defined everywhere outside of the horizon while its backreaction onto the metric is captured analytically [28,29,30,31,32]. These solutions depict conformal hairy black holes in higher dimensions where no-go results were observed [33]. It has been shown that these objects have immensely rich thermodynamic properties, such as isolated critical points and black hole \(\lambda \)-lines [34, 35]. Recently, charged hairy black holes in the framework of quasi-topological gravity have also been explored in Refs. [36, 37].

The non-abelian Yang–Mills theory, which is employed in the investigation of gauged AdS super-gravity theories, is a modified form of abelian Maxwell’s theory. The conformal invariance allowed the Yang–Mills model to be transitioned from the \(dS_4\) to the finite cylinder \(I\times {\mathcal {S}}^3\) where \(I=(-\pi /2,\pi /2)\) and \({\mathcal {S}}^3\) refers to the round sphere in three dimensions. The dynamics of the Yang–Mills field in \(dS_4\) has been observed to be simulated by geodesic motion in the infinite dimensional space \(M_{vac}\) of gauge-inequivalent Yang–Mills vacua on \({\mathcal {S}}^3\) [38]. This is true in the low energy limit, wherein the momentum along I is much diminutive than \({\mathcal {S}}^3\). The SU(N) Yang–Mills formulation in extra dimensions has also been examined as a basic plaything model of gauge-Higgs unification. In this instance, the functional renormalization group was put forward and the UV completeness of the five dimensional Yang–Mills theory in regard to asymptotic safety concerning UV complete models of gauge-Higgs unification has been looked over [39]. Meanwhile, the zero temperature effective action associated with SU(2) Yang–Mills theory has also been devised. The boundary conditions that go along with this action reshaped the symmetry of the four dimensional boundary at the origin into a U(1)-complex scalar setup [40]. The Yang–Mills model has also been analytically explored in the infrared (IR) limit by deploying first principles [41]. The one-loop IR singularities are shown to be caused by IR/UV assembling in regard to the non-commutative SU(N) Yang–Mills theory [42]. As a result of magnetic monopoles and their condensation in a dual superconductor scenario, quark confinement may also be characterized by the Yang–Mills field. The abelian projection approach openly dissolves both the local and global gauge symmetries as a consequence of partial gauge fixing [43, 44]. However, utilizing the novel gauge invariant technique of Yang–Mills theory, the non-abelian magnetic monopole can be effectively made available [45]. It should be noticed that in the SU(3) Yang–Mills formulation, these monopoles play a key role in the isolation of fundamental quarks. Moreover, topologically protected quantum computations can make advantages of non-abelian excitations, particularly the Majorana fermions [46,47,48]. The assumption of Yang–Mills field as a source of gravity was given in Ref. [50]. Under this assumption, a class of asymptotically flat spherically symmetric Yang–Mills solutions was derived numerically. The black holes of Einstein’s gravity with this source have been studied in Ref. [51]. Similarly, Yang–Mills black holes with cosmological constant in Einstein’s theory were studied in Refs. [52,53,54]. Other investigations of black holes within this framework of Yang–Mills field are in Refs. [55,56,57,58]. A new family of black holes in Lovelock–Yang–Mills theory were also introduced in Ref. [58]. By taking the Wu-Yang ansatz [59], the authors of Ref. [60] derived the analytical solution describing black holes in quasi-topological-Yang–Mills gravity. Instead of Yang–Mills theory, one can also couple power-Yang–Mills theory with gravity and explore black holes [61], i.e., to consider the source as \((F^{(a)}_{\alpha \beta }F^{(a)\alpha \beta })^q\), where \(F^{(a)}_{\alpha \beta }\) is the Yang–Mills field with \(1\le a\le (d-1)(d-2)/2\) and q is a parameter of nonlinearity. Using this idea, the black holes of Lovelock gravity were studied and new third order Lovelock as well as Gauss–Bonnet solutions were found [61]. Similarly, dimensionally continued power-Yang–Mills black holes [62] and Lovelock-power-Yang–Mills black holes surrounded by dark fluid [63] have also been found recently. The thermal stability and critical behaviour of the nonlinear Yang–Mills black holes have also been recently examined [49]. Note that three different nonlinear Yang–Mills models have been employed for the construction of solutions describing these black holes [49]. In this paper, we are taking the Wu-Yang ansatz [59] for the study of power-Yang–Mills black holes with scalar hair in quartic quasi-topological gravity.

The physics of black holes in pure Lovelock gravity has attracted much attention from theoretical physicists. Recently, black holes of this theory with different matter sources have been studied in the literature [64,65,66,67,68,69]. It is shown in Ref. [70] that the black hole of \(d=3N+1\) dimensional pure Lovelock gravity is stable. A study related to the ADM mass and quasi-local energy in this theory is presented in Ref. [71]. Similarly, thermodynamic behaviour and PV criticality of pure Lovelock black holes were also investigated [72]. In addition to the Yang–Mills solution representing black holes of quartic quasi-topological gravity, the authors of Ref. [60] derived the Yang–Mills black hole solution in pure quasi-topological theory as well. Motivated by this work, we also discuss power-Yang–Mills hairy black holes of pure quasi-topological theory in this paper.

Recently, rotating black branes in Einstein’s theory with nonlinear electromagnetic sources have been studied [73]. The generalization of these nonlinearly charged rotating black branes in Gauss–Bonnet gravity have also been worked out [74]. Furthermore, thermodynamics of rotating Lovelock black branes with Maxwell [75, 76] and nonlinear electromagnetic sources [77,78,79] has also been probed. Similarly, the rotating black branes of quasi-topological gravity and their thermodynamic properties have been studied [80, 81]. In this paper, we investigate black branes of quartic quasi-topological gravity when coupled with the power-Yang–Mills field. A new class of Yang–Mills black branes will also be recovered from our results when we put \(q=1\).

The outline of this paper is as follows. In Sect. 2, we construct the action function associated with quartic quasi-topological-scalar gravity and use the model of power-Yang–Mills theory for the determination of new hairy black hole solutions. In Sect. 3, we investigate the thermodynamic properties and validity of the first law for these objects. In Sect. 4, we work out the physical properties of power-Yang–Mills hairy black holes in pure quasi-topological gravity. Thermodynamic stability of these pure quasi-topological black holes are discussed in Sect. 5. Further, Sect. 6 is devoted to the thermodynamic properties of power-Yang–Mills rotating black branes and their associated conserved quantities. Finally, we present some concluding remarks in Sect. 7.

2 Quartic quasi-topological black holes with power-Yang–Mills source

The action describing the quartic quasi-topological gravity coupled to Yang–Mills theory is given in Ref. [60]. Here, we use the power-Yang–Mills field as a source and work for new hairy black hole solutions in quartic quasi-topological gravity. In this setup, we consider the N-parameters gauge group \({\mathfrak {G}}\) whose structure constants \(C_{(i)(j)}^{(k)}\) are defined as

$$\begin{aligned} \gamma _{ij}=-\frac{\Gamma _{(i)(j)}}{|\Gamma |^{1/N}}, \end{aligned}$$
(2.1)

where, i.jk run from 1 to N, \(\Gamma _{(i)(j)}=C^{(k)}_{(i)(l)}C^{(l)}_{(j)(k)}\) and \(\Gamma \) is its determinant. Thus, the action for the quartic quasi-topological gravity coupled with the power-Yang–Mills theory in higher spacetime dimensions is given by

$$\begin{aligned} {\mathcal {I}}= & {} \frac{1}{16\pi }\int d^{d}x\sqrt{-g}\nonumber \\{} & {} \times \bigg [R-2\Lambda +{\tilde{\mu }}_2{\mathfrak {L}}_2+{\tilde{\mu }}_3{\mathfrak {L}}_3+{\tilde{\mu }}_4{\mathfrak {L}}_{4}-\digamma ^q\bigg ], \end{aligned}$$
(2.2)

where \(\digamma \) is the Yang–Mills invariant defined as

$$\begin{aligned} \digamma =\gamma _{ab}F^{(a)}_{\alpha \beta }F^{(b)\alpha \beta }. \end{aligned}$$
(2.3)

Also, \(\Lambda \) denotes the cosmological constant, R refers to the Ricci scalar and \({\tilde{\mu }}_2\), \({\tilde{\mu }}_3\) and \({\tilde{\mu }}_4\) are the coefficients of quasi-topological gravity. Furthermore, \({\mathfrak {L}}_2\), \({\mathfrak {L}}_3\) and \({\mathfrak {L}}_4\) denote the Lagrangians for Gauss–Bonnet, the cubic and quartic quasi-topological theories, respectively, and are expressed as [60]

$$\begin{aligned} {\mathfrak {L}}_2= & {} R_{\mu \nu \gamma \rho }R^{\mu \nu \gamma \rho }-4R_{\mu \nu }R^{\mu \nu }+R^2, \end{aligned}$$
(2.4)
$$\begin{aligned} {\mathfrak {L}}_3= & {} R^{\rho \sigma }_{\mu \nu }R^{\alpha \beta }_{\rho \sigma }R^{\mu \nu }_{\alpha \beta }\nonumber \\{} & {} +\frac{1}{8(2d-3)(d-4)}\big (u_1R_{\mu \nu \rho \sigma }R^{\mu \nu \rho \sigma }R\nonumber \\{} & {} +u_2R_{\mu \nu \rho \sigma }R^{\mu \nu \rho }_{\alpha }R^{\sigma \alpha }+u_3R_{\mu \nu \rho \sigma }R^{\mu \rho }R^{\nu \sigma }+u_4R^{\nu }_{\mu }R^{\rho }_{\nu }R^{\mu }_{\rho }\nonumber \\{} & {} +u_5R_{\mu }^{\nu }R_{\nu }^{\mu }R+u_6R^3\big ), \end{aligned}$$
(2.5)
$$\begin{aligned} {\mathfrak {L}}_4= & {} c_1R_{\mu \nu \rho \sigma }R^{\rho \sigma \alpha \beta }R^{\kappa \gamma }_{\alpha \beta }R_{\kappa \gamma }^{\mu \nu }+c_2R_{\mu \nu \rho \sigma }R^{\mu \nu \rho \sigma }R^{\alpha \beta }_{\alpha \beta }\nonumber \\{} & {} {+}c_3RR_{\mu \nu }R^{\mu \rho }R_{\rho }^{\nu }{+}c_4\big (R_{\mu \nu \rho \sigma }R^{\mu \nu \rho \sigma }\big )^2{+}c_5R_{\mu \nu }R^{\mu \rho }R_{\rho \sigma }R^{\sigma \nu }\nonumber \\ {}{} & {} \quad +c_6RR_{\mu \nu \rho \sigma }R^{\mu \rho }R^{\nu \sigma } +c_7R_{\mu \nu \rho \sigma }R^{\mu \rho }R^{\nu \alpha }R^{\sigma }_{\alpha }\nonumber \\{} & {} +c_8R_{\mu \nu \rho \sigma }R^{\mu \rho \alpha \beta }R^{\nu }_{\alpha }R^{\sigma }_{\beta }\nonumber \\{} & {} +c_9R_{\mu \nu \rho \sigma }R^{\mu \rho }R_{\alpha \beta }R^{\nu \alpha \sigma \beta } +c_{10}R^4+c_{11}R^2R_{\mu \nu \rho \sigma }R^{\mu \nu \rho \sigma }\nonumber \\{} & {} +c_{12}R^2R_{\alpha \beta }R^{\alpha \beta }+c_{13}R_{\mu \nu \rho \sigma }R^{\mu \nu \alpha \beta }R_{\alpha \beta \gamma }^{\nu }R^{\sigma \gamma }\nonumber \\{} & {} +c_{14}R_{\mu \nu \rho \sigma }R^{\mu \alpha \rho \beta }R_{\kappa \alpha \gamma \beta }R^{\kappa \nu \gamma \sigma }, \end{aligned}$$
(2.6)

where the coefficients \(u_i\)’s and \(c_i\)’s are given in the Appendix. The Yang–Mills gauge field can be defined as

$$\begin{aligned} F^{(a)}=dA^{(a)}+\frac{1}{2 {\overline{\eta }}}C^{(a)}_{(b)(c)}A^{(b)}\wedge A^{(c)}, \end{aligned}$$
(2.7)

where \({\overline{\eta }}\) is the coupling constant while \(A^{(a)}\) refers to Yang–Mills potential of the \(SO(d-1)\) gauge group. The structure constants have been computed in Ref. [82]. Additionally, if the conformal scalar field is non-minimally coupled with the extended Euler densities, and can be described through the fourth rank mixed tensor

$$\begin{aligned} S^{\gamma \delta }_{\alpha \beta }= & {} \phi ^2R^{\gamma \delta }_{\alpha \beta }-2\delta ^{[\gamma }_{[\alpha }\delta ^{\delta ]}_{\beta ]}\nabla _{\kappa }\phi \nabla ^{\kappa }\phi -4\phi \delta ^{[\gamma }_{[\alpha }\nabla _{\beta ]}\nabla ^{\delta ]}\phi \nonumber \\{} & {} +8\delta ^{[\gamma }_{[\alpha }\nabla _{\beta ]}\phi \nabla ^{\gamma ]}\phi , \end{aligned}$$
(2.8)

then the action (2.2) can be generalized as

$$\begin{aligned} \begin{aligned} {\mathcal {I}}_{bulk}&=\frac{1}{16\pi }\int d^{d}x\sqrt{-g}\bigg [R-2\Lambda +{\tilde{\mu }}_2{\mathfrak {L}}_2+{\tilde{\mu }}_3{\mathfrak {L}}_3\\&\quad +{\tilde{\mu }}_4{\mathfrak {L}}_{4}-\digamma ^q+16\pi \bigg (b_0\phi ^dS^{(0)}\\&\quad +b_1\phi ^{d-4}S^{(1)}+b_2\phi ^{d-8}S^{(2)}+{\tilde{b}}_3\phi ^{d-12}S^{(3)}_{qt}\\&\quad +{\tilde{b}}_4\phi ^{d-16}S^{(4)}_{qt}\bigg )\bigg ], \end{aligned} \end{aligned}$$
(2.9)

where

$$\begin{aligned} \begin{aligned}&S^{(0)}=1,\\&S^{(1)}=S=g^{\alpha \beta }S_{\alpha \beta }=g^{\alpha \beta }S^{\sigma }_{\alpha \sigma \beta },\\&S^{(2)}=S^2-4S_{\alpha \beta }S^{\alpha \beta }+S_{\alpha \beta \kappa \gamma }S^{\alpha \beta \kappa \gamma }, \end{aligned} \end{aligned}$$
(2.10)
$$\begin{aligned} S^{(3)}_{qt}= & {} S^{\rho \sigma }_{\mu \nu }S^{\alpha \beta }_{\rho \sigma }S^{\mu \nu }_{\alpha \beta }+\frac{1}{8(2d-3)(d-4)}\big (u_1S_{\mu \nu \rho \sigma }S^{\mu \nu \rho \sigma }S\nonumber \\{} & {} +u_2S_{\mu \nu \rho \sigma }S^{\mu \nu \rho }_{\alpha }S^{\sigma \alpha }\nonumber \\{} & {} +u_3S_{\mu \nu \rho \sigma }S^{\mu \rho }S^{\nu \sigma }+u_4S^{\nu }_{\mu }S^{\rho }_{\nu }S^{\mu }_{\rho }+u_5S_{\mu }^{\nu }S_{\nu }^{\mu }S+u_6S^3\big ),\nonumber \\ \end{aligned}$$
(2.11)
$$\begin{aligned} S^{(4)}_{qt}= & {} c_1S_{\mu \nu \rho \sigma }S^{\rho \sigma \alpha \beta }S^{\kappa \gamma }_{\alpha \beta }S_{\kappa \gamma }^{\mu \nu }+c_2S_{\mu \nu \rho \sigma }S^{\mu \nu \rho \sigma }S^{\alpha \beta }_{\alpha \beta }\nonumber \\{} & {} +c_3SS_{\mu \nu }S^{\mu \rho }S_{\rho }^{\nu }+c_4\big (S_{\mu \nu \rho \sigma }S^{\mu \nu \rho \sigma }\big )^2\nonumber \\{} & {} +c_5S_{\mu \nu }S^{\mu \rho }S_{\rho \sigma }S^{\sigma \nu } +c_6SS_{\mu \nu \rho \sigma }S^{\mu \rho }S^{\nu \sigma }\nonumber \\{} & {} +c_7S_{\mu \nu \rho \sigma }S^{\mu \rho }S^{\nu \alpha }S^{\sigma }_{\alpha }+c_8S_{\mu \nu \rho \sigma }S^{\mu \rho \alpha \beta }S^{\nu }_{\alpha }S^{\sigma }_{\beta }\nonumber \\{} & {} +c_9S_{\mu \nu \rho \sigma }S^{\mu \rho }S_{\alpha \beta }S^{\nu \alpha \sigma \beta }+c_{10}S^4+c_{11}S^2S_{\mu \nu \rho \sigma }S^{\mu \nu \rho \sigma }\nonumber \\{} & {} +c_{12}S^2S_{\alpha \beta }S^{\alpha \beta } +c_{13}S_{\mu \nu \rho \sigma }S^{\mu \nu \alpha \beta }S_{\alpha \beta \gamma }^{\nu }S^{\sigma \gamma }\nonumber \\{} & {} +c_{14}S_{\mu \nu \rho \sigma }S^{\mu \alpha \rho \beta }S_{\kappa \alpha \gamma \beta }S^{\kappa \nu \gamma \sigma }. \end{aligned}$$
(2.12)

It is to be noted that the above tensor \(S^{\gamma \delta }_{\alpha \beta }\) possesses the same symmetries as the Riemann tensor. We take the metric ansatz in d-dimensional spacetime as

$$\begin{aligned} ds^2=-f(r)dt^2+\frac{dr^2}{f(r)}+r^2d\Omega ^2_k, \end{aligned}$$
(2.13)

where

$$\begin{aligned} \begin{aligned} d\Omega ^2_k=\left\{ \begin{array}{lll} d\theta _1^2 +\sum _{j=2}^{d-2}\prod _{l=1}^{j-1} \sin ^2\theta _l d\theta _j^2, &{} &{} k=1, \\ d\theta _1^2+\sinh ^2\theta _1d\theta _2^2+\sinh ^2\theta _1\\ \sum _{j=3}^{d-2}\prod _{l=2}^{j-1}\sin ^2\theta _ld\theta ^2_j, &{} &{} k=-1,\\ \sum _{j=1}^{d-2}d\phi _j^2, &{} &{} k=0, \end{array}\right. \end{aligned} \end{aligned}$$
(2.14)

stands for the metric of a \((d-2)\)-dimensional hyper-surface of constant curvature \((d-2)(d-3)k\) and volume \({\mathcal {V}}_{d-2}\). Now, using the line element (2.13) and the Lagrangian density of power-Yang–Mills model i.e. \({\mathfrak {L}}_{pYM}=-\digamma ^q\), it is possible to write the energy-momentum tensor associated with power-Yang–Mills field as

$$\begin{aligned} T^{(a)\nu }_{\mu }{=}{-}\frac{1}{2}\bigg [\delta ^{\nu }_{\mu }\digamma ^q{-}4q \sum _{a{=}1}^{(d{-}2)(d{-}1)/2}\bigg (F^{(a)}_{\mu \lambda }F^{(a)\nu \lambda }\bigg )\digamma ^{q{-}1}\bigg ].\nonumber \\ \end{aligned}$$
(2.15)

The variation of action (2.2) with respect to the gauge potentials \(A^{(a)}\) yields

$$\begin{aligned} d(^{\star }F^{(a)}\digamma ^{q-1})+\frac{1}{\eta }C^{(a)}_{(b)(c)}\digamma ^{q-1}A^{(b)}\wedge ^{\star }F^{(c)}=0, \end{aligned}$$
(2.16)

where \(\star \) denotes the duality. Now, using the line element (2.13) and the Wu-Yang ansatz introduced in Refs. [59,60,61,62], the power-Yang–Mills field equations [83, 84] will be satisfied provided the gauge potential one-forms are expressed as

$$\begin{aligned} A^{(a)}=\frac{Q}{r^2}C^{(a)}_{(l)(j)}x^{l}dx^{j}, r^2=\sum _{l=1}^{d-1}x_{l}^2. \end{aligned}$$
(2.17)

The parameter Q is proportional to the Yang–Mills magnetic charge while \(2\le j+1\le l\le d-1\). For simplicity it is convenient to use \(d_i=d-i\) and redefine the quasi-topological coefficients as

$$\begin{aligned} \begin{aligned}&\mu _2=d_3d_4{\tilde{\mu }}_2,\\&\mu _3=\frac{d_3d_6(3d_1^2-9d_1+4)}{8(2d-3)}{\tilde{\mu }}_3,\\&\mu _4=d_1d_2d_4d_8d_3^2(d_1^4-15d_1^4+17d_1^3\\&\qquad \quad -156d_1^2+150d_1-42){\tilde{\mu }}_4. \end{aligned} \end{aligned}$$
(2.18)

Similarly, if we vary the action (2.9) with respect to the scalar field, the scalar field equation can be obtained as

$$\begin{aligned}&b_0d\phi ^{d_1}+b_1d_2\phi ^{d_5}S^{(1)}+d_4b_2\phi ^{d_9}S^{(2)}\nonumber \\&\quad +\frac{d_3d_6^2(3d^2-15d+16)}{8(2d-3)}{\tilde{b}}_3\phi ^{d_{13}}S^{(3)}_{qt}\nonumber \\&\quad {+}\big (d_1d_2d_4d_8^2d_3^2(d_1^5{-}15d_1^4{+}72d_1^3{-}156d_1^2{+}150d_1{-}42)\big )\nonumber \\&{\tilde{b}}_4\phi ^{d_{17}}S^{(4)}_{qt}=0. \end{aligned}$$
(2.19)

We consider the scalar field as

$$\begin{aligned} \phi =\frac{N}{r}, \end{aligned}$$
(2.20)

then Eq. (2.19) would be satisfied if the following equations hold

$$\begin{aligned}{} & {} b_0dd_1N^8+b_1d_1d_2(dd_1+4)kN^6+b_2d_1d_2d_3d_4\nonumber \\{} & {} \quad (dd_1+16)k^2N^4+\frac{{\tilde{b}}_3d_1d_2d_3d_6(dd_1+36)(3dd_5+16)k^3N^2}{8(2d-3)}\nonumber \\{} & {} \quad +{\tilde{b}}_4k^4d_1^2d_2^2d_3^2d_4d_8\nonumber \\{} & {} \quad \times (dd_1+64)(d_1^5-15d_1^4+72d_1^3-156d_1^2\nonumber \\{} & {} \quad +150d_1-42)=0, \end{aligned}$$
(2.21)
$$\begin{aligned}{} & {} b_1d_1d_2N^6+2b_2d_1d_2d_3d_4kN^4+\frac{3{\tilde{b}}_3d_1d_2d_3d_6k^2N^2}{8(2d-3)(3dd_5+16)^{-1}}\nonumber \\{} & {} \quad +4{\tilde{b}}_4k^3d_1^2d_2^2d_3d_4d_8(d_1^5-15d_1^4+72d_1^3-156d_1^2\nonumber \\{} & {} \quad +150d_1-42)=0. \end{aligned}$$
(2.22)

The equations of motion describing gravitational field can be obtained if we vary the action (2.2) with respect to the metric tensor \(g_{\mu \nu }\). Thus, using Eqs. (2.16)–(2.18), (2.20)–(2.22) in (2.2) one can get the following fourth-order equation

$$\begin{aligned} \mu _4\Phi ^4+\mu _3\Phi ^3+\mu _2\Phi ^2+\Phi +\Upsilon =0, \end{aligned}$$
(2.23)

where \(\Phi =(k-f(r))/r^2\) and

$$\begin{aligned} \begin{aligned} \Upsilon =\left\{ \begin{array}{lll} -\frac{2\Lambda }{d_1d_2}-\frac{m}{r^{d_1}}-\frac{16\pi H}{d_2r^d}-\frac{d_3^qd_2^{q-1}Q^{2q}}{(d_1-4q)r^{4q}}, &{} &{} q\ne \frac{d_1}{4} \\ {}-\frac{2\Lambda }{d_1d_2}-\frac{16\pi H}{d_2r^d}-\frac{m}{r^{d_1}}-\frac{Q^{d_1/2}d_3}{r^{d_1}}\ln {r}, &{} &{} q=\frac{d_1}{4}. \end{array}\right. \end{aligned}\nonumber \\ \end{aligned}$$
(2.24)

The constant of integration m in the above equation is related to mass of the gravitating object with power-Yang–Mills magnetic charge, while the parameter H is defined through

$$\begin{aligned} \begin{aligned} H&=b_0N^d+d_2d_3b_1kN^{d_2}+d_2d_3d_4d_5b_2k^2N^{d_4}\\&\quad +\frac{d_2d_3d_6d_7(3dd_5+16){\tilde{b}}_3k^3N^{d_6}}{8(2d-3)}\\&\quad +d_1d_2^2d_3^2d_4d_8d_9(d_1^5-15d_1^4+72d_1^3-156d_1^2+150d_1\\&\quad -42){\tilde{b}}_4k^4N^{d_8}. \end{aligned} \end{aligned}$$
(2.25)

The power-Yang–Mills quasi-topological solution can be explicitly expressed from the polynomial equation (2.23) as

$$\begin{aligned} \begin{aligned} f(r)=k-r^2\times \left\{ \begin{array}{lll} {}-\frac{\mu _3}{4\mu _4}-\frac{1}{2}\big (H_1-\sqrt{\frac{2A_2}{H_1}-2{\overline{y}}-3A_1}\big ), &{} &{} \\ \mu _4>0\\ {}-\frac{\mu _3}{4\mu _4}+\frac{1}{2}\big (H_1-\sqrt{-\frac{2A_2}{H_1}-2{\overline{y}}-3A_1}\big ), &{} &{}\\ \mu _4<0, \end{array}\right. \end{aligned} \end{aligned}$$
(2.26)

where

$$\begin{aligned} \begin{aligned}&H_1=\big (A_1+2{\overline{y}}\big )^{\frac{1}{2}}, \\ {}&A_1=\frac{\mu _2}{4}-\frac{3\mu _3^2}{8\mu _4^2},\\&H_2=-\frac{A_1^3}{108}+\frac{A_1{\mathcal {Z}}}{3}-\frac{A_2^2}{8},\\&A_2=\frac{\mu _3^3}{8\mu _4^3}-\frac{\mu _3\mu _2}{2\mu _4^2}+\frac{1}{\mu _4},\\&{\mathcal {Z}}=-\frac{3\mu _3^4}{256\mu _4^4}+\frac{\mu _2\mu _3^2}{16\mu _4^3}-\frac{\mu _3}{4\mu _4^2}+\frac{\Upsilon }{\mu _4},\\&{\mathcal {W}}=\bigg (-\frac{H_2}{2}\pm \sqrt{\frac{H_2^2}{4}+\frac{{\overline{P}}^3}{27}}\bigg )^{\frac{1}{3}},\\&{\overline{P}}=-\frac{A_1^2}{12}-{\mathcal {Z}}, \end{aligned} \end{aligned}$$
(2.27)

and

$$\begin{aligned} \begin{aligned} {\overline{y}}=\left\{ \begin{array}{lll} {}-\frac{5}{6}A_1+{\mathcal {W}}-\frac{{\overline{P}}}{3{\mathcal {W}}}, &{} &{} W\ne 0 \\ {}-\frac{5}{6}A_1+{\mathcal {W}}-H_2^{\frac{1}{3}}, &{} &{} {\mathcal {W}}=0. \end{array}\right. \end{aligned} \end{aligned}$$
(2.28)

It can be easily understood from (2.26) that the metric function describes solutions of the gravitational field equations of two types for \(\mu _4>0\) and \(\mu _4<0\). It should be noted that the parameter \(\Upsilon \) obtained in (2.24) becomes highly negative for small values of the coordinate r. This makes the fourth term in parameter \({\mathcal {Z}}\) as well as the parameter \({\overline{P}}\) of (2.27), very large. In case \(\mu _4<0\), this gives negatively large value for \({\overline{P}}\) which yields an imaginary solution for \({\mathcal {W}}\) for small values of r. Hence, we would not consider \(\mu _4<0\). In order to get the metric function (2.26) in simpler form, we assume the special case \({\overline{\mu }}_2={\overline{\mu }}_3=0\). Thus, the power-Yang–Mills quasi-topological solution for \(\mu _4\ne 0\) becomes

$$\begin{aligned} f(r)= & {} k-\frac{r^2}{2}\bigg [\mp \sqrt{2\Delta ^{\frac{1}{3}}+\frac{2\Upsilon }{3\mu _4\Delta ^{\frac{1}{3}}}}\nonumber \\{} & {} \pm \sqrt{-2\Delta ^{\frac{1}{3}}\pm \frac{2}{\mu _4}\bigg (2\Delta ^{\frac{1}{3}}+\frac{2\Upsilon }{3\mu _4\Delta ^{\frac{1}{3}}}\bigg )^{-\frac{1}{2}}-\frac{2\Upsilon }{3\mu _4\Delta ^{\frac{1}{3}}}}\bigg ],\nonumber \\ \end{aligned}$$
(2.29)

where

$$\begin{aligned} \Delta =\frac{1}{16\mu _4^2}+\sqrt{\frac{1}{256\mu _4^4}-\frac{\Upsilon ^3}{27\mu _4^3}}. \end{aligned}$$
(2.30)

It should be noted that the upper sign in Eq. (2.29) corresponds to the case \(\mu _4>0\) while the lower sign is for \(\mu _4<0\). In the limit \(\mu _4\rightarrow 0\), we can write the series expansion of metric function (2.29) as

$$\begin{aligned} f(r)=k+\Upsilon r^2+\mu _4\Upsilon ^4r^2+4\mu _4^2\Upsilon ^7r^2+O((\mu _4)^{8/3}),\nonumber \\ \end{aligned}$$
(2.31)

where \(\Upsilon \) is given in Eq. (2.24). The above expansion implies the Einstein-power-Yang–Mills solutions with some corrections in \(\mu _4\). The Ricci and Kretschmann invariants for the metric ansatz (2.13) respectively take the forms

$$\begin{aligned} \begin{aligned} R&=\bigg [d_2d_3\bigg (\frac{k-f(r)}{r^2}\bigg )-f''(r)-\frac{2d_2}{r}f'(r)\bigg ], \end{aligned} \end{aligned}$$
(2.32)

and

$$\begin{aligned} \begin{aligned} K&{=}\bigg [2d_2d_3\bigg (\frac{k-f(r)}{r^2}\bigg )^2{-}\big (f''(r)\big )^2{+}\frac{2d_2}{r^2}\big (f'(r)\big )^2\bigg ]. \end{aligned}\nonumber \\ \end{aligned}$$
(2.33)

The primes denote derivatives with respect to the coordinate r. So, by using the metric function obtained for the case \(\mu _4>0\), it can easily be shown that both the scalars diverge at the center \(r=0\). Hence, there is a true curvature singularity at \(r=0\) for our power-Yang–Mills solutions. The horizons of the black hole can be described from the condition \(f(r_+)=0\). Figure 1 shows the plot of the metric function for different values of the mass parameter m. The values of r for which the curve touches the horizontal axis correspond to the horizon’s location. One can see that the black hole with higher mass has smaller event horizon’s radius, however, when the mass parameter attains lower values the event horizon’s radius increases. Figure 2 describes the behaviour of solution (2.26) for various values of \(\mu _4\). It can be observed that for the fixed values of parameters d, m, \(\Lambda \), k, Q, and q, the values of horizons are affected by the parameter \(\mu _4\). However, at infinity the behaviour of the metric function does not depend on parameter \(\mu _4\). Furthermore, the dependence of the solution on the Yang–Mills charge Q is presented in Fig. 3. It is easily seen that the increase in Q shifts the location of the event horizon towards the right. Similarly, the behaviour of the resulting metric function for different values of the parameter q is demonstrated in Fig. 4. Furthermore, the effects of the conformal coupling constants on solution (2.26) can be analyzed from Fig. 5. One can conclude that by increasing the values of \(b_1\), \(b_2\), \({\tilde{b}}_3\) and \({\tilde{b}}_4\), the event horizon’s radius decreases. It is also worthwhile to note that, for \(q=1\), the solution (2.26) reduces to the metric function of Yang–Mills quasi-topological black hole with conformal hair. Additionally, the power-Yang–Mills black hole solution without scalar hair can be obtained if one puts \(H=0\) in Eq. (2.26).

Fig. 1
figure 1

Dependence of function f(r) (Eq. (2.26)) on the mass for fixed values of \(d=5\), \(Q=2\), \(q=2\), \(k=1\), \(\mu _2=-0.09\), \(\mu _3=-0.006\), \(\mu _4=0.0004\), \(b_0=1\), \(b_1=1\), \(b_2=1\), \({\tilde{b}}_3=1\), \({\tilde{b}}_4=1\), \(N=1\), and \(\Lambda =-1\)

Fig. 2
figure 2

Plot of function f(r) (Eq. (2.26)) versus the parameter \(\mu _4\) for fixed values \(d=7\), \(m=1.5\), \(Q=2\), \(q=2\), \(k=1\), \(\mu _2=-0.09\), \(\mu _3=-0.006\), \(b_0=1\), \(b_1=1\), \(b_2=1\), \({\tilde{b}}_3=1\), \({\tilde{b}}_4=1\), \(N=1\), and \(\Lambda =-1\)

Fig. 3
figure 3

Dependence of function f(r) (Eq. (2.26)) on the Yang–Mills charge Q for fixed values of \(d=7\), \(m=1.5\), \(q=2\), \(k=1\), \(\mu _2=-0.09\), \(\mu _3=-0.006\), \(\mu _4=0.03\), \(b_0=1\), \(b_1=1\), \(b_2=1\), \({\tilde{b}}_3=1\), \({\tilde{b}}_4=1\), \(N=1\), and \(\Lambda =-1\)

Fig. 4
figure 4

Dependence of function f(r) (Eq. (2.26)) on the nonlinearity parameter q for fixed values of \(d=7\), \(m=1.5\), \(Q=1\), \(k=1\), \(\mu _2=-0.09\), \(\mu _3=-0.006\), \(\mu _4=0.03\),\(\mu _4=0.03\), \(b_0=1\), \(b_1=1\), \(b_2=1\), \({\tilde{b}}_3=1\), \({\tilde{b}}_4=1\), \(N=1\), and \(\Lambda =-1\)

Fig. 5
figure 5

Dependence of function f(r) (Eq. (2.26)) on the Yang–Mills charge Q for fixed values of \(d=11\), \(q=3\), \(Q=10\), \(m=7.5\), \(k=1\), \(\mu _2=-0.09\), \(\mu _3=-0.006\), \(\mu _4=0.03\), \(N=1\), and \(\Lambda =-1\)

3 Thermodynamics of quartic quasi-topological power-Yang–Mills black holes

Now, we study the thermodynamic properties of the black holes described by Eqs. (2.23)–(2.28). We can compute the Arnowitt Deser Misner mass density with the help of subtraction method [85] as follows

$$\begin{aligned} M=\frac{d_2}{16\pi }m, \end{aligned}$$
(3.1)

where the parameter m is given in Eq. (2.24). Hence, we can write the value of M in terms of the outer horizon radius as

$$\begin{aligned} \begin{aligned} M&=\left\{ \begin{array}{lll} \frac{d_2}{16\pi }\bigg (\mu _4 k^4r_+^{d_9}+\mu _3k^3r_+^{d_7}+\mu _2k^2r_+^{d_5}+kr_+^{d_3}-\frac{2\Lambda r_+^{d_1}}{d_1d_2}-\frac{16\pi H}{d_2r_+}-\frac{d_2^{q-1}d_3^qQ^{2q}r_+^{d_1-4q}}{(d_1-4q)}\bigg ), &{} &{} q\ne \frac{d_1}{4}, \\ \frac{d_2}{16\pi }\bigg (\mu _4 k^4r_+^{d_9}+\mu _3k^3r_+^{d_7}+\mu _2k^2r_+^{d_5}+kr_+^{d_3}-\frac{2\Lambda r_+^{d_1}}{d_1d_2}-\frac{16\pi H}{d_2r_+}-Q^{d_1/2}d_3\ln {r_+}\bigg ), &{} &{} q=\frac{d_1}{4}. \end{array}\right. \end{aligned}\qquad \qquad \qquad \qquad \quad \, \end{aligned}$$
(3.2)

The Yang–Mills charge corresponding to the black hole (2.26) can be computed through the Gauss law as

$$\begin{aligned} {\tilde{Q}}=\frac{1}{4\pi \sqrt{d_2d_3}}\int d^{d-2}r\sqrt{\sum _{a=1}^{d_2d_1/2}\bigg (F^{(a)}_{\mu \lambda }F^{(a)\nu \lambda }\bigg )}=\frac{Q}{4\pi }.\nonumber \\ \end{aligned}$$
(3.3)

Using the condition \(f(r_+)=0\) and differentiating the polynomial equation (2.23) yields the Hawking temperature as

$$\begin{aligned} \begin{aligned} T_{H}(r_+)&=\frac{r_+^9{\mathcal {W}}_1(r_+)-2k\Delta _1(r_+)}{4\pi r_+\Delta _1(r_+)}, \end{aligned} \end{aligned}$$
(3.4)

where

$$\begin{aligned} \Delta _1(r_+)= & {} r_+^6+2\mu _2kr_+^4+3\mu _3k^2r_+^2+4\mu _4k^3, \end{aligned}$$
(3.5)
$$\begin{aligned} {\mathcal {W}}_1(r_+)= & {} \frac{\mu _4k^4d_1}{r_+^9}+\frac{\mu _3k^3d_1}{r_+^7}+\frac{\mu _2k^2d_1}{r_+^5}+\frac{kd_1}{r_+^3}-\frac{2\Lambda }{d_2r_+}\nonumber \\{} & {} -\frac{16\pi H}{d_2r_+^{d+1}}-{\mathcal {Y}}(r_+), \end{aligned}$$
(3.6)

and

$$\begin{aligned} \begin{aligned} {\mathcal {Y}}(r_+)&=\left\{ \begin{array}{lll} \frac{d_2^{q-1}d_3^qQ^{2q}}{r_+^{4q+1}}, &{} &{} q\ne \frac{d_1}{4}, \\ \frac{Q^{d_1/2}d_3}{r_+^d}, &{} &{} q=\frac{d_1}{4}. \end{array}\right. \end{aligned} \end{aligned}$$
(3.7)

Following Ref. [86], we compute the entropy density as

$$\begin{aligned} \begin{aligned} {\mathcal {S}}&=\frac{r_+^{d_2}}{4}+\frac{d_2k\mu _2r_+^{d_4}}{2d_4}+\frac{3d_2k^2\mu _3r_+^{d_6}}{4d_6}+\frac{d_2k^3\mu _4r_+^{d_8}}{d_8}+\frac{b_1}{4}N^{d_2}\\&\quad +\frac{kb_2d_3d_2N^{d_4}}{2}+\frac{3d_2d_3(3dd_5+16)k^2{\tilde{b}}_3N^{d_6}}{32(2d-3)}+d_1d_2^2d_3^2d_4\\&\quad \times (d_1^5-15d_1^4+72d_1^3-156d_1^2+150d_1-42){\tilde{b}}_4k^3N^{d_8}. \end{aligned}\nonumber \\ \end{aligned}$$
(3.8)

Consideration of mass M as a function of entropy \({\mathcal {S}}\) and charge \({\tilde{Q}}\) enables us to construct the first law as

$$\begin{aligned} dM=T_Hd{\mathcal {S}}+{\mathcal {U}}d{\tilde{Q}}, \end{aligned}$$
(3.9)

where \(T_H=\bigg (\frac{\partial M}{\partial {\mathcal {S}}}\bigg )_{{\tilde{Q}}}\) and \({\mathcal {U}}=\bigg (\frac{\partial M}{\partial {\tilde{Q}}}\bigg )_{{\mathcal {S}}}\). The calculations show that the same form of temperature i.e. (3.4) can be obtained from this relation. Moreover, the potential associated with power-Yang–Mills field can be found as follows:

$$\begin{aligned} \begin{aligned} {\mathcal {U}}&{=}\bigg (\frac{\partial M}{\partial {\tilde{Q}}}\bigg )_{{\mathcal {S}}}{=}\left\{ \begin{array}{rcl} {}{-}\frac{qd_2^qd_3^q(4\pi {\tilde{Q}})^{2q-1}}{8\pi (d_1-4q)}r_{+}^{d_1-4q}, &{} &{} q\ne \frac{d_1}{4}, \\ {}{-}\frac{d_1d_2d_3(4\pi {\tilde{Q}})^{d_3/2}}{32\pi }\ln {r_+}, &{} &{} q{=}\frac{d_1}{4}, \end{array}\right. \end{aligned} \end{aligned}$$
(3.10)

The charge \({\tilde{Q}}\) should be fixed in the canonical ensemble and the thermodynamic stability can be examined by assuming small variations of the entropy. Hence, thermodynamic stability would be guaranteed if the specific heat is positive. The specific heat capacity at a constant Yang–Mills charge \({\tilde{Q}}\) can be computed from \(C_H=T_H(\frac{\partial {\mathcal {S}}}{\partial T_H})_{{\tilde{Q}}}\). So, from Eqs. (3.4)–(3.8), we can calculate the heat capacity in the form

$$\begin{aligned}{} & {} C_H=\nonumber \\{} & {} \frac{\Delta _1(r_+)\Delta _3(r_+)\big (r_+^{10}{\mathcal {W}}_1(r_+)-2kr_+\Delta _1(r_+)\big )}{4\big (2k\Delta _1^2(r_+)+r_+^{10}\Delta _1(r_+){\mathcal {W}}_1'(r_+)+\Delta _2(r_+){\mathcal {W}}_1(r_+)\big )}, \nonumber \\ \end{aligned}$$
(3.11)

where

$$\begin{aligned} {\mathcal {W}}_1'(r_+)= & {} -\frac{9\mu _4k^4d_1}{r_+^{10}}-\frac{7\mu _3k^3d_1}{r_+^{8}}-\frac{5k^2d_1\mu _2}{r_+^6}-\frac{3kd_1}{r_+^4}\nonumber \\{} & {} +\frac{2\Lambda }{d_1r_+^2}+\frac{16\pi H(d+1)}{d_2r_+^{d+2}}+{\mathcal {Y}}_1(r_+), \end{aligned}$$
(3.12)
$$\begin{aligned} {\mathcal {Y}}_1(r_+)= & {} \left\{ \begin{array}{rcl} &{}&{}\frac{(4q+1)d_2^{q-1}d_3^q(4\pi {\tilde{Q}})^{2q}}{r_+^{4q+2}}, q\ne \frac{d_1}{4},\\ &{}&{}\frac{dd_3(4\pi {\tilde{Q}})^{d_1/2}}{r_+^{d+1}}, q=\frac{d_1}{4}, \end{array}\right. \end{aligned}$$
(3.13)
$$\begin{aligned} \Delta _2(r_+)= & {} 2r_+^{15}+8\mu _2kr_+^{13}+18\mu _3k^2r_+^{11}+32\mu _4k^3r_+^9,\nonumber \\ \end{aligned}$$
(3.14)

and

$$\begin{aligned} \begin{aligned} \Delta _3(r_+)&=d_2r_+^{d_3}+2d_2k\mu _2r_+^{d_5}+3d_2k^2\mu _3r_+^{d_7}\\&\quad +4d_2k^3\mu _4r_+^{d_9}. \end{aligned} \end{aligned}$$
(3.15)
Fig. 6
figure 6

Dependence of heat capacity \(C_H\) (Eq. (3.11)) on the Yang–Mills charge \({\tilde{Q}}=Q/4\pi \) for fixed values of \(d=9\), \(q=5\), \(k=1\), \(\mu _2=-0.9\), \(\mu _3=-0.6\), \(\mu _4=0.005\), \(b_0=1\), \(b_1=1\), \(b_2=1\), \({\tilde{b}}_3=1\), \({\tilde{b}}_4=1\), \(N=1\), and \(\Lambda =-1\)

Fig. 7
figure 7

Dependence of heat capacity \(C_H\) (Eq. (3.11)) on the parameter q for fixed values of \(d=7\), \(Q=1\), \(k=1\), \(\mu _2=-0.9\), \(\mu _3=-0.6\), \(\mu _4=0.05\), \(b_0=1\), \(b_1=1\), \(b_2=1\), \({\tilde{b}}_3=1\), \({\tilde{b}}_4=1\), \(N=1\), and \(\Lambda =-1\)

Fig. 8
figure 8

Dependence of heat capacity \(C_H\) (Eq. (3.11)) on the parameter \(\mu _4\) for fixed values of \(d=9\), \(q=5\), \(k=1\), \(Q=1\), \(\mu _2=-0.9\), \(\mu _3=-0.6\), \(b_0=1\), \(b_1=1\), \(b_2=1\), \({\tilde{b}}_3=1\), \({\tilde{b}}_4=1\), \(N=1\), and \(\Lambda =-1\)

Fig. 9
figure 9

Dependence of heat capacity \(C_H\) (Eq. (3.11)) on the conformal coupling parameters for fixed values of \(d=9\), \(q=5\), \(k=1\), \(\mu _2=-0.9\), \(\mu _3=-0.6\), \(\mu _4=0.5\), \(N=1\), and \(\Lambda =1\)

The behaviour of heat capacity depending on outer horizon \(r_+\) for various values of charge \({\tilde{Q}}=Q/4\pi \) is given in Fig. 6. The region where this quantity is positive implies black hole stability in this ensemble. It is also worthwhile to note that the points at which this quantity vanishes indicate the possibility of first order phase transitions. However, those values for which it is infinite correspond to the possibility of second order phase transitions. It can be observed that as charge Q increases, the outer horizon radius corresponding to the infinite heat capacity is changing its location. Additionally, Fig. 7 shows the corresponding plot for different values of parameter q. The case \(q=1\) corresponds to the heat capacity of Yang–Mills hairy black hole in this gravity theory. It is concluded that the heat capacity has three singular points \(r_{1,2,3}\) such that \(r_1<r_2<r_3\) for any value of the parameter q. It is observed that the hairy black hole whose outer horizon \(r_+\) belongs to the region \((0,r_1)\cup (r_1,r_2)\) is locally stable. On the other hand, there exist two zeros \(r_{c,d}\) of \(C_H\) in the interval \((r_2,r_3)\) such that the black hole is unstable in the subinterval \((r_2,r_c)\cup (r_c,r_d)\), and stable in \((r_d,r_3)\). It can also be observed that the increase in q shifts the locations of these singular points to the right. The graph of heat capacity for multiple values of \(\mu _4\) is presented in Fig. 8. It provides a clear view of the local stability and instability zones. Furthermore, Fig. 9 illustrates the consequences of the conformal coupling constants on the local stability of hairy black holes. When it comes to the grand canonical ensemble, both the charge Q and entropy \({\mathcal {S}}\) should be treated as variables. In addition to specific heat and Hawking temperature, the local thermodynamic stability can be guaranteed from the positivity of \(\partial ^2M/\partial {\tilde{Q}}^2\) and the determinant of the Hessian matrix [87, 88]. The determinant of the Hessian matrix is given by

$$\begin{aligned} \begin{aligned} det{\textbf {H}}&=\bigg (\frac{\partial ^2M}{\partial {\mathcal {S}}^2}\bigg )\bigg (\frac{\partial ^2M}{\partial {\tilde{Q}}^2}\bigg )-\bigg (\frac{\partial ^2M}{\partial {\mathcal {S}}\partial {\tilde{Q}}}\bigg )^2. \end{aligned} \end{aligned}$$
(3.16)

If we compute \(\bigg (\frac{\partial ^2M}{\partial {\tilde{Q}}^2}\bigg )\) for our resulting solution, we have

$$\begin{aligned} \begin{aligned} \bigg (\frac{\partial ^2M}{\partial {\tilde{Q}}^2}\bigg )&=\left\{ \begin{array}{rcl} {}-\frac{q(2q-1)d_2^qd_3^q(4\pi )^{2q} ({\tilde{Q}})^{2q-2}}{8\pi (d_1-4q)}r_+^{d_1-4q}, \\ q\ne \frac{d_1}{4}, \\ {}-\frac{d_1d_2d_3^2(4\pi )^{d_3/2}({\tilde{Q}})^{d_5/2}}{64\pi }\ln {r_+}, \\ q=\frac{d_1}{4}. \end{array}\right. \end{aligned}\nonumber \\ \end{aligned}$$
(3.17)

This equation shows that the parameter \(\bigg (\frac{\partial ^2M}{\partial {\tilde{Q}}^2}\bigg )\) is negative for \(d_1> 4q\) when \(2q\ge 1\) and so the black hole would be unstable in this ensemble. However, for the spacetime dimensions satisfying \(d_1<4q\) it is positive and so thermal stability will be determined from the behaviour of the Hessian matrix. It should be noted that, when the spacetime dimensions satisfy \(q=d_1/4\), then the black hole is unstable in grand canonical ensemble. Furthermore, the case \(q=1\) in Eq. (3.17) also corresponds to the instability of Yang–Mills quasi-topological black hole [60]. Thus for \(q>d_1/4\), one can compute the Hessian matrix determinant as

$$\begin{aligned} \begin{aligned} det{\textbf {H}}=\frac{q(2q-1)\big (2k\Delta _1^2(r_+)+r_+^{10}\Delta _1(r_+){\mathcal {W}}_1'(r_+)+{\mathcal {W}}_1(r_+)\Delta _2(r_+)\big )d_2^qd_3^q(4\pi )^{2q}{\tilde{Q}}^{2q-2}}{8\pi ^2r_+^{4q-d_3}(4q-d_1)\Delta _1^2(r_+)\Delta _3(r_+)}-\frac{4d_2^{2q-2}d_3^{2q}q^2(4\pi {\tilde{Q}})^{4q-2}}{r_+^{8q-14}\Delta _1^2(r_+)}. \end{aligned}\nonumber \\ \end{aligned}$$
(3.18)
Fig. 10
figure 10

Plot of \(det{\textbf {H}}\) (Eq. (3.18)) for different values of the Yang–Mills charge \({\tilde{Q}}=Q/4\pi \) and fixed values of \(d=9\), \(q=5\), \(k=1\), \(\mu _2=-0.9\), \(\mu _3=-0.6\), \(\mu _4=0.5\), \(b_0=3\), \(b_1=0.9\), \(b_2=2\), \({\tilde{b}}_3=0.1\), \({\tilde{b}}_4=1\), and \(\Lambda =-1\)

Figures 10, 11, 12 and 13 describe the plots of \(det{\textbf {H}}\) in terms of the outer horizon when \(q>d_1/4\). These plots indicate that the power-Yang–Mills black holes of smaller outer horizons can be thermodynamically stable in the grand canonical ensemble because the associated determinant of the Hessian matrix could be positive when \(q>d_1/4\). However, as \(r_+\) increases this quantity is negative and so we have instability of black holes. Furthermore, Fig. 13 shows that the scalar field has also a significant impact on the stability of smaller objects.

Fig. 11
figure 11

Dependence of \(det{\textbf {H}}\) (Eq. (3.18)) on the parameter q for fixed values of \(d=9\), \(Q=0.3\), \(k=1\), \(\mu _2=-0.9\), \(\mu _3=-0.6\), \(\mu _4=0.5\), \(b_0=3\), \(b_1=0.9\), \(b_2=2\), \({\tilde{b}}_3=0.1\), \({\tilde{b}}_4=1\), and \(\Lambda =-1\)

4 Pure quasi-topological black holes with power-Yang–Mills source

Now, we want to determine a new class of hairy black hole solutions in pure quasi-topological gravity. In order to do this, we set \(R={\mathfrak {L}}_2={\mathfrak {L}}_3=0\), so that the action becomes

$$\begin{aligned} {\mathcal {I}}_{bulk}= & {} \frac{1}{16\pi }\int d^{d}x\sqrt{-g}\bigg [-2\Lambda +{\tilde{\mu }}_4{\mathfrak {L}}_{4}-\digamma ^q\nonumber \\{} & {} +16\pi \bigg (b_0\phi ^dS^{(0)} +b_1\phi ^{d-4}S^{(1)}+b_2\phi ^{d-8}S^{(2)}\nonumber \\{} & {} +{\tilde{b}}_3\phi ^{d-12}S^{(3)}_{qt}+{\tilde{b}}_4\phi ^{d-16}S^{(4)}_{qt}\bigg )\bigg ], \end{aligned}$$
(4.1)

while, the field equation (2.23) reduces to

$$\begin{aligned} \mu _4\Phi ^4+\Upsilon =0, \end{aligned}$$
(4.2)

where \(\Phi =(k-f(r))/r^2\) and \(\Upsilon \) was defined in (2.24). Hence, the solution in this case can be obtained as

$$\begin{aligned} \begin{aligned} f(r)&=\left\{ \begin{array}{lll} k\mp \frac{r^{\frac{3}{2}}}{\mu _4}\big [\mu _4^3\big (\frac{2\Lambda r^2}{d_1d_2}+\frac{m}{r^{d_3}}+\frac{16\pi H}{d_2r^{d_2}}+\frac{d_3^qd_2^{q-1}Q^{2q}}{(d_1-4q)r^{4q-2}}\big )\big ]^{\frac{1}{4}}, &{} &{}\\ \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad q\ne \frac{d_1}{4}, \\ k\mp \frac{r^{\frac{3}{2}}}{\mu _4}\big [\mu _4^3\big (\frac{2\Lambda r^2}{d_1d_2}+\frac{m}{r^{d_3}}+\frac{16\pi H}{d_2r^{d_2}}+\frac{Q^{d_1/2}d_3\ln {r}}{r^{d-3}}\big )\big ]^{\frac{1}{4}}, &{} &{}\\ \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad q=\frac{d_1}{4}. \end{array}\right. \end{aligned} \end{aligned}$$
(4.3)
Fig. 12
figure 12

Plot of \(det{\textbf {H}}\) (Eq. (3.18)) for various values of \(\mu _4\) and fixed values of \(d=9\), \(Q=0.3\), \(q=5\), \(k=1\), \(\mu _2=-0.9\), \(\mu _3=-0.6\), \(b_0=3\), \(b_1=0.9\), \(b_2=2\), \({\tilde{b}}_3=0.1\), \({\tilde{b}}_4=1\), and \(\Lambda =-1\)

Fig. 13
figure 13

Dependence of \(det{\textbf {H}}\) (Eq. (3.18)) on the conformal scalar field for fixed values of \(d=9\), \(Q=0.3\), \(k=1\), \(q=5\), \(\mu _2=-0.9\), \(\mu _3=-0.6\), \(\mu _4=0.1\), and \(\Lambda =-1\)

For obtaining real solutions, we take \(\Lambda >0\) and \(\mu _4>0\). Since the spacetime dimension \(d=9\) produces negative value for \(\mu _4\) while other choices of d lead to positive values, so it is convenient to ignore the case of \(d=9\). Our numerical calculations show that for the determination of black hole solution, one needs to take \(d>9\). In the limit \(r\rightarrow \infty \), the metric function corresponding to pure quasi-topological-power-Yang–Mills solution tends to

$$\begin{aligned} f(r)=k\mp \bigg (\frac{2\Lambda }{\mu _4d_1d_2}\bigg )^{\frac{1}{4}}r^2. \end{aligned}$$
(4.4)

Note that, the minus and plus signs are defined respectively for \(k=1\) and \(k=-1\), whereas the other cases lead to naked singularity. Thus, the choice \(\Lambda >0\) in this metric function may describe asymptotically AdS and dS pure quasi-topological black holes with \(k=-1\) and \(k=1\), respectively. These power-Yang–Mills black holes possess horizons, if the equation \(f(r)=0\) has positive real roots. Hence, on the basis of appropriate choices for the parameters d, m, Q, \(\Lambda \) and \(\mu _4\), the pure quasi-topological solution can describe a black hole having one or more horizons. In this regard, we plot metric function (4.3) as a function of r with \(\Lambda =1\) in Figs. 14, 15, 16 and 17. The horizons of the black hole are given by those spots where the curve surpasses the horizontal axis. It may be noted that for \(k=-1\) and \(d>9\), the solution (4.3) describes AdS black hole with at most three horizons, an extreme dS black hole and a naked singularity. It is also shown that the nonlinearity parameter q and conformal coupling parameters affect the horizon structure of the black hole. The case \(q=1\) in Eq. (4.3) corresponds to the solution of the hairy black hole in pure quasi-topological gravity with Yang–Mills source. Figure 16 shows the behaviour of metric function (4.3) for various values of the conformal parameters. Additionally, in Fig. 17, the smaller roots of \(f(r)=0\) are associated with the black hole horizons, whereas the larger one corresponds to the cosmological horizon. It can also be verified that for a positive value of quasi-topological parameter \(\mu _4\), the Kretschmann scalar associated with pure quasi-topological solution in the vicinity of \(r=0\) takes the form as

$$\begin{aligned} K\propto \bigg (\frac{m}{\mu _4}\bigg )^{1/2}r^{-(d_1)/2}, \end{aligned}$$
(4.5)

which diverges at \(r=0\). Therefore, the pure quasi-topological power-Yang–Mills black hole has an essential central singularity.

Fig. 14
figure 14

Dependence of f(r) (Eq. (4.3)) on the parameter q when \(d=11\), \(Q=10\), \(m=1\), \(k=-1\), \(N=1\), \(\mu _4=10^{9}\), \(b_0=1\), \(b_1=1\), \(b_2=1\), \({\tilde{b}}_3=1\), \({\tilde{b}}_4=1\), and \(\Lambda =1\)

Fig. 15
figure 15

Dependence of f(r) (Eq. (4.3)) on \(\mu _4\) when \(d=11\), \(q=3\), \(k=-1\), \(m=1\), \(Q=1\), \(N=1\), \(b_0=1\), \(b_1=1\), \(b_2=1\), \({\tilde{b}}_3=1\), \({\tilde{b}}_4=1\), and \(\Lambda =1\)

Fig. 16
figure 16

Dependence of f(r) (Eq. (4.3)) on the conformal scalar field when \(d=11\), \(Q=10\), \(q=3\), \(k=-1\), \(m=1\), \(N=1\), and \(\Lambda =1\)

Fig. 17
figure 17

Dependence of the dS solution (Eq. (4.3)) on the parameter q when \(d=11\), \(Q=10\), \(k=1\), \(m=1\), \(\mu _4=10^9\), \(N=1\), \(b_0=1\), \(b_1=1\), \(b_2=1\), \({\tilde{b}}_3=1\), \({\tilde{b}}_4=1\), and \(\Lambda =1\)

5 Thermodynamics of pure quasi-topological power-Yang–Mills black holes

In order to study thermodynamic properties of pure quasi-topological hairy black holes described by metric function (4.3) we will work out various thermodynamic quantities. In this case too, the mass density follows from Eq. (3.1) and, as a function of outer horizon, it can be obtained as

Fig. 18
figure 18

Dependence of heat capacity \(C_H\) (Eq. (5.5)) on the Yang–Mills magnetic charge \({\tilde{Q}}=Q/4\pi \) for fixed values of \(d=11\), \(q=6\), \(k=-1\), \(\mu _4=10^9\), \(b_0=2\), \(b_1=0.9\), \(b_2=2\), \({\tilde{b}}_3=0.5\), \({\tilde{b}}_4=1\), and \(\Lambda =1\)

$$\begin{aligned} \begin{aligned} M=\left\{ \begin{array}{lll} \frac{d_2}{16\pi }\bigg (\mu _4k^4r_+^{d_9}-\frac{2\Lambda r_+^{d_1}}{d_1d_2}-\frac{16\pi H}{d_2r_+}-\frac{d_3^qd_2^{q-1}Q^{2q}r_+^{d_1-4q}}{d_1-4q}\bigg ), \\ \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad q\ne \frac{d_1}{4}, \\ \frac{d_2}{16\pi }\bigg (\mu _4k^4r_+^{d_9}-\frac{2\Lambda r_+^{d_1}}{d_1d_2}-\frac{16\pi H}{d_2r_+}-d_3Q^{d_1/2}\ln {r_+}\bigg ), \\ \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad q=\frac{d_1}{4}. \end{array}\right. \end{aligned}\nonumber \\ \end{aligned}$$
(5.1)

Using the condition \(f(r_+)=0\) and the polynomial equation (4.2), it is straightforward to obtain Hawking temperature as

$$\begin{aligned} \begin{aligned} T_H&=\left\{ \begin{array}{lll} \frac{1}{4\pi }\bigg [\frac{r_+^8}{4\mu _4k^3}\bigg (\frac{\mu _4k^4d_1}{r_+^9}-\frac{2\Lambda }{d_2r_+}+\frac{16\pi H}{d_2r_+^{d+1}}-\frac{d_3^qd_2^{q-1}Q^{2q}}{r_+^{4q+1}}\bigg )\\ -\frac{2k}{r_+}\bigg ] q\ne \frac{d_1}{4}, \\ \frac{1}{4\pi }\bigg [\frac{r_+^8}{4\mu _4k^3}\bigg (\frac{\mu _4k^4d_1}{r_+^9}-\frac{2\Lambda }{d_2r_+}+\frac{16\pi H}{d_2r_+^{d+1}}-\frac{d_3Q^{d_1/2}}{r_+^{d}}\bigg )\\ -\frac{2k}{r_+}\bigg ], q=\frac{d_1}{4}. \end{array}\right. \end{aligned}\nonumber \\ \end{aligned}$$
(5.2)

Again, using the same technique as in Ref. [86], the entropy density of pure quasi-topological black hole can be calculated as

$$\begin{aligned} \begin{aligned} {\mathcal {S}}&=\frac{d_2k^3\mu _4r_+^{d_8}}{d_8}+\frac{b_1}{4}N^{d_2}+\frac{kb_2d_2d_3N^{d_4}}{2}\\&\quad +\frac{3d_2d_3(3dd_5+16)k^2{\tilde{b}}_3N^{d_6}}{32(2d-3)}\\&\quad +(d_1^5-15d_1^4+72d_1^3-156d_1^2+150d_1-42)\\&\quad d_1d_2^2d_3^2d_4{\tilde{b}}_4k^3N^{d_8}. \end{aligned} \end{aligned}$$
(5.3)

Our calculations show that the temperature (5.2) is equal to \(\bigg (\frac{\partial M}{\partial {\mathcal {S}}}\bigg )\). Thus, the power-Yang–Mills black holes in pure quasi-topological gravity also fulfill the first law of thermodynamics (3.9), provided that the power-Yang–Mills potential associated with (4.3) is given by

$$\begin{aligned} \begin{aligned} {\mathcal {U}}=\frac{\partial M}{\partial {\tilde{Q}}}&=\left\{ \begin{array}{lll} {}-\frac{q d_3^qd_2^q(4\pi {\tilde{Q}})^{2q-1}r_+^{d_1-4q}}{8\pi (d_1-4q)}, &{} &{} q\ne \frac{d_1}{4}, \\ {}-\frac{d_1d_2d_3}{32\pi }(4\pi {\tilde{Q}})^{d_3/2}\ln {r_+}, &{} &{} q=\frac{d_1}{4}. \end{array}\right. \end{aligned}\nonumber \\ \end{aligned}$$
(5.4)

The heat capacity can be obtained as

$$\begin{aligned} \begin{aligned} C_H=T_H\bigg (\frac{\partial {\mathcal {S}}}{\partial T_H}\bigg )_{{\tilde{Q}}}&=\left\{ \begin{array}{lll} \frac{d_2k^3\mu _4 r_+^{d_8}\big (d_2k^4\mu _4d_9r_+^{4q-8}-2\Lambda r_+^{4q}+16\pi Hr_+^{4q-d}-d_3^qd_2^qQ^{2q}\big )}{\big ((4q-7)d_2^qd_3^qQ^{2q}-14\Lambda r_+^{4q}-16\pi H d_7r_+^{4q-d}-\mu _4k^4d_2d_9r_+^{4q-8}\big )}, &{} &{} q\ne \frac{d_1}{4}, \\ \frac{d_2k^3\mu _4 r_+^{d_8}\big (\mu _4k^4d_2d_9r_+^{d_9}-2\Lambda r_+^{d_1}+16\pi Hr_+^{-1}-d_2d_3Q^{d_1/2}\big )}{\big (Q^{d_1/2}d_2d_3d_8-14\Lambda r_+^{d_1}-16\pi H d_7r_+^{-1}-k^4\mu _4d_2d_9r_+^{d_9}\big )}, &{} &{} q=\frac{d_1}{4}. \end{array}\right. \end{aligned} \end{aligned}$$
(5.5)
Fig. 19
figure 19

Plot of heat capacity \(C_H\) (Eq. (5.5)) for different values of the nonlinearity parameter q. The other parameters are selected as \(d=11\), \(Q=1\), \(k=-1\), \(\mu _4=10^9\), \(b_0=2\), \(b_1=0.9\), \(b_2=2\), \({\tilde{b}}_3=0.5\), \({\tilde{b}}_4=0.05\), and \(\Lambda =1\)

Fig. 20
figure 20

Dependence of heat capacity \(C_H\) (Eq. (5.5)) on the parameter \(\mu _4\). The other particular values are taken as \(d=11\), \(Q=1\), \(k=-1\), \(q=6\), \(b_0=3\), \(b_1=0.9\), \(b_2=2\), \({\tilde{b}}_3=0.5\), \({\tilde{b}}_4=0.05\), and \(\Lambda =1\)

Fig. 21
figure 21

Dependence of heat capacity \(C_H\) (Eq. (5.5)) on the conformal coupling constants with \(d=11\), \(q=6\), \(Q=1\), \(k=-1\), \(\mu _4=10^9\), and \(\Lambda =1\). Furthermore, we have chosen \(b_0=1\), \(b_1=0.5\), \(b_2=1\) for black curve, \(b_0=2\), \(b_1=0.7\), \(b_2=1.5\) for red curve and \(b_0=3\), \(b_1=0.9\), \(b_2=2\) for blue curve

Note that, the parameter Q is related to Yang–Mills charge \({\tilde{Q}}\) through Eq. (3.3). The above expression reduces to the heat capacity of Yang–Mills hairy black holes in pure quasi-topological gravity when \(q=1\). The local stability of power-Yang–Mills black holes (i.e. when \(q\ne 1\)) can be described from the plot of heat capacity as a function of \(r_+\). Figure 18 shows the plot of heat capacity for different values of Q and fixed values of other parameters involved in the associated expression of this quantity. The region in which this thermodynamic quantity is positive corresponds to local stability while its negativity implies local instability of pure quasi-topological black holes. One can see that the horizon radius associated with infinite heat capacity, say \(r_c\), gets larger when Yang–Mills magnetic charge increases. It is worth noting that the black holes whose outer horizons are greater than \(r_c\) are stable. Furthermore, size of the smallest possible stable black holes also grows when this parameter attains greater values. Similarly, Fig. 19 depicts the behaviour of this quantity for different values of the parameter q. One can analyze that for power-Yang–Mills hairy black holes, there exist regions of local stability in the canonical ensemble. This is in contrast to the non-hairy Yang–Mills black holes of pure quasi-topological gravity which are locally unstable. Hence, the nonlinearity of Yang–Mills field induces certain affects on the local thermodynamic stability of black holes. Additionally, Figs. 20 and 21 respectively demonstrate the effects of quasi-topological parameter \(\mu _4\) and conformal coupling constants on the local stability of pure quasi-topological black holes. It is shown that the heat capacity rises when these parameters get larger values.

In the grand canonical ensemble, the entropy \({\mathcal {S}}\) and charge \({\tilde{Q}}\) should be considered as variables. In this ensemble, the local thermodynamic stability can be determined from the positivity of both \(\big (\partial ^2M/\partial {\tilde{Q}}^2\big )\) and the determinant of the Hessian matrix. Using the above value of mass in (5.1) we can compute

$$\begin{aligned} \begin{aligned} \bigg (\frac{\partial ^2 M}{\partial Q^2}\bigg )&=\left\{ \begin{array}{lll} -\frac{q(2q-1)d_3^qd_2^q(4\pi )^{2q}{\tilde{Q}}^{2q-2}}{8\pi (d_1-4q)}r_+^{d_1-4q}, &{} &{} q\ne \frac{d_1}{4}, \\ -\frac{d_1d_2d_3^2 (4\pi )^{2q}{\tilde{Q}}^{d_5/2}}{64}\ln {r_+}, &{} &{} q=\frac{d_1}{4}. \end{array}\right. \end{aligned} \end{aligned}$$
(5.6)

The above quantity is negative when \(q=1\) and \(q\le d_1/4\). Thus, for these two choices the black hole is unstable in this ensemble. However, for \(q>d_1/4\), the above quantity is positive and so we need to check the behaviour of the Hessian matrix determinant for the investigation of thermal stability. The determinant of Hessian matrix for \(q>d_1/4\) in terms of the outer horizon can be computed as

$$\begin{aligned} det {\textbf {H}}&=55\frac{qd_2^qd_3^q(2q-1)(4\pi {\tilde{Q}})^{2q-2}r_+^{d_1-4q}}{8(d_1-4q)\mu _4^2k^6d_2}\nonumber \\&\quad \times \bigg [\frac{\mu _4k^4d_9}{r_+^{d_7}}+\frac{14\Lambda }{d_2r_+^{d_{15}}}-\frac{16\pi Hd_7}{d_2r_+^{2d-15}}\nonumber \\&\quad +\frac{d_2{q-1}d_3^q(4\pi {\tilde{Q}})^{2q}(4q-7)}{r_+^{4q+d_{15}}}\bigg ]\nonumber \\&\quad -\frac{d_3^{2q}d_2^{2q-2}q^2(4\pi {\tilde{Q}})^{4q-2}}{4\mu _4^2k^6r_+^{8q-14}}. \end{aligned}$$
(5.7)
Fig. 22
figure 22

Dependence of the determinant \(det{\textbf {H}}\) (Eq. (5.7)) on the charge \({\tilde{Q}}\) for fixed values of \(d=11\), \(q=4\), \(k=-1\), \(\mu _4=10^9\), \(b_0=-2\), \(b_1=0.9\), \(b_2=2\), \({\tilde{b}}_3=0.5\), \({\tilde{b}}_4=1\), and \(\Lambda =1\)

The plot of \(det{\textbf {H}}\) for various values of charge \({\tilde{Q}}=Q/4\pi \) is shown in Fig. 22. One can observe that as the Yang–Mills charge increases, the horizon radius of the largest stable black hole also increases. Similarly, the behaviour of this determinant for different values of nonlinearity parameter q and quasi-topological parameter \(\mu _4\) is given in Figs. 23 and 24, respectively. It can also be analyzed that there exists a value \(r_{0}\) such that \(det{\textbf {H}}\) is positive when \(r_+<r_{0}\). This indicates the region of black hole’s stability. However, as \(r_+\) increases its value from \(r_0\), this determinant becomes negative and we have thermodynamic instability in the grand canonical ensemble. Finally, we conclude that unlike Yang–Mills black holes [60] of pure quasi-topological gravity, the power-Yang–Mills black holes with conformal scalar hair in this theory could be thermodynamically stable in the grand canonical ensemble.

6 Rotating black branes in quartic quasi-topological gravity with power-Yang–Mills source

In this section we will implement solution (2.26) for \(k=0\) with a global rotation. This can be done, if we use the transformation describing the rotation boost in the \(t-\phi _i\) planes, i.e.,

$$\begin{aligned}&t\longmapsto \Xi t-\sum _{i=1}^{p}a_i\phi _i, \nonumber \\&\phi _i\longmapsto \Xi \phi _i-\frac{a_i}{l^2}t. \end{aligned}$$
(6.1)
Fig. 23
figure 23

Dependence of the determinant \(det {\textbf {H}}\) (Eq. (5.7)) on the parameter q for fixed values of \(d=11\), \({\tilde{Q}}=10\), \(k=-1\), \(\mu _4=10^9\), \(b_0=-2\), \(b_1=0.9\), \(b_2=2\), \({\tilde{b}}_3=0.5\), \({\tilde{b}}_4=1\), and \(\Lambda =1\)

Fig. 24
figure 24

Dependence of the determinant \(det {\textbf {H}}\) (Eq. (5.7)) on the parameter \(\mu _4\) for fixed values of \(d=11\), \(q=4\), \(k=-1\), \({\tilde{Q}}=100\), \(b_0=-2\), \(b_1=0.9\), \(b_2=2\), \({\tilde{b}}_3=0.5\), \({\tilde{b}}_4=1\), and \(\Lambda =1\)

The \(SO(d_1)\) rotation group in d-dimensions contains the maximum number of rotational parameters. Hence, the independent parameters of rotation are of number \([d_1/2]\), where [...] stands for the integer part. Thus, the line element for the rotating spacetime with flat horizon and \(p\le [d_1/2]\) rotation parameters can be given as

$$\begin{aligned} ds^2={} & {} -f(r)\big (\Xi dt-\sum _{i=1}^{p}a_id\phi _i\big )^2+\frac{dr^2}{f(r)}\nonumber \\{} & {} +\frac{r^2}{l^4}\sum _{i=1}^{p}\big (a_idt-\Xi l^2d\phi _i\big )^2\nonumber \\{} & {} -\frac{r^2}{l^2}\sum _{i<j}^{p}\big (a_id\phi _j-a_jd\phi _i\big )^2+r^2\sum _{i=1}^{d_2-p}dx_i^2, \end{aligned}$$
(6.2)

where \(\Xi =\sqrt{1+\sum _{i=1}^{p}a_i^2/l^2}\), l is a scale factor related to cosmological constant and \(a_i\)’s are the p parameters of rotation. It should be noted that static line element (2.13) and rotating metric (6.2) can be mapped locally onto each other, not globally. In order to study the physical properties of the solutions obtained for \(k=0\) in quartic quasi-topological gravity coupled to power-Yang–Mills theory, we plot the metric function f(r) for suitable values of parameters involved in it. It is worth noting that for \(k=0\), the parameter H vanishes and the solutions have no scalar hair. In Figs. 25, 26 and 27, it is clear that the metric function possesses divergences at the central position \(r=0\). One can also verify that the Kretschmann scalar diverges at this point. However, as r becomes larger and larger, the behaviour of f(r) is dependent on the value of the cosmological constant \(\Lambda \). Moreover, Figs. 25, 26 and 27 show the behaviour of the metric function for different values of parameters Q, q and \(\mu _4\) in AdS spacetime. One can see that these parameters are affecting the values of the horizons, and behaviour of the metric function.

Fig. 25
figure 25

Dependence of the solution f(r) (Eq. (2.26)) on the parameter Q for fixed values of \(d=11\), \(m=1\), \(q=7\), \(H=0\), \(k=0\), \(\mu _2=-0.09\), \(\mu _3=-0.006\), \(\mu _4=2^{10}\), and \(\Lambda =-1\)

Fig. 26
figure 26

Plot of the solution f(r) (Eq. (2.26)) for different values of the parameter q and fixed values \(d=11\), \(H=0\), \(m=0.5\), \(Q=2\), \(k=0\), \(\mu _2=-0.09\), \(\mu _3=-0.006\), \(\mu _4=10^{7}\), and \(\Lambda =-1\)

Fig. 27
figure 27

Dependence of the solution f(r) (Eq. (2.26)) on the parameter \(\mu _4\) for fixed values of \(d=11\), \(H=0\), \(m=0.5\), \(Q=2\), \(k=0\), \(\mu _2=-0.09\), \(\mu _3=-0.006\), and \(\Lambda =-1\)

Now, the Killing vector associated with the rotating black brane metric can be defined as

$$\begin{aligned} {\mathcal {X}}=\partial _t+\sum _{j=1}^{p}\Omega _j\partial _{\phi _j}, \end{aligned}$$
(6.3)

where \(\Omega _j\) refers to the angular velocity and is given by

$$\begin{aligned} \Omega _j=-\bigg (\frac{g_{t\phi _j}}{g_{\phi _j\phi _j}}\bigg )=\frac{a_j}{\Xi l^2}. \end{aligned}$$
(6.4)

The expression for Hawking temperature associated with this rotating black brane takes the form

$$\begin{aligned} T_H(r_+)=\frac{f'(r_+)}{4\pi \Xi }=\frac{r_+^2}{4\pi \Xi }\Upsilon '(r_+). \end{aligned}$$
(6.5)

During the computation of thermodynamic quantities from the variation of action (2.2) with respect to metric tensor, one gets a total derivative surface term containing the derivatives of \(\delta g_{\mu \nu }\) normal to the boundary. Since these derivative terms do not cancel with each other, so, the variation of the action is not well-defined. To handle this issue, it is convenient to add the generalized Gibbons–Hawking surface term \({\mathcal {I}}_{b}\) with the bulk action (2.2). Thus, the variational principle would be well-defined if this boundary term can be included in the following form

$$\begin{aligned} {\mathcal {I}}_b={\mathcal {I}}_b^{(I)}+{\mathcal {I}}_b^{(II)}+{\mathcal {I}}_b^{(III)}+{\mathcal {I}}_b^{(IV)}, \end{aligned}$$
(6.6)

where \({\mathcal {I}}_b^{(I)}\), \({\mathcal {I}}_b^{(II)}\), \({\mathcal {I}}_b^{(III)}\) and \({\mathcal {I}}_b^{(IV)}\) respectively, stand for the surface terms corresponding to Einstein [89], second order Lovelock (Gauss–Bonnet) [5, 90], cubic quasi-topological [91] and quartic quasi-topological [92] gravities. These terms are obtained as

$$\begin{aligned}{} & {} {\mathcal {I}}_b^{(I)}=\frac{1}{8\pi }\int _{\partial {\mathcal {M}}}d^{d_1}x\sqrt{-\gamma }{\mathcal {K}}, \end{aligned}$$
(6.7)
$$\begin{aligned}{} & {} {\mathcal {I}}_b^{(II)}=\frac{1}{8\pi }\int _{\partial {\mathcal {M}}}d^{d_1}x\sqrt{-\gamma }\frac{2{\tilde{\mu }}_2l^2}{3d_3d_4}\big (3{\mathcal {K}}{\mathcal {K}}_{ad}{\mathcal {K}}^{ad}\nonumber \\{} & {} -2{\mathcal {K}}_{ac}{\mathcal {K}}^{cd}{\mathcal {K}}^{a}_{d}-{\mathcal {K}}^3\big ), \end{aligned}$$
(6.8)
$$\begin{aligned}{} & {} {\mathcal {I}}_b^{(III)}=\frac{1}{8\pi }\int _{\partial {\mathcal {M}}}d^{d_1}x\sqrt{-\gamma }\bigg [\frac{3{\tilde{\mu }}_3l^4}{5d_1d_2^2d_3d_6}\bigg (d_1{\mathcal {K}}^5\nonumber \\{} & {} -2{\mathcal {K}}^3{\mathcal {K}}_{ad}{\mathcal {K}}^{ad}+4d_2{\mathcal {K}}_{ab}{\mathcal {K}}^{ab}{\mathcal {K}}_{cd}{\mathcal {K}}^{d}_{e}{\mathcal {K}}^{ec}\nonumber \\{} & {} -(5d_1-6){\mathcal {K}}{\mathcal {K}}_{ab}\big (d_1{\mathcal {K}}^{ab}{\mathcal {K}}^{cd}{\mathcal {K}}_{cd}-d_2{\mathcal {K}}^{ac}{\mathcal {K}}^{bd}{\mathcal {K}}_{cd}\big )\bigg )\bigg ],\nonumber \\ \end{aligned}$$
(6.9)

and

$$\begin{aligned} \begin{aligned} {\mathcal {I}}_b^{(IV)}&=\frac{1}{8\pi }\int _{\partial {\mathcal {M}}}d^{d_1}x\sqrt{-\gamma }\\&\quad \times \bigg [\frac{2{\tilde{\mu }}_4l^6}{7d_1d_2d_3d_8(d_1^2-3d_1+3)}\bigg (\alpha _1{\mathcal {K}}^3{\mathcal {K}}^{ab}{\mathcal {K}}_{ac}{\mathcal {K}}_{bd}{\mathcal {K}}^{cd}\\&\quad +\alpha _2{\mathcal {K}}^2{\mathcal {K}}^{ab}{\mathcal {K}}_{ab}{\mathcal {K}}^{cd}{\mathcal {K}}^{e}_{c}{\mathcal {K}}_{de}+\alpha _3{\mathcal {K}}^2{\mathcal {K}}^{ab}{\mathcal {K}}_{ac}{\mathcal {K}}_{bd}{\mathcal {K}}^{ce}{\mathcal {K}}^{d}_{e}\\&\quad +\alpha _4{\mathcal {K}}{\mathcal {K}}^{ab}{\mathcal {K}}_{ab}{\mathcal {K}}^{cd}{\mathcal {K}}^{e}_{c}{\mathcal {K}}^{f}_{d}{\mathcal {K}}_{ef}+\alpha _5{\mathcal {K}}{\mathcal {K}}^{ab}{\mathcal {K}}^{c}_{a}{\mathcal {K}}_{bc}{\mathcal {K}}^{de}{\mathcal {K}}^{f}_{d}{\mathcal {K}}_{ef}\\&\quad +\alpha _6{\mathcal {K}}{\mathcal {K}}^{ab}{\mathcal {K}}_{ac}{\mathcal {K}}_{bd}{\mathcal {K}}^{ce}{\mathcal {K}}^{df}{\mathcal {K}}_{ef}+\alpha _7{\mathcal {K}}^{ab}{\mathcal {K}}^{c}_{a}\\&\quad {\mathcal {K}}_{bc}{\mathcal {K}}^{de}{\mathcal {K}}_{df}{\mathcal {K}}_{eg}{\mathcal {K}}^{fg}\bigg )\bigg ], \end{aligned}\nonumber \\ \end{aligned}$$
(6.10)

where \(\gamma _{ab}\) refers to the induced metric tensor on the boundary \(\partial {\mathcal {M}}\) while \({\mathcal {K}}\) stands for the trace of the extrinsic curvature \({\mathcal {K}}^{ab}\) of this boundary. Note that these boundary terms are valid for the case of any rotating black branes of quartic quasi-topological theory, however, if the horizon boundary of the object is not flat then the corresponding surface terms of Gauss–Bonnet and quasi-topological gravities would be different from Eqs. (6.8)–(6.10). It is worthwhile to note that the value of the total action \({\mathcal {I}}_{bulk}+{\mathcal {I}}_b\) is infinite on the solutions. However, this divergence can be removed with the help of the counter-term method [93,94,95,96]. Note that the infiniteness of the action can also be tackled through the employment of background subtraction technique [97, 98]. In this method, the boundary surface must be embedded in a different backdrop geometry against which all the quasi-local quantities are calculated. This backdrop spacetime can be encompassed into the bulk action through the adoption of terms that pertain to the extrinsic curvature of the embedded surface. This approach makes the physical quantities heavily dependent on the selection of the backdrop geometry. The boundary surface can usually not be incorporated into a backdrop spacetime. Subsequently, for the scenario of asymptotically AdS solutions, it might be more practical to employ the counter-term method suggested by AdS/CFT correspondence [99]. Using this notion, we might compute the action and the conserved quantities intrinsically that do not rely on any backdrop geometry. The curvature invariants of the induced line element would be considered on the boundary in this situation. For an identified value of d, there are a huge number of achievable invariants, though only a finite number of terms have nonzero impacts on the boundary. Note that the boundary would expand to infinity. This technique has also been utilized for determining the conserved quantities of various gravitational objects, e.g. rotating black holes, black holes having NUT charge, topological black holes, and rotating black branes [100, 101]. Though the counter-term technique is frequently employed for the situations involving infinite boundaries, it may also be applied to estimate the conserved quantities in the scenario of finite boundaries [102, 103]. The same approach has also been advanced to dS and asymptotically flat spacetimes [104,105,106]. It should be underlined that there would only be a finite number of terms for any specific value of d that are not vanishing at infinity. This fact holds true regardless of the choice of the bulk theory. Remember that, for asymptotically AdS solutions, the counter-terms that eliminate the infiniteness of the action in Einstein’s gravity should also erase the corresponding divergences in Lovelock and quasi-topological gravities. There have not yet been any rotating solutions with curved boundary at infinity in the scheme of quartic quasi-topological gravity. In light of this, we are limiting ourselves to the counter-terms associated with the rotating black branes. These objects have flat boundaries, hence the counter-term action with only one term is offered by

$$\begin{aligned} {\mathcal {I}}_{count}=-\frac{1}{8\pi }\int _{\partial {\mathcal {M}}}d^{d_1}x\sqrt{-\gamma }\bigg (\frac{d_2}{L_{eff}}\bigg ), \end{aligned}$$
(6.11)

where \(L_{eff}\) describes the effective scale length factor related to l and parameters \({\tilde{\mu }}_2\), \({\tilde{\mu }}_3\) and \({\tilde{\mu }}_4\). Note that, \(L_{eff}\) reduces to l when the coupling constants i.e. \({\tilde{\mu }}_2\), \({\tilde{\mu }}_3\) and \({\tilde{\mu }}_4\) approach zero. Using the counter-term method, the overall action \({\mathcal {I}}_{bulk}+{\mathcal {I}}_b+{\mathcal {I}}_{count}\) becomes finite and can be used to compute the conserved and thermodynamic quantities.

The conserved quantities related to the timelike \(\partial _t\) and rotational \(\partial _{\phi _j}\) Killing vector fields can be computed as

$$\begin{aligned}{} & {} M=\frac{(d_1\Xi ^2-1)m}{16\pi d_2l^{d_2}}, \end{aligned}$$
(6.12)
$$\begin{aligned}{} & {} J_i=\frac{d_1\Xi a_im}{16\pi d_2l^{d_2}}. \end{aligned}$$
(6.13)

One can clearly see that by choosing the rotation parameter \(a_i\) equal to zero or \(\Xi =1\), the angular momentum \({\textbf {J}}\) vanishes and (6.12) then describes the mass of the static black hole. The Yang–Mills charge per unit volume \({\mathcal {V}}_{d_2}\) in this case can be obtained as

$$\begin{aligned} {\tilde{Q}}=\frac{\Xi Q}{4\pi l^{d_4}}. \end{aligned}$$
(6.14)

It is well-known that entropy is the quarter of horizon area [107,108,109]. Using this, the entropy density for the power-Yang–Mills black brane can be obtained as

$$\begin{aligned} {\mathcal {S}}=\frac{\Xi r_+^{d_2}}{4l^{d_4}}. \end{aligned}$$
(6.15)

In order to check the validity of the first law, it is more convenient to calculate the mass in terms of extensive variables \({\mathcal {S}}\), \({\tilde{Q}}\) and \({\textbf {J}}\). Therefore, by taking \({\mathcal {Z}}=\Xi ^2\) and using Eqs. (6.12)–(6.13), we construct the Smarr-type formula as

$$\begin{aligned} M({\mathcal {S}},{\tilde{Q}},J)=\frac{(d_1{\mathcal {Z}}-1)J}{d_1l\sqrt{{\mathcal {Z}}({\mathcal {Z}}-1)}}. \end{aligned}$$
(6.16)

It should be noted that the parameter \({\mathcal {Z}}\) should be dependent on the extensive parameters. Using Eqs. (6.14)–(6.15) and the condition for event horizon i.e. \(f(r_+)=0\), it is possible to obtain an equation \({\mathcal {E}}({\mathcal {S}},{\tilde{Q}},J)=0\), whose positive real root is \({\mathcal {Z}}=\Xi ^2\) and

$$\begin{aligned} \begin{aligned} {\mathcal {E}}({\mathcal {S}},{\tilde{Q}},J) =\left\{ \begin{array}{lll} \frac{16\pi l^{d_3}d_2J{\mathcal {Z}}^{d_1/2d_2}}{d_1\sqrt{{\mathcal {Z}}({\mathcal {Z}}-1)}}+\frac{2\Lambda l^{d_1d_4/d_2}(4)^{d_1/d_2}}{d_1d_2{\mathcal {S}}^{-d_1/d_2}}\\ +\frac{(\pi {\tilde{Q}})^{2q}d_2^{q-1}d_3^q\big (4l^{d_4}\big )^{(d_1+2qd_4)/d_2}}{(d_1-4q){\mathcal {Z}}^{d_4q/d_2}{\mathcal {S}}^{(4q-d_1)/d_2}}, q\ne \frac{d_1}{4},\\ \frac{16\pi l^{d_3}d_2J{\mathcal {Z}}^{d_1/2d_2}}{d_1\sqrt{{\mathcal {Z}}({\mathcal {Z}}-1)}}+\frac{2\Lambda l^{d_1d_4/d_2}(4)^{d_1/d_2}}{d_1d_2{\mathcal {S}}^{-d_1/d_2}}\\ +\frac{\big (4l^{d_4}\pi {\tilde{Q}}\big )^{d_1/d_2}d_3}{d_2{\mathcal {Z}}^{d_1/4}}\ln {\bigg (\frac{4l^{d_4}S}{{\mathcal {Z}}^{1/2}}\bigg )}, q=\frac{d_1}{4}. \end{array}\right. \end{aligned}\nonumber \\ \end{aligned}$$
(6.17)

Now, it is straightforward to write the mass \(M({\mathcal {S}},{\tilde{Q}},J)\) in terms of the extensive parameters and compute the intensive parameters conjugate to them as follows

$$\begin{aligned} \begin{aligned}&T_H=\bigg (\frac{\partial M}{\partial {\mathcal {S}}}\bigg )_{J,{\tilde{Q}}},\\&\Omega _k=\bigg (\frac{\partial M}{\partial J_k}\bigg )_{{\mathcal {S}},{\tilde{Q}}}, \end{aligned} \end{aligned}$$
(6.18)

while, the power-Yang–Mills potential is given by

$$\begin{aligned} \begin{aligned}&{\mathcal {U}}=\bigg (\frac{\partial M}{\partial {\tilde{Q}}}\bigg )_{{\mathcal {S}}, J}\\&=\left\{ \begin{array}{lll} \frac{2qJ(d_3{\mathcal {Z}}{+}1)d_2^{q{-}1}d_3^q(\pi {\tilde{Q}})^{2q}\big (4l^{d_4}\big )^{(2qd_4{+}1)/d_2}{\mathcal {S}}^{(d_1{-}4q)/d_2}}{2d_1l(d_1{-}4q){\mathcal {Z}}^{qd_4/d_2}({\mathcal {Z}}({\mathcal {Z}}-1))^{3/2}{\mathfrak {Y}}({\mathcal {S}},{\tilde{Q}},J)}, \\ q{\ne }\frac{d_1}{4}, \\ \frac{d_3(d_3{\mathcal {Z}}+1)(4\pi )^{d_1/d_2}l^{d_1d_4/d_2}J{\tilde{Q}}^{1/d_2}}{2ld_2^2{\mathcal {Z}}^{d_1/4}({\mathcal {Z}}({\mathcal {Z}}-1))^{3/2}{\mathfrak {Y}}({\mathcal {S}},{\tilde{Q}},J)}\ln {\big (\frac{4{\mathcal {S}}l^{d_4}}{\sqrt{{\mathcal {Z}}}}\big )}, \\ q{=}\frac{d_1}{4}, \end{array}\right. \end{aligned}\nonumber \\ \end{aligned}$$
(6.19)

in which

$$\begin{aligned} \begin{aligned} {\mathfrak {Y}}({\mathcal {S}},{\tilde{Q}},J)\!=\!\left\{ \! \begin{array}{lll} \frac{q(\pi {\tilde{Q}})^{2q}d_2^qd_3^qd_4\big (4l^{d_4}\big )^{(d_1+2qd_4)/d_2}{\mathcal {S}}^{(d_1-4q)/d_2}}{(d_1-4q){\mathcal {Z}}^{1+d_4q/d_2}}\\ +\frac{8\pi l^{d_3}J(d_3{\mathcal {Z}}+1){\mathcal {Z}}^{d_1/2d_2}}{d_1({\mathcal {Z}}({\mathcal {Z}}-1))^{3/2}}, \\ q\ne \frac{d_1}{4}, \\ \frac{8\pi l^{d_3}J(d_3{\mathcal {Z}}+1){\mathcal {Z}}^{d_1/2d_2}}{d_1({\mathcal {Z}}({\mathcal {Z}}-1))^{3/2}}+\frac{d_3(4\pi {\tilde{Q}})^{d_1/d_2}l^{d_1d_4/d_2}}{2d_2{\mathcal {Z}}^{1+(d_1/4)}}\\ \bigg (1+\frac{d_1}{2}\ln {\big (\frac{4{\mathcal {S}}l^{d_4}}{\sqrt{{\mathcal {Z}}}}\big )}\bigg ), \\ q=\frac{d_1}{4}. \end{array}\right. \end{aligned}\nonumber \\ \end{aligned}$$
(6.20)

Our calculations showed that the angular velocity and Hawking temperature in (6.18) are same as (6.4) and (6.5), respectively. Thus, our power-Yang–Mills rotating black brane satisfy the first law as

$$\begin{aligned} dM=T_HdS+\sum _{i=1}^{p}\Omega _idJ_i+{\mathcal {U}}d{\tilde{Q}}. \end{aligned}$$
(6.21)

7 Summary

In this work, we mainly focused on the physical and thermodynamic properties of hairy black holes in quartic quasi-topological gravity with power-Yang–Mills source. First, we have considered the fourth order quasi-topological-scalar gravity and coupled it with the power-Yang–Mills theory. From the Wu-Yang ansatz, the gauge potentials are defined and the gravitational field equations are solved. In this context, two analytic power-Yang–Mills hairy black hole solutions are derived for \(\mu _4>0\) and \(\mu _4<0\) in this theory. It is shown that the real solutions exist only when \(\mu _4>0\). We have also write the two expressions separately for the metric function valid in spacetime dimensions when \(q\ne d_1/4\) and \(q=d_1/4\). We also studied the physical properties of these black holes and plotted the associated solution f(r) given in (2.26) for various values of the parameters m, q, Q, \(b_0\), \(b_1\), \(b_2\), \({\tilde{b}}_3\), \({\tilde{b}}_4\), and \(\mu _i\)’s. Depending on the suitable choices for these parameters, either the solution describes a hairy black hole which can possess one or at most three horizons or it can describe a naked singularity. It is shown that variations in quasi-topological parameter \(\mu _4\) affect the position of the horizon. On the other hand, this effect is negligible at infinity. Similarly, it can also be concluded that the value of the event horizon is shifted to the right when the charge Q increases. However, by increasing the values of conformal coupling parameters the event horizon’s radius decreases. It should be noted that for \(q=1\), the solution (2.26) yields the metric function of Yang–Mills hairy black hole in quartic quasi-topological theory. Correspondingly, the power-Yang–Mills black hole solution without scalar hair can be obtained if one puts \(H=0\) in Eq. (2.26). In addition to this, we have also studied thermodynamics of these power-Yang–Mills black holes. During this study, we worked out different thermodynamic quantities and plotted them as well. In the canonical ensemble, the positivity of specific heat capacity implies local thermodynamic stability. Hence, from the plots of heat capacity we have concluded that this quantity diverges at three different points. Additionally, those points at which heat capacity vanishes can also be identified from these plots. It is observed that variations of the charge, nonlinearity parameter, quasi-topological parameter, and conformal coupling constants have produced unavoidable impacts on the local stability of black holes and divergences of the specific heat. Thermodynamic stability in grand canonical ensemble have also been investigated. It is shown that the black holes with \(q\le d_1/4\) are unstable in this ensemble. However, for \(q>d_1/4\) there exist stability regions for black holes. From the plots of the Hessian matrix, we have concluded that the smaller hairy black holes could be stable in this ensemble. However, when the outer horizon \(r_+\) increases then \(det{\textbf {H}}\) is negative and so we have thermodynamic instability of the black holes. Thus, it can be concluded that the power-Yang–Mills and conformal scalar fields produce the possibility for local stability in the grand canonical ensemble. This behaviour is in contrast to the Yang–Mills theory [60], where quasi-topological non-hairy black holes are locally unstable in this ensemble.

In addition to quartic quasi-topological hairy black holes, we also derived a new family of hairy black hole solutions in pure quasi-topological theory within the framework of power-Yang–Mills source. The associated plots of pure quasi-topological black hole solution (4.3) for suitable values of parameters show that for \(k=-1\) and \(d>9\), this solution describes AdS black hole with at most three horizons, an extreme dS black hole and a naked singularity. It is shown that by choosing \(\Lambda >0\), the asymptotic expression of metric function (4.4) describes the asymptotically AdS and dS power-Yang–Mills black holes for \(k=-1\) and \(k=1\), respectively. The effects of Yang–Mills charge, conformal scalar field, and parameter q on the horizon structure of black holes can also be observed from these plots. Note that, the case \(q=1\) in (4.3) gives the hairy black hole solution of pure quasi-topological gravity with Yang–Mills source. The local thermodynamic stability in both canonical and grand canonical ensembles have also been probed. Our results show that there exist the regions of local stability for the power-Yang–Mills hairy black holes in the canonical ensemble. This can be seen from the corresponding plots of heat capacity. Moreover, from the plots of the determinant of Hessian matrix, one can identify the regions of local stability for these hairy black holes in the grand canonical ensemble. It should be noted that it is the nonlinearity of Yang–Mills field that plays the main role in the stability of these black holes. For \(q=1\) and \(H=0\), our results correspond to those of the Yang–Mills non-hairy black holes in pure quasi-topological gravity which are unstable in both canonical and grand canonical ensembles.

In the last part of our paper, we have assumed a general rotating line element with \(p\le [(d-1)/2]\) rotational parameters and study the rotating black branes of quartic quasi-topological gravity coupled to power-Yang–Mills theory. The plots of metric function (2.26) with \(k=0\) and \(H=0\) show that for suitable values of parameters d, q, m, \(\mu _2\), \(\mu _3\) and \(\mu _{4}\), it can describe the power-Yang–Mills black brane with inner and outer horizons for \(Q<Q_{ext}\), extremal black brane for \(Q=Q_{ext}\) and naked singularity for \(Q>Q_{ext}\). Here, we included the generalized Gibbons–Hawking surface terms for the quasi-topological gravity which made the action well-defined. By incorporating the analytic continuation of the metric, we were able to work out the Hawking temperature and angular velocities. Additionally, we have adopted the counter-term approach to establish the finite action and conserved quantities. It is shown that the conserved quantities of these power-Yang–Mills black branes are independent of the coupling coefficients i.e. \(\mu _2\), \(\mu _3\) and \(\mu _{4}\) for fixed values of mass, Yang–Mills charge and rotation parameters \(a_i\). However, one can notice that the thermodynamic quantities depend indirectly on these coupling coefficients through the value of the outer horizon \(r_+\). The Smarr-type formula, which characterizes the mass density as a function of entropy, Yang–Mills magnetic charge and angular momenta, was further developed. We showed that the first law is satisfied for the power-Yang–Mills black branes obtained in this paper. It is worthwhile to note that for \(q=1\), these results correspond to the Yang–Mills black branes of quartic quasi-topological gravity.

It would be very interesting to study the hairy black holes in quintic quasi-topological gravity. In addition to this, the study of black holes and black branes of cubic quasi-topological gravity coupled to Yang–Mills theory in Lifshitz spacetime [26] could also be very interesting.