1 Introduction

Black holes which are the most important prediction of Einstein’s general theory of relativity, are way more than only mathematical objects [1]. It is widely believed that only a not-yet-complete quantum gravity theory is capable to tackle the problem of black hole’s singularity in a proper way. However, different phenomenological approaches have been considered in the literature for solving this problem (see Ref. [2] for a review). One approach is to study the theory of gravity in the framework of nonlinear electrodynamics (NED). The main motivation of studying NED was to remove certain difficulties which appeared in the standard Maxwell’s theory of electro-magnetism. Due to the property of removing divergences in electro-magnetic phenomenon, NED can be applicable to the theory of gravity to handle the problems of singularity and divergences of physical quantities in black holes. In addition to this, black hole solutions of gravitational field equations can also be derived by making the assumption of nonlinear electromagnetic field as a source of gravity [3,4,5,6,7,8,9,10,11,12,13,14].

Different mathematical models for NED, with various motivations, in the framework of gravity have been investigated [15,16,17,18,19,20,21,22]. All these models give predictions about the finiteness of electromagnetic energy and potentials unlike linear Maxwell’s theory [23,24,25,26,27]. Among these models, the Born–Infeld NED is special in that it was formulated for obtaining finite electric field at the centre of charged particles. In addition to solving the problem of central singularity NED also yields electrically charged regular black hole solutions in Einstein’s theory. The spherically symmetric solutions which are derived with the help of NED are asymptotic to the Reissner–Nordström (RN) solution [6]. This approach of using NED for removing singularities and for determination of charged solutions is also successful in the analysis of \((2+1)\)-dimensional black holes [28]. Recently, \((2+1)\)-dimensional black holes attracted much attention for many reasons, e.g., the absence of propagating degrees of freedom due to which they possess very simple mathematical structure. Since they also possess special mass and charge dependence, the \((2+1)\)-dimensional black holes make a good testing ground for the usual four-dimensional black holes. The first example of \((2+1)\)-black holes in this regard is the well-known Bañados–Teitelboim–Zanelli (BTZ) black hole [29]. The \((2+1)\)-dimensional nonlinear electrically charged black holes also possess the same physical characteristics such as Hawking radiation, event horizon and thermodynamics that are commonly found in the usual four-dimensional black holes [30,31,32]. The solution found in Ref. [33] is another example of \((2+1)\)-dimensional black holes. This solution is determined in the framework of Einstein’s theory coupled to a restricted class of NED where Maxwell’s invariant has a power 3/4. In the same way, \((2+1)\)-dimensional black holes are also studied in the presence of NED [34,35,36] where the power of Maxwell’s invariant is taken as an arbitrary real rational number k. (For more discussions related to \((2+1)\)-dimensional black holes and NED, the reader is referred to Refs. [37,38,39,40,41].) Recently, the new NED models such as arcsin electrodynamics and modified Born–Infeld electrodynamics have also been used and static spherically symmetric electrically charged solutions are determined [42,43,44,45]. Further, exponential NED [46] was used for the computation of magnetically charged black hole solutions. Besides the black hole solutions of Einstein gravity, the d-dimensional black holes in modified gravities have also been investigated within this context. For instance, nonsingular black holes [47, 48] have been studied under this process. Similarly, topological Lovelock black holes with pure magnetic sources have been studied as well [49, 50].

Although the exponential and arcsin NED models belong to the family of Born–Infeld type theories, however, there also exist some differences among them. It was shown that magnetically and electrically charged black hole solutions in the framework of these models are asymptotic to RN solution. The Born–Infeld model shows this property of deriving asymptotic solutions but some aspects of this model have different features than the exponential and arcsin electrodynamics models. For example, the exponential electrodynamics model [46] does not admit electrically charged solutions since the Lagrangian density of this model makes the electric field and electric potential unbounded while within the set-up of the Born–Infeld model electrically charged solutions are possible to derive. There are issues of causality in Born–Infeld electrodynamics while in exponential and arcsin NED theories both the causality and unitarity principles are satisfied. The effect of vacuum birefringence occurs in quantum electrodynamics due to quantum corrections in Heisenberg Lagrangian [51]. This effect cannot be observed in Maxwell and Born–Infeld models but in the context of exponential [46] and arcsin [44] models it is present. Similarly, the symmetry of duality holds in Born–Infeld model but in our chosen models i.e. exponential and arcsin it is totally violated. In addition to this, exponential electromagnetic field can drive the universe to accelerate, however, no such effects occur in Born–Infeld electrodynamics [52]. Moreover, it should be noted that the energy conditions in all these models are satisfied and in the weak field limit Maxwell’s theory can be recovered from all these models of NED. In this work we are considering exponential and arcsin nonlinear electromagnetic fields as sources of gravity and study \((2+1)\)-dimensional black holes in Einstein’s theory.

The study of thermodynamic properties is also one of the important issue in the subject of black hole physics. Like Maxwell’s theory, thermodynamics of black holes has gained much interest in the context of NED theories as well. For instance, thermodynamics and phase transitions of black holes are studied in the background of exponential electrodynamics [46, 47]. Similarly, thermodynamic properties of higher dimensional black holes in the presence of power-Maxwell electromagnetic source [53] have also been studied. In Ref. [34] local thermodynamic stability of electrically charged \((2+1)\)-dimensional black holes is studied by employing the technique introduced in Ref. [54]. In this paper we also study thermodynamics of our resulting nonlinearly charged \((2+1)\)-dimensional black holes.

The layout of the paper is as follows. In the next section, we investigate the family of new magnetically charged \((2+1)\)-dimensional black holes in Einstein’s theory coupled to exponential electrodynamics. In this set-up metric functions are calculated and their asymptotic behaviour at both infinity and \(r=0\) are discussed. We also prove that energy conditions are satisfied for this model. The asymptotic expressions of curvature invariants at infinity as well as at \(r=0\) are also calculated. In Sect. 3, thermodynamics of the resulting magnetically charged solution is studied. Section 4 is devoted to the analysis of electrically charged black holes within the context of gravity and arcsin electrodynamics and Sect. 5 studies their thermodynamic properties. Finally, the last section is devoted to some concluding remarks.

2 \((2+1)\)-dimensional black holes in exponential electrodynamics

The action function describing \((2+1)\)-dimensional Einstein’s gravity in the presence of NED is given by [34]

$$\begin{aligned} I=\int d^3x\sqrt{-g}\bigg [\frac{1}{2\pi }\bigg (R-\frac{2}{3}\Lambda \bigg ) + {\mathcal {L}}\bigg ], \end{aligned}$$
(2.1)

where the Lagrangian density of electromagnetic field is

$$\begin{aligned} {\mathcal {L}}({\mathcal {F}})=-{\mathcal {F}}\exp {(-\beta {\mathcal {F}})}, \end{aligned}$$
(2.2)

