1 Introduction

Solutions of the Einstein–Maxwell system of equations for static spherically symmetric interior spacetimes are important in describing charged compact objects in relativistic astrophysics where the gravitational field is strong, as in the case of neutron stars. The detailed analyses of Ivanov (2002) and Sharma et al. (2001) show that the presence of an electromagnetic field affects the values of redshifts, luminosities and maximum mass of compact objects. The role of the electromagnetic field in describing the gravitational behavior of stars composed of quark matter has been recently highlighted by Mak and Harko (2004) and Komathiraj and Maharaj (2007a, 2007b). In recent years, many researchers have attempted to introduce different approaches of finding solutions to the field equations. Hansraj and Maharaj (2006) found solutions to the Einstein–Maxwell system with a specified form of the electrical field with isotropic pressures. These solutions satisfy a barotropic equation of state and regain the model due to Finch and Skea (1989). Thirukkanesh and Maharaj (2008) found new exact classes of solutions to the Einstein–Maxwell system. They considered anisotropic pressures in the presence of the electromagnetic field with the linear equation of state of strange stars with quark matter. Other recent investigations involving charged relativistic stars include the results of Karmakar et al. (2007), Maharaj and Komathiraj (2007) and Maharaj and Thirukkanesh (2009). The approach of Esculpi and Aloma (2010) is interesting in that it utilizes the existence of a conformal symmetry in the spacetime manifold to find a solution. These exact solutions are relevant in the description of dense relativistic astrophysical objects. Applications of charged relativistic models include studies in cold compact objects by Sharma et al. (2006), analyses of strange matter and binary pulsars by Sharma and Mukherjee (2001), and analyses of quark–diquark mixtures in equilibrium by Sharma and Mukherjee (2002). Thomas et al. (2005), Tikekar and Thomas (1998) and Paul and Tikekar (2005) modeled charged core-envelope stellar structures in which the core of the sphere is an isotropic fluid surrounded by a layer of anisotropic fluid. To get more flexibility in solving the Einstein–Maxwell system, Varela et al. (2010) considered a general approach of dealing with anisotropic charged matter with linear or nonlinear equations of state. Their approach offers a fresh view of relationships between the equation of state, charge distributions and pressure anisotropy. A detailed physical analysis showed the desirability of models with an equation of state. However, there are few models in the literature with an equation of state which satisfy the physical criteria.

It is desirable that the criteria for physical acceptability, as given in Delgaty and Lake (1998), be satisfied in a realistic charged stellar model. In particular, the proper charge density should be regular at the center of the sphere. This is an essential requirement for a well behaved electromagnetic field, and this important feature has been highlighted in the treatment of Varela et al. (2010). In many models found in the past, including the charged anisotropic solution with a linear equation of state of Thirukkanesh and Maharaj (2008), the proper charge density is singular at the center of the star. For a realistic description this is a limiting feature for the applicability of the model. It is desirable to avoid this singularity if possible. Our object in this paper is to generate new solutions to the Einstein–Maxwell system which satisfy the physical properties: the gravitational potentials, electric field intensity, charge distribution and matter distribution should be well behaved and regular throughout the star, in particular at the stellar center. We find new exact solutions for a charged relativistic sphere with anisotropic pressures and a linear equation of state. Previous models are shown to be special cases of our general result. In Sect. 2, we rewrite the Einstein–Maxwell field equation for a static spherically symmetric line element as an equivalent set of differential equations using a transformation due to Durgapal and Bannerji (1983). In Sect. 3, we motivate the choice of the gravitational potential and the electric field intensity that enables us to integrate the field equations. In Sect. 4, we present new exact solutions to the Einstein–Maxwell system, which contain earlier results. The singularity in the charge density may be avoided. In Sect. 5, a physical analysis of the new solutions is performed; the matter variables and the electromagnetic quantities are plotted. Values for the stellar mass are generated for charged and uncharged matter for particular parameter values. The values are consistent with the conclusions of Dey et al. (1998, 1999a, 1999b) for strange stars. The variation of density for different charged compact structures is discussed in Sect. 6. We summarize the results obtained in this paper in Sect. 7.