and \({\mathcal {F}}=F_{\mu \nu }F^{\mu \nu }=(\mathbf{B }^2-\mathbf{E }^2)/2\), \(\beta \) is the nonlinearity parameter and should be taken positive, \(F_{\mu \nu }\) is the electromagnetic field tensor, and B and E denote the magnetic and electric fields. Variation of action (2.1) with respect to the four potential \(A_{\mu }\) yields the equations of motion corresponding to NED as

$$\begin{aligned} \partial _{\mu }\bigg [\sqrt{-g}F^{\mu \nu }\big (1-\beta {\mathcal {F}}\big )\exp {(-\beta {\mathcal {F}})}\bigg ]=0. \end{aligned}$$
(2.3)

Similarly, by varying (2.1) with respect to the metric tensor \(g_{\mu \nu }\), we can obtain gravitational field equations as

$$\begin{aligned} R^{\nu }_{\mu }-\frac{1}{2}\delta ^{\nu }_{\mu }R+\frac{1}{3}\Lambda \delta ^{\nu }_{\mu }=\pi T^{\nu }_{\mu }, \end{aligned}$$
(2.4)

where \(R^{\nu }_{\mu }\) is the Ricci tensor, R is the Ricci scalar, \(\Lambda \) is the cosmological constant and \(T^{\nu \mu }\) represents the matter tensor of NED given by

$$\begin{aligned} T^{\mu \nu }=\exp {(-\beta {\mathcal {F}})}\bigg [(\beta {\mathcal {F}}-1)F^{\mu \lambda }F_{\lambda }^{\nu }+{\mathcal {F}} g^{\mu \nu }\bigg ]. \end{aligned}$$
(2.5)

The trace of the above matter tensor is

$$\begin{aligned} T=-4\beta {\mathcal {F}}^2\exp {(-\beta {\mathcal {F}})}, \end{aligned}$$
(2.6)

which clearly shows the breaking of conformal invariance in this theory. However, by applying the limit \(\beta \rightarrow 0\), this trace vanishes which implies that Maxwell’s theory can be recovered in this limit.

In order to derive the circularly symmetric magnetically charged \((2+1)\)-black hole solution, first we choose the pure magnetic field such that \(\mathbf{E }=0\). This implies that Maxwell’s invariant would be equal to \({\mathcal {F}}=\mathbf{B }^2/2=q^2/2r^4\) [46], where q represents the magnetic charge. Now, the line element ansatz in \((2+1)\)-dimensional spacetime can be taken as

$$\begin{aligned} ds^2=-\psi (r)dt^2+\frac{dr^2}{\psi (r)}+r^2 d\theta ^2. \end{aligned}$$
(2.7)

Using the Lagrangian density (2.2) of NED, the components of matter tensor (2.5) can be calculated as follows:

$$\begin{aligned} T^{0}_{0}=&\,\frac{q^2}{2r^4}\exp {\bigg (-\frac{\beta q^2}{2r^4}\bigg )}, \end{aligned}$$
(2.8)
$$\begin{aligned} T^{1}_{1}=&\,T^{2}_{2}=\exp {\bigg (-\frac{\beta q^2}{2r^4}\bigg )}\bigg [\frac{q^2}{r^2\psi (r)}\bigg (\frac{q^2\beta }{2r^4}-1\bigg )+\frac{q^2}{2r^4}\bigg ]. \end{aligned}$$
(2.9)

From the line element (2.7), the 00-component of Einstein’s equations (2.4) gives

$$\begin{aligned} \frac{1}{2r}\frac{d\psi }{dr}+\frac{\Lambda }{3}=\frac{\pi q^2}{2r^4}\exp {\bigg (-\frac{\beta q^2}{2r^4}\bigg )}. \end{aligned}$$
(2.10)

Solving the above differential equation yields

$$\begin{aligned} \psi (r)=D+\frac{r^2}{3l^2}-\frac{q\pi ^{\frac{3}{2}}}{\sqrt{\beta }2^{\frac{3}{2}}}E\bigg (\frac{q\sqrt{\beta }}{\sqrt{2}r^2}\bigg ), \end{aligned}$$
(2.11)

where we choose \(\Lambda =-1/l^2\), l being a real parameter and E(x) is the error function. The constant D can be related to mass of the gravitating object at infinity by using the Brown–York formalism [33, 46, 53]. With the use of quasilocal mass formulation, a static circularly symmetric \((2+1)\)-dimensional line element takes the form [34]

$$\begin{aligned} ds^2=-f(r)^2dt^2+\frac{dr^2}{g(r)^2}+r^2 d\theta ^2. \end{aligned}$$
(2.12)

This yields the quasilocal mass \(M_{QL}\) in the form

$$\begin{aligned} M_{QL}=\lim _{r_{b}\rightarrow \infty }2f(r_b)[g_r(r_b)-g(r_b)]. \end{aligned}$$
(2.13)

In the above expression, \(g_r(r_b)\) stands for an arbitrary non-negative reference function which allows the zeros of the energy in the spacetime. The value \(r_b\) denotes the radius of some spacelike hypersurface. From the form of our line element (2.7), it can be clearly seen that

$$\begin{aligned} f(r)=g(r)=\sqrt{D+\frac{r^2}{3l^2}-\frac{q\pi ^{\frac{3}{2}}}{\sqrt{\beta }2^{\frac{3}{2}}}E\bigg (\frac{q\sqrt{\beta }}{\sqrt{2}r^2}\bigg )}, \end{aligned}$$
(2.14)

and

$$\begin{aligned} g_r(r)=\sqrt{\frac{r^2}{3l^2}-\frac{q\pi ^{\frac{3}{2}}}{\sqrt{\beta }2^{\frac{3}{2}}}E\bigg (\frac{q\sqrt{\beta }}{\sqrt{2}r^2}\bigg )}. \end{aligned}$$
(2.15)

Thus, by substituting the above Eqs. (2.14) and (2.15) in Eq. (2.13) the metric function (2.11) for choosing \(M>0\) becomes

$$\begin{aligned} \psi (r)=-M+\frac{r^2}{3l^2}-\frac{q\pi ^{\frac{3}{2}}}{\sqrt{\beta }2^{\frac{3}{2}}}E\bigg (\frac{q\sqrt{\beta }}{\sqrt{2}r^2}\bigg ). \end{aligned}$$
(2.16)

The asymptotic expression of the above metric function in the vicinity of infinity can be obtained as

$$\begin{aligned} \psi (r)=-M+\frac{r^2}{3l^2}-\frac{\pi q^2}{2r^2}+\frac{\pi \beta q^4}{12r^6}+O(r^{-10}). \end{aligned}$$
(2.17)

This shows that at infinity the spacetime is not Minkowskian and the solution (2.16) reduces to that of Einstein-Maxwell theory when \(\beta \rightarrow 0\). Similarly the asymptotic value of the metric function when \(r\rightarrow 0\) is calculated as