2 Basic equations

In standard coordinates the line element for a static spherically symmetric fluid has the form

$$ {\rm d} s^{2} = -e^{2\nu(r)} {\rm d} t^{2} + e^{2\lambda(r)} {\rm d} r^{2} + r^{2}\bigl( {\rm d} \theta^{2} + \sin^{2}{\theta} {\rm d} \phi^{2} \bigr). $$
(1)

The Einstein–Maxwell equations take the form

(2)
(3)
(4)
(5)

where dots represent differentiation with respect to r. It is convenient to introduce a new independent variable x and introduce new functions y and Z:

$$ x = Cr^2,\qquad Z(x) = e^{-2\lambda(r)}, \qquad A^{2}y^{2}(x) = e^{2\nu(r)}, $$
(6)

where A and C are constants. We assume a barotropic equation of state,

$$ p_r = \alpha \rho - \beta, $$
(7)

relating the radial pressure p r to the energy density ρ. The quantity p t is the tangential pressure, E represents the electric field intensity, and σ is the proper charge density. Then the equations governing the gravitational behavior of a charge anisotropic sphere, with a linear equation of state, are given by

(8)
(9)
(10)
(11)
(12)
(13)

where Δ=p t p r is called the measure of anisotropy. The nonlinear system as given in (8)–(13) consists of six independent equations in the eight variables ρ,p r ,p t ,Δ,E,σ, y and Z. To solve (8)–(13) we need to specify two of the quantities involved in the integration process.

3 Choice of potentials

We need to solve the Einstein–Maxwell field equations (8)–(13) by choosing specific forms for the gravitational potential Z and the electric field intensity E which are physically reasonable. Then Eq. (12) becomes a first order equation in the potential y which is integrable.

We make the choice

(14)

where a and b are real constants. The quantity Z is regular at the stellar center and continuous in the interior because of freedom provided by parameters a and b. It is important to realize that this choice for Z is physically reasonable and contains special cases which contain neutron star models. When a=b=1 we regain the form of Z for the charged Hansraj and Maharaj (2006) charged stars. For the value a=1 the potential corresponds to the Maharaj and Komathiraj (2007) compact spheres in electric fields. The choice (14) was made by Finch and Skea (1989) to generate stellar models that satisfy all physical criteria for a stellar source. If we set a=1, b=−3/2 then we generate the Durgapal and Bannerji (1983) neutron star model. If a=7, b=8 then we generate the gravitational potential of the superdense stars of Tikekar (1990). Thus the form for Z chosen is likely to produce physically reasonable models for charged anisotropic spheres with an equation of state.

For the electric field we make the choice

(15)

which has desirable physical features in the stellar interior. It is finite at the center of the star and remains bounded and continuous in the interior; for large values of x it approaches a constant value. When s=0 then we regain E studied by Thirukkanesh and Maharaj (2008). However, their choice is not suitable as the proper charge density becomes singular at the origin as pointed out by Varela et al. (2010). Consequently we have adapted the form of E so that the proper charge density remains regular throughout the stellar interior with an equation of state. These features become clear in the analysis that follows.

4 New models

On substituting (14) and (15) into (12) we get the first order equation

(16)

For the integration of Eq. (16) it is convenient to consider three cases: b=0,a=b and ab.

4.1 The case b=0

When b=0, (16) gives the solution

(17)

where D is the constant of integration. The potential y in (17) generates a negative density \(\rho=-\frac{E^{2}}{2}\) which is physically undesirable.

4.2 The case b=a

When a=b, (16) yields the solution

$$ y=D (1+ax )^{(4a\alpha-(2k+s)(1+\alpha))/(8a)}\exp \bigl[F(x) \bigr], $$
(18)

where we have let

(19)

and D is the constant of integration. Then we can generate an exact model for the system (8)–(13) in the form

(20)
(21)
(22)
(23)
(24)
(25)
(26)
(27)