$$\begin{aligned} \psi (r)= & {} -M+\frac{r^2}{3l^2}-\frac{q\pi ^{\frac{3}{2}}}{\sqrt{\beta }2^{\frac{3}{2}}} +\exp {\bigg (-\frac{\beta q^2}{2r^4}\bigg )}\nonumber \\&\times \bigg [\frac{\pi r^2}{2\beta }-\frac{\pi r^6}{2\beta ^2q^2}+O(r^{10})\bigg ]. \end{aligned}$$
(2.18)

Note that in calculating the above expansion we used the relation

$$\begin{aligned} E(x)=1-\frac{1}{\sqrt{\pi }}\Gamma (1/2,x^2), \end{aligned}$$
(2.19)

where \(\Gamma (s,x)\) refers to the incomplete Gamma function. The asymptotic expansion (2.18) shows that the metric function is finite at the centre \(r=0\). This behaviour of metric functions is a consequence of the nonlinear electromagnetic nature of Lagrangian density (2.2). It should also be noted that the limit \(\beta \rightarrow 0\) cannot be taken for (2.18) and hence the apparent singularity in this case is fake.

The weak energy condition (WEC) would be fulfilled if and only if the energy density \(\rho =T^{0}_{0}\) and principle pressures \(p_m=-T^m_m\) (there is no summation in the index m) satisfy

$$\begin{aligned} \rho \ge 0, \quad \rho +p_m\ge 0,\quad m=1,2. \end{aligned}$$
(2.20)

The satisfaction of WEC ensures that any local observer measures the non-negative energy density. It is also worthwhile to note that the above WEC is equivalent to the \(T_{\mu \nu }\zeta ^{\mu }\zeta ^{\nu }\) for any timelike vector \(\zeta ^{\mu }\) [1, 43, 46]. Thus, from Eqs. (2.9) and (2.20), one can easily verify that WEC holds for any value of magnetic field \(\mathbf{B }\) such that \(\beta \mathbf{B }^2\le 2\). Validity of the dominant energy condition (DEC) [1, 43, 46] is governed by the conditions

$$\begin{aligned} \rho \ge 0,\quad \rho +p_m\ge 0,\quad \rho -p_m\ge 0,\qquad m=1,2. \end{aligned}$$
(2.21)

Again from Eq. (2.9) one can prove that DEC also holds if \(\beta \digamma \le 1\) for the Lagrangian density (2.2). This shows that speed of sound would be always less than the speed of light. Similarly, validity of the strong energy condition (SEC) [1, 43, 46] is given by

$$\begin{aligned} \rho +p_1+p_2\ge 0. \end{aligned}$$
(2.22)

Using the energy–momentum tensor components one can conclude that SEC holds for this model of electrodynamics if the exponential magnetic field satisfies the inequality

$$\begin{aligned} \mathbf{B }\le \sqrt{\frac{2}{\beta }-\frac{\psi (r)}{2r^2\beta }}. \end{aligned}$$
(2.23)

The satisfaction of SEC implies that there is no acceleration of the universe in the model of nonlinear electromagnetic field coupled to the gravitational field [43].

Now, we discuss the nature of singularity of our resulting solution described by Eqs. (2.7) and (2.16), for which we will calculate the curvature invariants. It is possible to find out the Ricci scalar from Einstein’s equations describing gravitational field i.e. Eq. (2.4) so that

$$\begin{aligned} R=-\frac{2}{l^2}+\frac{2\pi q^4\beta }{r^4}\exp {\bigg (-\frac{\beta q^2}{2r^4}\bigg )}. \end{aligned}$$
(2.24)

This expression of the Ricci scalar implies that it is defined and finite at \(r=0\). The finiteness of Ricci scalar shows that at any point say \(r_0\) for which \(R(r_0)=0\), one can find the change in curvature around such a point. So one may encounter a transition from negative curvature to positive. One can also find the Kretschmann scalar \({\mathcal {K}}\) for the metric (2.7) in the form

$$\begin{aligned} {\mathcal {K}}=\frac{2}{r^2}\bigg (\frac{d\psi }{dr}\bigg )^2+\bigg (\frac{d^2\psi }{dr^2}\bigg )^2. \end{aligned}$$
(2.25)

Now from Eq. (2.17) we have

$$\begin{aligned} \frac{d\psi }{dr}=\frac{2r}{3l^2}+\frac{q^2\pi }{r^3}\exp {\bigg (-\frac{\beta q^2}{2r^4}\bigg )}, \end{aligned}$$
(2.26)

and

$$\begin{aligned} \frac{d^2\psi }{dr^2}= & {} \frac{2}{3l^2}-\frac{3q^2\pi }{r^4}\exp {\bigg (-\frac{\beta q^2}{2r^4}\bigg )}\nonumber \\&-\frac{2q^4\beta \pi }{r^8}\exp {\bigg (-\frac{\beta q^2}{2r^4}\bigg )}. \end{aligned}$$
(2.27)

Hence, the asymptotic expansion of Kretschmann scalar at \(r\rightarrow \infty \) is given by

$$\begin{aligned} {\mathcal {K}}=\frac{4}{3l^4}-\frac{4\pi q^2}{3l^2r^4}+\frac{(11\pi ^2q^4l^2-2\pi q^4\beta )}{l^2r^8}+O(r^{-11}).\nonumber \\ \end{aligned}$$
(2.28)

The expression of the Ricci scalar (2.24) and the above expansion of Kretschmann scalar show that the spacetime is not asymptotically flat since \(\lim _{r\rightarrow \infty }\mathcal {K}(r)=4/3l^4\). The asymptotic expression of Kretschmann scalar in the vicinity of \(r=0\) is given by

$$\begin{aligned} {\mathcal {K}}= & {} \frac{4}{3l^4}-\exp {\bigg (\frac{-q^2\beta }{2r^4}\bigg )}\bigg (\frac{4\pi q^2}{3l^2r^4}+\frac{8\pi \beta q^4}{3l^2r^8}+O(r^{11})\bigg )\nonumber \\&+\exp {\bigg (\frac{-q^2\beta }{r^4}\bigg )}\bigg (\frac{4\pi ^2 q^8\beta ^2}{r^{16}}\nonumber \\&+\frac{12\pi ^2 q^6\beta }{r^{12}}+\frac{11\pi ^2q^4}{r^8}+O(r^3)\bigg ), \end{aligned}$$
(2.29)

which is regular at the origin. Thus our resulting \((2+1)\)-dimensional black hole solutions within exponential electrodynamics, i.e., Eq. (2.16) describe a family of regular black holes.

The event horizons can be obtained from the condition \(\psi (r)=0\), which implies that

$$\begin{aligned} M=\frac{r_{h}^2}{3l^2}-\frac{q\pi ^{\frac{3}{2}}}{2\sqrt{2\beta }}E\bigg (\frac{q\sqrt{\beta }}{\sqrt{2}r_{h}^2}\bigg ). \end{aligned}$$
(2.30)
Fig. 1
figure 1

Plot of function M from Eq. (2.30) for fixed value of \(l=0.5\) and different values of q and \(\beta \)

Figure 1 shows clearly that there exists a critical value \(r_c\) below which no event horizon corresponding to the value of M can exist as mass becomes negative. However, for all values of \(r_h\) greater than the critical value, there exist event horizons associated with the positive value of mass M. Figure 2 shows the plot of metric function (2.16) for different values of mass, magnetic charge and nonlinearity parameter. It can be clearly seen that the magnetic charge and parameter \(\beta \) affect the horizon structure of \((2+1)\)-dimensional black hole.

Fig. 2
figure 2

Plot of function \(\psi (r)\) from Eq. (2.16) for fixed values of \(l=0.5\) and three different values of M, q and \(\beta \)

3 Thermodynamics of magnetically charged black holes

Here we study thermodynamics of the black hole solutions described by Eq. (2.16). For doing this we use an alternative method to determine the local Hawking temperature with the help of the Unruh effect in curved spacetime [55,56,57]. A similar analysis was also introduced in Ref. [58] for d-dimensional black holes in the framework of Einstein-power-Maxwell theory. In the Unruh effect the observer in the spacetime exterior to the black hole observes a thermal state with local temperature defined as

$$\begin{aligned} T_{H}(r)=\frac{2}{\pi \sqrt{-X^aX_a}}\frac{d\psi (r_{h})}{dr_{h}}, \end{aligned}$$
(3.1)

which on using Eq. (2.16) becomes

$$\begin{aligned} T_{H}(r)=\frac{2}{\pi \sqrt{\psi (r)}}\bigg [\frac{2r_h}{3l^2}+\frac{q^2\pi }{r_{h}^3}\exp {\bigg (-\frac{\beta q^2}{2r^4_{h}}\bigg )}\bigg ]. \end{aligned}$$
(3.2)

Here \(X^a\) represents a Killing vector field that generates the outer horizon \(r_h\). This expression of local Hawking temperature implies that at \(r\rightarrow r_{h}\), \(T_{H}(r)\) is undefined and at \(r\rightarrow \infty \), it is zero. This behaviour of temperature is expected since our resulting black hole solution (2.16) is not asymptotically flat, thus the local Hawking temperature vanishes at infinity. By using the method described in Refs. [34, 57], the re-energized temperature can be obtained as

$$\begin{aligned} T_{\infty }=\frac{2}{\pi }\bigg [\frac{2r_h}{3l^2}+\frac{q^2\pi }{r_{h}^3}\exp {\bigg (-\frac{\beta q^2}{2r^4_{h}}\bigg )}\bigg ]. \end{aligned}$$
(3.3)

By using the Brown–York quasilocal energy formalism [33, 46, 53], we can express the internal energy of the system on a constant t hypersurface as

$$\begin{aligned} \Xi =-2\left( \sqrt{\psi (r_b)}-\frac{r_b}{\sqrt{3}l}\right) , \end{aligned}$$
(3.4)

where \(r=r_{b}\) is a finite boundary of the black hole spacetime. By varying the internal energy \(\Xi (r_b)\) with respect to \(r_b\) and q, one can easily arrive at the first law

$$\begin{aligned} d\Xi (r_b)=T_H(r_b)dS+\Psi (r_b)dq, \end{aligned}$$
(3.5)

where

$$\begin{aligned} T_H(r_b)=\frac{-1}{\sqrt{\psi (r_b)}}\bigg [\frac{r_h}{6\pi l^2}+\frac{q^2}{4r^3_h}\exp {\bigg (-\frac{\beta q^2}{2r^4_{h}}\bigg )}\bigg ], \end{aligned}$$
(3.6)

is the Hawking temperature evaluated at \(r_b\), and \(S=4\pi r_h\) in Eq. (3.5) is the entropy of the \((2+1)\)-dimensional black hole. The function

$$\begin{aligned} \Psi (r_b)= & {} \frac{1}{\sqrt{\psi (r_b)}}\bigg [\frac{\pi q}{2r^2_b}\exp {\bigg (-\frac{\beta q^2}{2r^4_{b}}\bigg )}\nonumber \\&+\frac{\pi \sqrt{\pi }}{2\sqrt{2\beta }}E\bigg (\frac{q\sqrt{\beta }}{\sqrt{2}r_b^2}\bigg )\bigg ], \end{aligned}$$
(3.7)

is the magnetic potential difference between the boundary of the black hole and at infinity. Similarly, the difference between the potential at the event horizon and boundary \(r_b\) can also be calculated as

$$\begin{aligned} \Phi (r_b)= & {} \frac{\pi }{2\sqrt{\psi (r_b)}}\bigg [\frac{q}{r^2_b}\exp {\bigg (-\frac{\beta q^2}{2r^4_{b}}\bigg )}+\frac{\sqrt{\pi }}{\sqrt{2\beta }}E\bigg (\frac{q\sqrt{\beta }}{\sqrt{2}r_b^2}\bigg )\nonumber \\&-\frac{q}{r^2_h}\exp {\bigg (-\frac{\beta q^2}{2r^4_{h}}\bigg )}-\frac{\sqrt{\pi }}{\sqrt{2\beta }}E\bigg (\frac{q\sqrt{\beta }}{\sqrt{2}r_h^2}\bigg )\bigg ]. \end{aligned}$$
(3.8)

Now, we compute the expression of heat capacity at a constant magnetic charge q of our magnetically charged black holes which are considered inside a box and bounded by \(r=r_b\). The heat capacity is defined by

$$\begin{aligned} C_{q}= T_{H}\frac{\partial S}{\partial T_{H}}|_{q}=\frac{4\pi T_{H} }{\frac{\partial T_{H}}{\partial r_{h}}}|_{q}. \end{aligned}$$
(3.9)

Therefore, by using Eq. (3.6) in this we get

$$\begin{aligned} C_{q}=\frac{\pi r^5_h\bigg (8r_h^4+12l^2q^2\pi \exp {\bigg (-\frac{\beta q^2}{2r^4_{h}}\bigg )}\bigg )}{2r^8_h+6\pi q^4\beta l^2\exp {\bigg (-\frac{\beta q^2}{2r^4_{h}}\bigg )}-9\pi q^2l^2r^4_h\exp {\bigg (-\frac{\beta q^2}{2r^4_{h}}\bigg )}}. \nonumber \\ \end{aligned}$$
(3.10)

This represents the general expression for black hole’s heat capacity for any value of nonlinear electrodynamics parameter \(\beta \).