The new exact solution (20)–(27) of the Einstein–Maxwell system is presented in terms of elementary functions. When s=0 we regain the first class of charged anisotropic models of Thirukkanesh and Maharaj (2008). For our models the mass function is given by

(28)

The gravitational potentials and matter variables are well behaved in the interior of sphere. However, as in earlier treatments, the singularity in the charge distribution at the center is still present in general. In our new solution the singularity can be eliminated when k=0. Then Eq. (27) becomes

$$ \frac{\sigma^{2}}{C} = \frac{4Csa^{2}x(2+ax)^{2}}{(1+ax)^{5}}. $$
(29)

At the stellar center x=0 and the charge density vanishes.

4.3 The case ba

On integrating (16), with ba we obtain

(30)

where D is the constant of integration. The constants m and n are given by

Then we can generate an exact model for the system (8)–(13) in the form

(31)
(32)
(33)
(34)
(35)
(36)
(37)
(38)

The exact solution (31)–(38) of the Einstein–Maxwell system is written in terms of elementary functions. For this case the mass function is given by

(39)

This solution is a generalization of the second class of charged anisotropic models of Thirukkanesh and Maharaj (2008): When s=0 we obtain their expressions for the gravitational potentials and matter variables. These quantities are well behaved and regular in the interior of the sphere. However, in general there is a singularity in the charge density at the center. This singularity is eliminated when k=0 so that

$$ \frac{\sigma^{2}}{C} = \frac{4Csa^{2}x[1+(a-b)x](2+ax)^{2}}{(1+ax)^{5}}. $$
(40)

At the center of the star x=0 and the charge density vanishes.

5 Physical features

In this section we show that the exact solutions found in Sect. 4, for particular choices of the parameters ab and s, are physically reasonable. A detailed physical analysis for general values of the parameters will be dealt with in future investigations. We used the programming language Python to generate these plots for the case that a>b (a=2.5, b=2.0), α=0.33, \(\beta = \alpha \tilde{\rho}=0.198\), C=1 and s=2.5, k=0 where \(\tilde{\rho}\) is the density at the boundary. The solid lines correspond to s=0 and the dashed lines correspond to s≠0 in the graphs. We generated the following plots: energy density (Fig. 1), radial pressure (Fig. 2), tangential pressure (Fig. 3), anisotropy measure (Fig. 4), electric field intensity (Fig. 5), charge density (Fig. 6) and mass (Fig. 7). The energy density ρ is positive, finite and monotonically decreasing. The radial pressure p r is similar to ρ since p r and ρ are related by a linear equation of state. The values of ρ and p r are lower in the presence of the electric field E≠0. The tangential pressure is well behaved, increasing away from the center, reaches a maximum and becomes a decreasing function. This is reasonable since the conservation of angular momentum during the quasi-equilibrium contraction of a massive body should lead to high values of p t in central regions of the star, as pointed out by Karmakar et al. (2007). The anisotropy Δ is increasing in the neighborhood of the center, reaches a maximum value, and then subsequently decreases. The profile of Δ is similar to the profile studied by Sharma and Maharaj (2007) and Tikekar and Jotania (2009) for strange stars with quark matter.

Fig. 1
figure 1

Energy density (ρ) versus radius

Fig. 2
figure 2

Radial pressure (p r ) versus radius

Fig. 3
figure 3

Tangential pressure (p t ) versus radius

Fig. 4
figure 4

Anisotropy (Δ) versus radius

Fig. 5
figure 5

Electric field (E 2) versus radius

Fig. 6
figure 6

Charge density (σ 2) versus radius

Fig. 7
figure 7

Mass (M) versus radius

The form chosen for E is physically reasonable and describes a function which is initially small and then increases as we approach the boundary. The charge density in general is continuous, initially increases and then decreases. Note that the singularity at the stellar center is eliminated since k=0. The mass function is strictly increasing function which is continuous and finite. We observe that the mass, in the presence of charge, has lower values that the corresponding uncharged case. This is consistent as E≠0 generates lower densities which produces a weaker total field since the electromagnetic field is repulsive. Thus all matter variables, electromagnetic quantities and gravitational potentials are nonsingular and well behaved in a region away from the stellar center. We emphasize that the electromagnetic quantities are all well behaved close to the stellar center, since there are finite values for the charge density. This is different from other treatments with an equation of state.