Fig. 3
figure 3

Plot of function \(C_q\) from Eq. (3.10) for fixed value of \(l=0.5\) and different values of q and \(\beta \)

Figure 3 shows the plot of heat capacity for different values of NED parameter \(\beta \) and magnetic charge q. One can see that both the parameter \(\beta \) and magnetic charge q have effects on the local thermal stability of black holes. The value of \(r_h\) at which the heat capacity is positive implies the black hole of that horizon radius is stable and physical. Thus, we conclude that the mentioned \((2+1)\)-dimensional black holes are enjoying thermal stability.

4 \((2+1)\)-dimensional black holes in arcsin electrodynamics

The action function for the model of nonlinear electrodynamics coupled with general relativity in three dimensions is written in the form (2.1). Here we will take the Lagrangian density \({\mathcal {L}}({\mathcal {F}})\) of the form

$$\begin{aligned} {\mathcal {L}}({\mathcal {F}})=-\frac{1}{\beta }\arcsin {(\beta {\mathcal {F}})}. \end{aligned}$$
(4.1)

The nonlinear electromagnetic field equations can be obtained from variation of (2.1) with respect to \(A_{\mu }\) as

$$\begin{aligned} \partial _{\mu }\bigg (\frac{\sqrt{-g}F^{\mu \nu }}{\sqrt{1-(\beta {\mathcal {F}})^2}}\bigg )=0. \end{aligned}$$
(4.2)

The gravitational field equations will have the same form as (2.4), however, the matter tensor in this case will be written as

$$\begin{aligned} T^{\nu }_{\mu }=-\frac{F^{\nu \lambda }F_{\mu \lambda }}{\sqrt{1-(\beta {\mathcal {F}})^2}}-\delta ^{\nu }_{\mu }{\mathcal {L}}. \end{aligned}$$
(4.3)

The trace of the above matter tensor can be worked out as

$$\begin{aligned} T=-\frac{4{\mathcal {F}}}{\sqrt{1-(\beta {\mathcal {F}})^2}}+\frac{4}{\beta }\arcsin {(\beta {\mathcal {F}})}. \end{aligned}$$
(4.4)

Hence, like the exponential electrodynamics, the scale invariance is violated in arcsin electrodynamics too due to the above non-zero trace of the matter tensor. It should be noted that the trace (4.4) also vanishes in the limit \(\beta \rightarrow 0\) which implies that the arcsin electrodynamics reduces to Maxwell’s theory in the weak field limit. Since we are interested in electrically charged black hole solution, therefore, we should assume magnetic field \(\mathbf{B }=0\) which makes Maxwell’s invariant equal to \(\mathcal {F}=-(E(r))^2/2\). Thus from Eq. (4.2) on using the \((2+1)\)-dimensional line element (2.7), it is straightforward to obtain the value of electric field as

$$\begin{aligned} E(r)=\frac{\sqrt{2}}{Q\beta }\sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2}, \end{aligned}$$
(4.5)

where the integration constant Q represents the electric charge.

Fig. 4
figure 4

Plot of E(r) from Eq. (4.5) for fixed values of Q and \(\beta \)

The asymptotic expansion of electric field at \(r\rightarrow \infty \) is given by

$$\begin{aligned} E(r)=\frac{Q}{r}-\frac{Q^5\beta ^2}{8r^5}+O(r^{-7}). \end{aligned}$$
(4.6)

Similarly, the asymptotic expansion of electric field at \(r=0\) becomes

$$\begin{aligned} E(r)=\frac{\sqrt{2}}{\sqrt{\beta }}-\frac{r^2}{\sqrt{2}Q^2\beta ^{\frac{3}{2}}}+\frac{r^4}{4\sqrt{2}Q^4\beta ^{\frac{5}{2}}}+O(r^{5}). \end{aligned}$$
(4.7)

The electric potential A(r) can be easily obtained through integration of Eq. (4.5) as

$$\begin{aligned} A(r)= & {} \frac{1}{2\sqrt{2}}\bigg [r\sqrt{2}\sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2}\nonumber \\&-Q^2\beta \log {(\sqrt{r^4+\beta ^2Q^4}-r^2)}\bigg ]\nonumber \\&+Q^2\beta \log {[Q^2\beta (Q^2\beta +\sqrt{2}r\sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2})]}. \nonumber \\ \end{aligned}$$
(4.8)
Fig. 5
figure 5

Plot of function A(r) from Eq. (4.8) for fixed values of \(\beta \) and Q

One can also find the asymptotic value of electric potential at \(r\rightarrow \infty \) as

$$\begin{aligned} A(r)=Q\log {(r)}+\frac{Q^5\beta ^2}{32r^4}+O(r^{-6}). \end{aligned}$$
(4.9)

Similarly, the asymptotic value at \(r\rightarrow 0\) becomes

$$\begin{aligned} A(r)=\frac{Q}{2}\log {(\beta Q^2)}+\frac{\sqrt{2}r}{\sqrt{\beta }}-\frac{r^3}{3\sqrt{2}Q^2\beta ^{\frac{3}{2}}}+O(r^{5}).\nonumber \\ \end{aligned}$$
(4.10)

Eqs. (4.7) and (4.10) show that the electric field and potential are both finite at the origin \(r=0\) unlike in Maxwell’s theory where both of these quantities diverge at the origin. The finiteness of these quantities at the origin can also be observed from Figs.  4, 5. This non-Maxwellian behaviour of electric field and electric potential is due to the nonlinear electromagnetic nature of Lagrangian density (4.1). Using this Lagrangian density, the components of matter tensor (4.3) can be calculated as

$$\begin{aligned}&T^{0}_{0}=T^{1}_{1}=\frac{2E^2}{\sqrt{4-\beta ^2E^4}}-\frac{\arcsin {(\beta E^2/2)}}{\beta },\nonumber \\&T^{2}_{2}=-\frac{1}{\beta }\arcsin {(\beta E^2/2)}. \end{aligned}$$
(4.11)

Hence, by choosing the value of electric field as (4.5) in the above components one can show that WEC, SEC and DEC are satisfied for this model in \((2+1)\)-dimensional geometry. Substitution of the metric ansatz (2.7) and the matter tensor components (4.11) into field equations (2.4) yields

$$\begin{aligned} \frac{1}{2r}\frac{d\psi }{dr}+\frac{\Lambda }{3}=\pi \bigg [\frac{2E^2}{\sqrt{4-\beta ^2E^4}}-\frac{\arcsin {(\beta E^2/2)}}{\beta }\bigg ]. \end{aligned}$$
(4.12)

Upon solving the above differential equation, we can get the metric function as