The solutions found in this paper can be used to model realistic stellar bodies. We introduce the transformations: \(\tilde{a}=a R^{2}\), \(\tilde{b}=bR^{2}\), \(\tilde{\beta}=\beta R^{2}\), \(\tilde{k}=k R^{2}\), \(\tilde{s}=s R^{2}\). Using these transformations the energy density becomes

$$ \rho =\frac{(2 \tilde{b}-\tilde{k})(3+\tilde{a}y)-\tilde{s}\tilde{a}^{2}y^{2}}{2 R^2 (1+\tilde{a}y)^2}. $$
(41)

The mass contained within a radius r is given by

(42)

where we have set C=1 and \(y=\frac{r^{2}}{R^{2}}\). If \(\tilde{k}=0\), \(\tilde{s}=0\) (E=0) then we have

(43)
(44)

In this case there is no charge and we obtain the expressions Sharma and Maharaj (2007). For the astrophysical importance of our solutions, we try to compare the masses corresponding to the models of this paper to those found by Sharma and Maharaj (2007) and Thirukkanesh and Maharaj (2008).

We calculate the masses for the various cases with and without charge. We set r=7.07 km, R=43.245 km, \(\tilde{k}=37.403\) and \(\tilde{s}=0.137\). We tabulate the information in Table 1. Note that when k=0, s=0 we have an uncharged stellar body and we regain masses generated by Sharma and Maharaj (2007). When k≠0 and s=0 we find masses for a charged relativistic star in the Thirukkanesh and Maharaj (2008) models. We have included those two sets of values for consistency and to demonstrate that our general results contain the special cases considered previously. When k=0 and s≠0 the masses found correspond to new charged solutions, with nonsingular charge densities at the origin. When k≠0 and s≠0 then we have the most general case. In all cases we obtain stellar masses which are physically reasonable. We observe that the presence of charge generates a lower mass M because of the repulsive electromagnetic field which corresponds to a weaker field. Observe that our masses are consistent with the results of Dey et al. (1998, 1999a, 1999b) with an equation of state for strange matter. When the charge is absent the mass M=1.434M ; the presence of charge in the different solutions affects this value. Dey et al. (1998, 1999a, 1999b) have shown that these values are consistent with observations for the X-ray binary pulsar SAX J1808.4-3658. Consequently these charged general relativistic models have astrophysical significance. A trend in the masses is observable in Table 1. It is interesting to observe that the smallest masses are attained when k≠0, s=0 in the presence of the electromagnetic field. When k≠0, s=0 then the electric field intensity is stronger by (15) which negates the attraction of the gravitational field leading to a weaker field. Note that we have also included the value of anisotropy Δ in Table 1. We note that larger stellar masses correspond to increasing values of anisotropy.

Table 1 Central density and mass for different anisotropic stellar models for neutral and charged bodies

6 Density variation

From (41) we observe that

$$ \rho_{c}=\frac{(2\tilde{b}-\tilde{k})(3+\tilde{a}\frac{c^{2}}{R^{2}})-\tilde{s}\tilde{a}^{2}\frac{c^{4}}{R^{4}}}{2R^{2}(1+\tilde{a}\frac{c^{2}}{R^{2}})^{2}}, $$
(45)

is the density at the stellar surface. The density at the center of the star is

$$ \rho_{0}=\frac{3(2\tilde{b}-\tilde{k})}{2R^{2}}. $$
(46)

Then we can generate the ratio

$$ \epsilon=\frac{(2\tilde{b}-\tilde{k})(3+\tilde{a}\frac{c^{2}}{R^{2}})-\tilde{s}\tilde{a}^{2}\frac{c^{4}}{R^{4}}}{3(2\tilde{b}-\tilde{k})(1+\tilde{a}\frac{c^{2}}{R^{2}})^{2}}, $$
(47)

called the density contrast. With the help of (47) we can find \(\frac{c^{2}}{R^{2}}\) in terms of ϵ:

(48)

Then (42) and (48) yield the quantity

(49)

which is the compactification factor. Consequently our model is characterized by the surface density ρ c , the density contrast ϵ and the compactification factor \(\frac{M}{c}\) in presence of charge. These two parameters produce information of astrophysical significance for specific choice of the parameters. The compactification factor classifies stellar objects in various categories depending on the range of \(\frac{M}{c}\): for normal stars \(\frac{M}{c} \sim 10^{-5}\), for white dwarfs \(\frac{M}{c} \sim 10^{-3}\), for neutron stars \(\frac{M}{c} \sim 10^{-1}\) to \(\frac{1}{4}\), for ultra-compact stars \(\frac{M}{c} \sim \frac{1}{4}\) to \(\frac{1}{2}\), and for black holes \(\frac{M}{c} \sim \frac{1}{2}\). The parameter \(\frac{M}{c}\) in the case of strange stars is in the range of ultra-compact stars with matter densities greater than the nuclear density.

For particular choices of the parameters \(\tilde{a}\), \(\tilde{b}\), \(\tilde{k}\), \(\tilde{s}\) and specifying the density contrast ϵ we can find the boundary c from (48). Note that the parameter R is specified if we take the central density to be ρ 0=2×1014 gm cm−3 in (46). The compactification factor \(\frac{M}{c}\) then follows from (49). For charged matter we take the values k=2.8 and s=2 and for uncharged matter k=0 and s=0. Table 2 represents typical values for ϵ and \(\frac{M}{c}\) for charged matter and uncharged matter; the first set of values are for charged matter and the bracketed values are the corresponding values for neutral matter when \(\tilde{k}= \tilde{s}=0\). For uncharged matter we regain the values of ϵ and \(\frac{M}{c}\) generated by Tikekar and Jotania (2005) for superdense star models with neutral matter. We observe that the presence of charge has the effect of reducing both c and the compactification \(\frac{M}{c}\) to produce the same value of the density contrast ϵ. This is consistent since the presence of the electric field intensity has the effect of leading to a weaker field. The values that we have generated in Table 2 for neutral and charged matter permit configurations typical of neutron stars and strange stars. Note that the changing the various parameters will allow for smaller or larger compactification factors. Thus the class models found in this paper allow for stellar configurations which provide physically viable models of superdense structures.

Table 2 Variation of density

7 Conclusion

The recent results contained in the investigations of Gupta and Maurya (2011a, 2011b, 2011c), Maurya and Gupta (2011a, 2011b, 2011c) and Kiess (2012) have highlighted the importance of including the electric field in gravitational compact objects. This serves as a motivation for our study with equation of state. The models of Thirukkanesh and Maharaj (2008), which contain several earlier solutions are regained from our solutions in this paper for particular values of the parameters k and s. Our aim in this paper was to find new exact solutions to the Einstein–Maxwell systems with a barotropic equation of state for static spherically symmetric gravitational fields. In particular we chose a linear equation of state relating the energy density to the radial pressure. Such models may be used to model relativistic stars in astrophysical situations. The charged relativistic solutions to the Einstein–Maxwell systems presented are physically reasonable. A graphical analysis has shown that the matter and electromagnetic variables are physically reasonable. In particular our solutions contain models, corresponding to k=0, for which the proper charge density is nonsingular. This is an improvement on earlier models which possessed a singularity in σ at the stellar origin. Our models yield stellar masses and densities consistent with Thirukkanesh and Maharaj (2008) in the presence of charge, and Dey et al. (1998, 1999a, 1999b) and Sharma and Maharaj (2007) in the limit of vanishing charge. Our solutions may be helpful in the study of stellar objects such as SAX J1804.4-3658. We have regained the corresponding mass M=1.434M when k=0, s=0 of earlier treatments. These models may be useful in the description of charged anisotropic bodies, quark stars and configurations with strange matter.