$$\begin{aligned} \psi (r)= & {} D+\frac{r^2}{3l^2}+\frac{\pi r(Q^2+2)}{\beta Q^2}\sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2}\nonumber \\&+\frac{\pi r^2}{\beta }\arcsin {\bigg (\frac{r^2-\sqrt{r^4+\beta ^2Q^4}}{\beta Q^2}\bigg )}\nonumber \\&+\pi \tanh ^{-1}{\bigg (\frac{r\sqrt{2}\sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2}}{Q^2\beta }\bigg )}\nonumber \\&+\frac{Q^2\pi }{2}\log {\bigg (\frac{\sqrt{Q^4\beta ^2+2r^2(r^2-\sqrt{r^4+\beta ^2Q^4})}}{Q^2\beta +r\sqrt{2}\sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2}}\bigg )}, \nonumber \\ \end{aligned}$$
(4.13)

where D is the integration constant and \(\Lambda =-1/l^2\). Now again with the help of quasilocal mass formalism, a static circularly symmetric three-dimensional line element yields a quasilocal mass \(M_{QL}\) in the form (2.13). And so, from line element (2.7) we obtain

$$\begin{aligned} f(r)^2= & {} g(r)^2=D+\frac{r^2}{3l^2}+\frac{\pi r(Q^2+2)}{\beta Q^2}\nonumber \\&\times \sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2}+\frac{\pi r^2}{\beta }\nonumber \\&\times \arcsin {\bigg (\frac{r^2-\sqrt{r^4+\beta ^2Q^4}}{\beta Q^2}\bigg )}\nonumber \\&+\pi \tanh ^{-1}{\bigg (\frac{r\sqrt{2}\sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2}}{Q^2\beta }\bigg )}\nonumber \\&+\frac{Q^2\pi }{2}\log {\bigg (\frac{\sqrt{Q^4\beta ^2+2r^2(r^2-\sqrt{r^4+\beta ^2Q^4})}}{Q^2\beta +r\sqrt{2}\sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2}}\bigg )}, \nonumber \\ \end{aligned}$$
(4.14)

and

$$\begin{aligned} g_r(r)^2= & {} \frac{r^2}{3l^2}+\frac{\pi r(Q^2+2)}{\beta Q^2}\sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2}\nonumber \\&+\frac{\pi r^2}{\beta }\arcsin {\bigg (\frac{r^2-\sqrt{r^4+\beta ^2Q^4}}{\beta Q^2}\bigg )}\nonumber \\&+\pi \tanh ^{-1}{\bigg (\frac{r\sqrt{2}\sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2}}{Q^2\beta }\bigg )}\nonumber \\&+\frac{Q^2\pi }{2}\log {\bigg (\frac{\sqrt{Q^4\beta ^2+2r^2(r^2-\sqrt{r^4+\beta ^2Q^4})}}{Q^2\beta +r\sqrt{2}\sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2}}\bigg )}. \nonumber \\ \end{aligned}$$
(4.15)

Thus, by using the above Eqs. (4.15) and (4.16) in Eq. (2.13), the metric function (4.13) becomes

$$\begin{aligned} \psi (r)= & {} -M+\frac{r^2}{3l^2}+\frac{\pi r(Q^2+2)}{\beta Q^2}\sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2}\nonumber \\&+\frac{\pi r^2}{\beta }\arcsin {\left( \frac{r^2-\sqrt{r^4+\beta ^2Q^4}}{\beta Q^2}\right) }\nonumber \\&+\pi \tanh ^{-1}{\left( \frac{r\sqrt{2}\sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2}}{Q^2\beta }\right) }\nonumber \\&+\frac{Q^2\pi }{2}\log {\left( \frac{\sqrt{Q^4\beta ^2+2r^2(r^2-\sqrt{r^4+\beta ^2Q^4})}}{Q^2\beta +r\sqrt{2}\sqrt{\sqrt{r^4+\beta ^2Q^4}-r^2}}\right) }. \nonumber \\ \end{aligned}$$
(4.16)

The asymptotic expansion for the above metric function when \(r\rightarrow \infty \) can be computed as

$$\begin{aligned} \psi (r)= & {} -M+\frac{r^2}{3l^2}+\sqrt{2}\pi \bigg (1+\frac{Q^2}{2} +\frac{Q^2}{2\sqrt{2}}\nonumber \\&\times \log {\bigg (\frac{Q^2}{4}\bigg )}\bigg )-\pi Q^2\log (r)\nonumber \\&+\frac{\beta ^2 Q^4\pi }{16r^4}\bigg (\frac{Q^2}{6}+3-\sqrt{2}(Q^2+2)\bigg )+O(r^{-5}). \nonumber \\ \end{aligned}$$
(4.17)

The above expression shows that the black hole is not asymptotically flat at infinity. Similarly, the asymptotic behaviour in the vicinity of \(r=0\) is given by the series expansion

$$\begin{aligned} \psi (r)= & {} -M+\frac{\pi }{\sqrt{\beta }}\bigg (\frac{\sqrt{2}}{Q} -\frac{Q}{\sqrt{2}}+\frac{Q^2+2}{Q}\bigg )r\nonumber \\&+\bigg (\frac{1}{3l^2}-\frac{\pi ^2}{2\beta }\bigg )r^2+O(r^3). \end{aligned}$$
(4.18)

This shows that the metric function remains finite and regular at the origin \(r=0\). It is possible to find out the Ricci scalar from field equations (2.4) as

$$\begin{aligned} R= & {} -\pi T-\frac{4}{3l^2}=\frac{4\pi }{\beta }\arcsin {\bigg (\frac{\sqrt{r^4+Q^4\beta ^2}-r^2}{Q^2\beta }\bigg )}-\frac{4}{3l^2}\nonumber \\&-\frac{4\pi \bigg (\sqrt{r^4+Q^4\beta ^2}-r^2\bigg )}{\beta \sqrt{Q^4\beta ^2-\bigg (\sqrt{r^4+Q^4\beta ^2}-r^2\bigg )^2}}. \end{aligned}$$
(4.19)

The asymptotic value of Ricci scalar at radial infinity is given by

$$\begin{aligned} R=-\frac{4}{3l^2}+O(r^{-5}). \end{aligned}$$
(4.20)

This clearly indicates that at \(r\rightarrow \infty \) the Ricci scalar is non-zero which means that the spacetime is not asymptotically flat. Similarly, the asymptotic value of Ricci scalar at \(r\rightarrow 0\) is calculated as

$$\begin{aligned} R= & {} -\frac{2\sqrt{2}Q\pi }{\sqrt{\beta }r}-\frac{4}{3l^2}\nonumber \\&+\frac{2\pi ^2}{\beta }-\frac{3\sqrt{2}\pi r}{Q\beta ^{\frac{3}{2}}}+\frac{5\pi r^3}{6\sqrt{2}Q^3\beta ^{\frac{5}{2}}}+O(r^{5}). \end{aligned}$$
(4.21)

This expansion shows that the Ricci scalar possesses singularity at \(r=0\). Thus, our resulting \((2+1)\)-dimensional black hole solution (4.16) has a true curvature singularity at \(r=0\).

5 Thermodynamics of electrically charged black holes

In order to study thermodynamics corresponding to \((2+1)\)-dimensional electrically charged black hole (4.16), we will calculate important thermodynamic quantities. Following the same technique as before we can obtain the local Hawking temperature in this case as

$$\begin{aligned} T_{H}(r)= & {} \frac{2}{\pi \sqrt{\psi (r)}}\left[ \frac{2r_h}{3l^2} \right. \nonumber \\&+2\pi \left( \frac{2r_{h}(\sqrt{r_{h}^4+Q^4\beta ^2}-r^2_{h})}{\sqrt{\beta }Q^2\sqrt{Q^4\beta ^3-(\sqrt{r_{h}^4+Q^4\beta ^2}-r^2_{h})^2}}\right. \nonumber \\&-\left. \left. \frac{r_h}{\beta }\arcsin {\left( \frac{\sqrt{r_{h}^4+Q^4\beta ^2}-r^2_{h}}{Q^2\beta }\right) }\right) \right] . \end{aligned}$$
(5.1)

Here also \(X^a\) is a Killing vector field which generates the outer horizon \(r_h\). The event horizon equation \(\psi (r)=0\) implies that

$$\begin{aligned} M= & {} \frac{r_{h}^2}{3l^2}+\frac{\pi r_h(Q^2+2)}{\beta Q^2}\sqrt{\sqrt{r_{h}^4+\beta ^2Q^4}-r_{h}^2}\nonumber \\&+\frac{\pi r_{h}^2}{\beta }\arcsin {\bigg (\frac{r_{h}^2-\sqrt{r_{h}^4+\beta ^2Q^4}}{\beta Q^2}\bigg )}\nonumber \\&+\pi \tanh ^{-1}{\left( \frac{r_{h}\sqrt{2}\sqrt{\sqrt{r_{h}^4+\beta ^2Q^4}-r_{h}^2}}{Q^2\beta }\right) }\nonumber \\&+\frac{Q^2\pi }{2}\log {\left( \frac{\sqrt{Q^4\beta ^2+2r_{h}^2(r_{h}^2-\sqrt{r_{h}^4+\beta ^2Q^4})}}{Q^2\beta +r_{h}\sqrt{2}\sqrt{\sqrt{r_{h}^4+\beta ^2Q^4}-r_{h}^2}}\right) }.\nonumber \\ \end{aligned}$$
(5.2)
Fig. 6
figure 6

Plot of mass M from Eq. (5.2) for specific value of \(l=0.5\) and different values of Q and \(\beta \)

Figure 6 shows the behaviour of M in terms of horizon radius. Those values of \(r_h\) which corresponds to the positive values of M describes the horizons of black hole. Similarly, by choosing different values of mass M, electric charge Q and nonlinearity parameter \(\beta \), we have plotted the metric function (4.16) in Fig. 7. Those values of r for which the curve intersects the r-axis indicate the location of horizons.

Fig. 7
figure 7

Plot of metric function \(\psi (r)\) from Eq. (4.16) for specific value of \(l=1\) and different values of M, Q and \(\beta \)

The expression of local Hawking temperature (5.1) indicates that at \(r\rightarrow r_{h}\), it is undefined and at \(r\rightarrow \infty \) it is zero. This behaviour is expected because the black hole solution defined by (4.16) is not asymptotically flat, hence the temperature vanishes at infinity. By using the same method as described in Refs. [34, 57], the re-energized temperature is defined by

$$\begin{aligned} T_{\infty }&=\frac{2}{\pi }\left[ \frac{2r_h}{3l^2}+2\pi \right. \nonumber \\&\left. \left( \frac{2r_{h}(\sqrt{r_{h}^4+Q^4\beta ^2}-r^2_{h})}{\sqrt{\beta }Q^2\sqrt{Q^4\beta ^3-(\sqrt{r_{h}^4+Q^4\beta ^2}-r^2_{h})^2}}\right. \right. \nonumber \\&\left. \left. -\frac{r_h}{\beta }\arcsin {\left( \frac{\sqrt{r_{h}^4+Q^4\beta ^2}-r^2_{h}}{Q^2\beta }\right) }\right) \right] . \end{aligned}$$
(5.3)

Now, from the expression of internal energy (3.4) on a constant t hypersurface, it is easy to obtain the first law of thermodynamics by varying the internal energy with respect to \(r_h\) and Q, so that

$$\begin{aligned} d\Xi (r_b)=T_H(r_b)dS+\Psi (r_b)dQ, \end{aligned}$$
(5.4)

where

$$\begin{aligned}&T_H(r_b)\nonumber \\&\quad =\frac{1}{\sqrt{\psi (r_b)}}\left[ \frac{r_h}{2\beta }\arcsin {\left( \frac{\sqrt{r_{h}^4+\beta ^2Q^4}-r_{h}^2}{\beta Q^2}\right) }-\frac{r_h}{6\pi l^2}\right. \nonumber \\&\qquad \left. -\frac{r_h(\sqrt{r_{h}^4+\beta ^2Q^4}-r_{h}^2)}{\sqrt{\beta }Q^2\sqrt{Q^4\beta ^2-(\sqrt{r_{h}^4+\beta ^2Q^4}-r_{h}^2)^2}}\right] +\frac{1}{2\pi \sqrt{3}l},\nonumber \\ \end{aligned}$$
(5.5)

denotes the Hawking temperature evaluated at the boundary \(r=r_b\) and \(S=4\pi r_h\) in Eq. (5.4) is the entropy. Furthermore, the function

$$\begin{aligned} \Psi (r_b)=-\frac{\pi r_b H_{1}(Q,r_b)}{2\sqrt{\psi (r_b)}H_2(Q,r_b)}, \end{aligned}$$
(5.6)

where

$$\begin{aligned}&H_{1}(Q,r_b)=(2+\sqrt{2})Q^6(Q^2-2)\beta ^3+4(1-Q^2)r_b^3\nonumber \\&\times \left( \sqrt{Q^4\beta ^2+r_b^4}-r_b^2\right) ^{\frac{3}{2}}\nonumber \\&+8\beta Q^2r^2_b\left( \sqrt{Q^4\beta ^2+r_b^4}-r_b^2\right) \nonumber \\&-4\left( 1+\sqrt{2}\right) \beta ^2 Q^4r_b\sqrt{\sqrt{Q^4\beta ^2+r_b^4}-r_b^2}\nonumber \\&-2\beta ^2 Q^6r_b\sqrt{\sqrt{Q^4\beta ^2+r_b^4}-r_b^2}\nonumber \\&\times \left( \frac{\sqrt{2}r_b}{Q^2\beta }\sqrt{\sqrt{Q^4\beta ^2+r_b^4}-r_b^2}-1-\sqrt{2}\right) , \end{aligned}$$
(5.7)

and

$$\begin{aligned}&H_{2}(Q,r_b)=\beta Q^2\sqrt{\beta ^2 Q^4+r_b^4}\sqrt{\sqrt{Q^4\beta ^2+r_b^4}-r_b^2}\nonumber \\&\times \bigg (Q^2\beta +\sqrt{2}r_b\sqrt{\sqrt{Q^4\beta ^2+r_b^4}-r_b^2}\bigg )\nonumber \\&+2Q\log {\left( \frac{\sqrt{Q^4\beta ^2+2r_b^4-2r_b^2\sqrt{\beta ^2 Q^4+r_b^4}}}{\beta Q^2 +\sqrt{2}r_b\sqrt{\sqrt{Q^4\beta ^2+r_b^4}-r_b^2}}\right) }, \end{aligned}$$
(5.8)

is the electric potential difference between the boundary \(r_b\) and infinity. Similarly, the electric potential difference between horizon \(r_h\) and boundary \(r_b\) can be expressed as

$$\begin{aligned} \Phi (r_b)= & {} -\frac{\pi r_b H_{1}(Q,r_b)}{2\sqrt{\psi (r_b)}H_2(Q,r_b)}\nonumber \\&+\frac{1}{2\sqrt{2}}\left[ \sqrt{2}r_h\sqrt{\sqrt{Q^4\beta ^2+r_h^4}-r_h^2}-Q^2\beta \right. \nonumber \\&\times \log {\bigg (\sqrt{Q^4\beta ^2+r_h^4}-r_h^2\bigg )}+Q^2\beta \log \nonumber \\&\left. \times {\left[ Q^2\beta \bigg (Q^2\beta +\sqrt{2}r_h\sqrt{\sqrt{Q^4\beta ^2+r_h^4}-r_h^2}\bigg )\right] }\right] .\nonumber \\ \end{aligned}$$
(5.9)

Finally, the heat capacity in this case takes the form

$$\begin{aligned} C_{Q}=\frac{4\pi \bigg [r_h T_0-\frac{r_h}{6\pi l^2}\bigg ]}{\bigg [T_0+T_1+2r_h^2T_2-\frac{1}{6\pi l^2}\bigg ]}, \end{aligned}$$
(5.10)

where

$$\begin{aligned} T_{0}(r_{h})= & {} \frac{1}{2\beta }\arcsin {\bigg (\frac{\sqrt{Q^4\beta ^2+r_h^4}-r_h^2}{Q^2\beta }\bigg )}\nonumber \\&-\frac{\sqrt{Q^4\beta ^2+r_h^4}-r_h^2}{Q^2\sqrt{\beta }\sqrt{Q^4\beta ^2-\bigg (\sqrt{Q^4\beta ^2+r_h^4}-r_h^2\bigg )^2}},\nonumber \\ \end{aligned}$$
(5.11)
$$\begin{aligned} T_{1}(r_{h})= & {} \frac{r_h^2\bigg (\sqrt{Q^4\beta ^2+r_h^4}-r_h^2\bigg )}{\sqrt{Q^4\beta ^2+r_h^4}\sqrt{Q^4\beta ^2-\bigg (\sqrt{Q^4\beta ^2+r_h^4}-r_h^2\bigg )^2}}\nonumber \\&\times \bigg (\frac{2}{\sqrt{\beta }Q^2}-\frac{1}{\beta }\bigg ), \end{aligned}$$
(5.12)

and

$$\begin{aligned} T_{2}(r_{h})=\frac{\bigg (\sqrt{Q^4\beta ^2+r_h^4}-r_h^2\bigg )^3}{\sqrt{Q^4\beta ^2+r_h^4}\sqrt{\beta }Q^2\bigg (Q^4\beta ^2-\bigg (\sqrt{Q^4\beta ^2+r_h^4}-r_h^2\bigg )^2\bigg )^{\frac{3}{2}}}. \nonumber \\ \end{aligned}$$
(5.13)

Equation (5.10) is the general expression for black hole’s heat capacity for any value of nonlinear electrodynamics parameter \(\beta \).

Fig. 8
figure 8

Plot of function \(C_Q\) from Eq. (5.10) for fixed value of \(l=0.5\) and different values of Q and \(\beta \)

The behaviour of heat capacity for different values of charge Q and NED parameter \(\beta \) is shown in Fig. 8. The region where this quantity is positive guarantees local thermal stability. It can also be seen that both the charge Q and parameter \(\beta \) can affect the local thermodynamic stability and are giving us stable solutions.

6 Conclusion

There exist several models of NED which are useful in studying the gravitational fields of highly massive objects such as black holes. In recent decades, black holes of Einstein’s theory and modified gravities have been studied within the context of these NED models. In this paper, we have investigated \((2+1)\)-dimensional black holes in the framework of two different Born–Infeld type NED models. In the background of these NED models, the scale invariance has been violated because the associated matter tensor possesses non-zero trace. First, we derived magnetically charged \((2+1)\)-dimensional black hole solution in Einstein’s theory coupled to exponential electrodynamics. It is shown that the consideration of exponential electromagnetic field as a source of gravity makes the metric function (2.16) regular and finite at the origin \(r=0\). It is also shown that in the weak field limit \(r\rightarrow \infty \) or \(\beta \rightarrow 0\), the metric function (2.16) describes \((2+1)\)-dimensional black hole with a Maxwellian magnetic charge. The convergence of curvature invariants associated to (2.16) shows that the black hole is regular and there is no true curvature singularity at \(r=0\). In the second case, we derived electrically charged \((2+1)\)-dimensional black hole solution in Einstein’s theory coupled to arcsin electrodynamics. In this case too, the gravitational field equations are solved and the metric function (4.16) is derived. The asymptotic behaviours of resulting metric function at both radial infinity and at \(r=0\) are also discussed. Like the case of exponential electrodynamics, the arcsin electromagnetic source on the right side of gravitational field equations makes the metric function finite at the origin, which can be seen from the asymptotic value (4.18). Moreover, the asymptotic expression of metric function at infinity shows that for large values of r, the contributions of NED could be negligible and the resulting solution reduces to Maxwellian electrically charged \((2+1)\)-dimensional black hole. The curvature invariant, i.e., Ricci scalar was also calculated for the electrically charged black hole. The series expansion of this curvature invariant about \(r\rightarrow \infty \) shows that the object is not asymptotically flat while the corresponding series expansion about \(r\rightarrow 0\) indicates that there exists an essential curvature singularity at the central position.

The thermodynamic properties associated to the black hole solutions derived within the backgrounds of exponential and arcsin models of NED are also analysed. For doing this, we have computed entropy, temperature and heat capacity for both the black holes. It is shown that these quantities satisfy the first law.