1 Introduction

Gravitational collapse is an important issue in relativistic astrophysics. The collapse of a dust cloud was studied first [1]. This was followed by studies of fluid collapse. There are many indications that the collapsing fluid in the star models is anisotropic [2]. In addition, this process is highly dissipative, required to account for the enormous binding energy of the resulting object [3]. Thus a realistic scenario is anisotropic collapse with heat flow [4]. For simplicity, shearless fluid is used quite often. Even in the isotropic case the amount of interior solutions is enormous [5]. The stability of the shear-free condition during collapse, however, requires fine tuning of one of the structure scalars, which is also the complexity factor [6,7,8]. Thus collapse with shear seems to be the general case. It is described by a diagonal metric with three independent components. The exterior solution is the Vaidya shining star [9]. The two solutions should be matched on the stellar surface. The main junction condition states that the radial pressure should equal the heat flux. This gives a non-linear differential equation in partial derivatives (along radius and time). One can reduce the metric components to two by studying the geodesic case, \( g_{00}=1\). Shearless solutions were discussed in [10,11,12,13].

Interior anisotropic geodesic solutions with shear and without radiation have been discussed in [14]. No matching to the exterior Schwarzschild solution was done. The same problem in non-comoving coordinates, but with matching, was solved in [15].

The first exact solution with radiation was obtained in [16]. After that in [17] it was noticed that the junction condition is a Riccati equation for \(g_{rr}\). Two simple regular solutions in separated variables were found. The solution of [16] is regained when certain parameters are set to zero. Later, the authors of [18] found even more general exact solutions depending on arbitrary functions of the coordinate radius. They encompass the previous solutions. The authors of [19] further expanded the number of analytic solutions by studying the Lie point symmetries of the boundary condition. Generalized travelling waves and self-similar solutions were derived. A class of these solutions was studied in detail [20]. One should mention also the dissipative LTB solutions [21].

Recently, it was shown that the junction equation simplifies for the so-called horizon function [22, 23] both in the general and the geodesic case. It is directly related to the redshift and the formation of a horizon, which means the appearance of a black hole at the end of collapse. It enters the expressions for the mass of the star, the heat flow and the luminosity at infinity. In the geodesic case a generating function was found for the solutions.

The collapse of charged anisotropic and dissipative fluids has also been studied in the shearless case as well as in the case with shear [24,25,26,27,28,29,30,31,32,33].

The main purpose of the present paper is to generalize the junction equation for the horizon function to the case of charged anisotropic dissipative geodesic fluid. Like in the neutral case, the equation is easily integrated with the help of a generating function.

In Sect. 2 we present the Einstein–Maxwell equations, which in the anisotropic case are expressions for the energy density, the radial and the tangential pressure, the heat flow and the four-potential. The definitions of the different stellar characteristics are given. In Sect. 3 the results of the matching to the exterior charged Vaidya solution are given. The most important of them is a Riccati equation with simple coefficients. It is algebraic for the radius of the star. This allows to derive charged geodesic solutions from a generating function. Simple expressions are given for the mass and its time derivative. In Sect. 4 some stellar characteristics are written in terms of the generating function and its time derivatives. In Sect. 5 we show that one and the same generating function gives rise to a pair of solutions, one neutral and one charged. Certain inequalities between the stellar characteristics of the pair are derived. In Sect. 6 some recently found neutral solutions are charged. Sect. 7 contains conclusions.

2 Stellar characteristics and field equations

The dissipative collapse of a charged anisotropic geodesic fluid sphere with shear is described by the following metric

$$\begin{aligned} ds^2=-dt^2+B^2dr^2+R^2\left( d\theta ^2+\sin ^2\theta d\varphi ^2\right) , \end{aligned}$$
(1)

where B and R are independent functions of the time t and the radius r. The spherical coordinates are numbered as \(x^0=t\), \(x^1=r\), \(x^2=\theta \) and \(x^3=\varphi \). The energy-momentum tensor reads

$$\begin{aligned} T_{ik}= & {} \left( \mu +p_t\right) u_iu_k+p_tg_{ik}+\left( p_r-p_t\right) \chi _i\chi _k\nonumber \\&+q_iu_k+u_iq_k+E_{ik}. \end{aligned}$$
(2)

Here \(\mu \) is the energy density, \(p_r\) is the radial pressure, \(p_t\) is the tangential pressure, \(u^i\) is the four-velocity of the fluid, \(\chi ^i\) is a unit spacelike vector along the radial direction, \(q^i\) is the heat flow vector, also in the radial direction, and \(E_{ik}\) is the electromagnetic energy tensor. In comoving coordinates

$$\begin{aligned} u^i=\delta _0^i,\quad \chi ^i=B^{-1}\delta _1^i,\quad q^i=q\chi ^i. \end{aligned}$$
(3)

We have [26, 29]

$$\begin{aligned} E_{ik}=\frac{1}{4\pi }\left( F_i^{\;m}F_{km}-\frac{1}{4}g_{ik}F^{lm}F_{lm}\right) , \end{aligned}$$
(4)

where \(F_{ik}\) is the electromagnetic field tensor. Its only non-trivial component \(F_{01}=-F_{10}\) is expressed through the four-potential, which has just a time component \(\varPhi \):

$$\begin{aligned} F_{01}=-\varPhi ^{\prime }, \end{aligned}$$
(5)

where the prime is a radial derivative. The Maxwell equations yield

$$\begin{aligned} \varPhi ^{\prime }=\frac{Bl}{R^2},\quad l\left( r\right) =4\pi \int _0^rsBR^2dr, \end{aligned}$$
(6)

where s is the charge density and \(l\left( r\right) \) is the total charge up to radius r. It is time-independent. We use relativistic units with \( G=1,c=1,k=8\pi \).

The Einstein field equations become

$$\begin{aligned} 8\pi \mu +\frac{l^2}{R^4}= & {} \left( \frac{2\dot{B}}{B}+\frac{\dot{R}}{R}\right) \frac{ \dot{R}}{R}-\frac{1}{B^2}\nonumber \\&\times \left( \frac{2R^{\prime \prime }}{R}+\frac{R^{\prime 2}}{ R^2}-\frac{2B^{\prime }R^{\prime }}{BR}-\frac{B^2}{R^2}\right) , \end{aligned}$$
(7)
$$\begin{aligned} 8\pi p_r-\frac{l^2}{R^4}= & {} -\frac{2{\ddot{R}}}{R}-\frac{\dot{R}^2}{R^2}+\frac{ R^{\prime 2}}{B^2R^2}-\frac{1}{R^2}, \end{aligned}$$
(8)
$$\begin{aligned} 8\pi p_t+\frac{l^2}{R^4}= & {} -\left( \frac{{\ddot{B}}}{B}+\frac{{\ddot{R}}}{R}+\frac{\dot{B}\dot{R}}{BR}\right) \nonumber \\&+\,\frac{1}{B^2}\left( \frac{R^{\prime \prime }}{R}-\frac{ B^{\prime }R^{\prime }}{BR}\right) , \end{aligned}$$
(9)
$$\begin{aligned} 8\pi qB= & {} -\frac{2}{B}\left( \frac{\dot{B}R^{\prime }}{BR}-\frac{\dot{R}^{\prime }}{R}\right) . \end{aligned}$$
(10)

Here the dot means a time derivative.

For the line element (1) the four-acceleration vanishes, while the shear and the expansion scalars are given by

$$\begin{aligned} \sigma= & {} \frac{1}{3}\left( \frac{\dot{R}}{R}-\frac{\dot{B}}{B}\right) , \end{aligned}$$
(11)
$$\begin{aligned} \varTheta= & {} \frac{2\dot{R}}{R}+\frac{\dot{B}}{B}. \end{aligned}$$
(12)

Next, we introduce the horizon function H [22, 23]:

$$\begin{aligned} H=\frac{R^{\prime }}{B}+\dot{R}. \end{aligned}$$
(13)

It replaces the metric component B, which becomes

$$\begin{aligned} B=\frac{R^{\prime }}{H-\dot{R}}. \end{aligned}$$
(14)

The mass entrapped within radius r is given by the expression [26, 29]

$$\begin{aligned} m=\frac{R}{2}\left[ 1+\dot{R}^2-\left( \frac{R^{\prime }}{B}\right) ^2\right] + \frac{l^2}{2R}. \end{aligned}$$
(15)

On the stellar surface \(\varSigma \) it becomes the mass of the star. The compactness parameter is \(u=m/R\). Equation (15) can be rewritten, using H

$$\begin{aligned} \frac{2m}{R}=1+2H\dot{R}-H^2+\frac{l^2}{R^2}. \end{aligned}$$
(16)

The heat flow given by Eq. (10) may be written as

$$\begin{aligned} 8\pi qB=\frac{2}{R}\left( H-\dot{R}\right) ^{.}. \end{aligned}$$
(17)

Comparing Eqs. (7, 17) one can deduce the formula

$$\begin{aligned} 8\pi \mu =\frac{2m^{\prime }}{R^2R^{\prime }}-\frac{8\pi qB^2\dot{R}}{ R^{\prime }}-\frac{2ll^{\prime }}{R^3R^{\prime }} \end{aligned}$$
(18)

When \(q=l=0\) this is the formula for \(\mu \) from the mass formalism. It was generalised for \(q\ne 0\) in [6].

There is a similar formula for \(p_r\). However, one can derive another formula for the radial pressure without invoking the mass function. Comparing Eqs. (8, 10) we find

$$\begin{aligned} 4\pi R\left( p_r-qB\right) =-\dot{H}+\frac{H^2-1}{2R}-\frac{\dot{R}H}{R}+\frac{ l^2}{2R^3} \end{aligned}$$
(19)

With the help of Eq. (17) we obtain an expression for \(p_r\):

$$\begin{aligned} 4\pi p_r=-\frac{{\ddot{R}}}{R}+\frac{H^2-1}{2R}-\frac{\dot{R}H}{R}+\frac{l^2}{2R^3} \end{aligned}$$
(20)

Equation (19) may be written also in terms of R and \(D\equiv HR\)

$$\begin{aligned} 8\pi R^2\left( p_r-qB\right) =-2\dot{D}-1+\frac{D^2+l^2}{R^2} \end{aligned}$$
(21)

All the above equations hold in the interior of the star as well on its surface.

Some important stellar characteristics are defined on the surface of the star. These are the surface redshift \(z_\varSigma \)

$$\begin{aligned} z_\varSigma =\frac{1}{H_\varSigma }-1, \end{aligned}$$
(22)

the surface luminosity \(\Lambda _\varSigma \) and the luminosity at infinity \( \Lambda _\infty \)

$$\begin{aligned} \Lambda _\varSigma= & {} \left( 4\pi qBR^2\right) _\varSigma , \end{aligned}$$
(23)
$$\begin{aligned} \Lambda _\infty= & {} H_\varSigma ^2\Lambda _\varSigma . \end{aligned}$$
(24)

The temperature at the surface is given by

$$\begin{aligned} T_\varSigma ^4=\frac{\left( qB\right) _\varSigma }{\delta }, \end{aligned}$$
(25)

where \(\delta \) is some constant.

3 Junction conditions

The exterior spacetime is given by the charged Vaidya shining star solution

$$\begin{aligned} ds^2= & {} -\left[ 1-\frac{2M\left( v\right) }{\rho }+\frac{Q^2}{\rho ^2}\right] dv^2\nonumber \\&-\,2dvd\rho +\rho ^2\left( d\theta ^2+\sin ^2\theta d\varphi ^2\right) , \end{aligned}$$
(26)

where \(M\left( v\right) \) is the mass of the star, measured at time v by an observer at infinity, Q is the total charge, while \(\rho \) is the exterior coordinate radius. Both solutions should be joined smoothly at \( \varSigma \), which leads to the following junction conditions:

$$\begin{aligned}&R_\varSigma =\rho _\varSigma \left( \nu \right) , \end{aligned}$$
(27)
$$\begin{aligned}&m_\varSigma =M, \end{aligned}$$
(28)
$$\begin{aligned}&l_\varSigma =Q, \end{aligned}$$
(29)
$$\begin{aligned}&\left( p_r\right) _\varSigma =\left( qB\right) _\varSigma . \end{aligned}$$
(30)

Equation (30) should be satisfied by R and H while the other equations are definitions of different stellar characteristics. Replacing Eq. (21) in Eq. (30) we obtain on the surface of the star

$$\begin{aligned} 2\dot{D}+1=\frac{D^2+Q^2}{R^2}. \end{aligned}$$
(31)

In the uncharged case \(Q=0\) this is exactly Eq. (35) from [22] or Eq. (28) from [23]. It is a Riccati equation for D. Here we have derived it from Eq (21), which also holds in the bulk of the star. The charge alters its free term.

It is seen that the star properties have simpler expressions when written in terms of H. The redshift is positive during collapse. Then Eq. (22) shows that \(0\le H_\varSigma \le 1\). When \(H_\varSigma =0\) we obtain from Eq. (16) and the junction conditions

$$\begin{aligned} \left( 1-\frac{2m}{R}+\frac{l^2}{R^2}\right) _\varSigma =\left( 1-\frac{2M\left( \nu \right) }{\rho }+\frac{Q^2}{\rho ^2}\right) _\varSigma =0. \end{aligned}$$
(32)

Like in the neutral case, this signals the appearance of a horizon and a black hole within it, which is the typical end of gravitational collapse. The redshift becomes infinite, while the luminosity at infinity drops to zero. When collapse starts \(H_\varSigma \) should have some positive value less or equal to 1. During the collapse the horizon function decreases to zero and \(\dot{H}_\varSigma \le 0\).

Equation (31) is a Riccati equation for D, but R enters in an algebraic way, like in the neutral case. Thus we get an expression for R in terms of D and Q

$$\begin{aligned} R=\sqrt{\frac{D^2+Q^2}{2\dot{D}+1}}. \end{aligned}$$
(33)

The definition \(D=HR\) gives an expression for H

$$\begin{aligned} H=D\sqrt{\frac{2\dot{D}+1}{D^2+Q^2}}. \end{aligned}$$
(34)

Equations (33, 34) hold on \(\varSigma \), that is, \(r=r_\varSigma \), which is some constant. We can take any reasonable \(D\left( t\right) \) and promote the constants in it to arbitrary functions of the radius so that \(D=D\left( t,r\right) \). This arbitrary function plays the role of a generating function for solutions in the bulk of the star. We can replace there Q by \( l\left( r\right) \), then the junction equation \(p_r=qB\) will hold everywhere in the interior, due to Eq. (21). A simpler possibility is to keep Q constant, which we choose. All stellar characteristics become functions of D and Q. Obviously, \(D\ge 0\), \(\dot{D}<0\), since both H and R are non-negative and decreasing. Furthermore, Eqs. (33, 34) show that \(\dot{D}>-1/2 \). Thus

$$\begin{aligned} -\frac{1}{2}<\dot{D}<0. \end{aligned}$$
(35)

Equation (19) yields on the star’s surface another form of the junction equation (31)

$$\begin{aligned} 2R\dot{H}=H^2-1-2H\dot{R}+\frac{Q^2}{R^2}. \end{aligned}$$
(36)

It is a Riccati equation for H. With its help, Eq. (16) acquires a simple form on \(\varSigma \)

$$\begin{aligned} M=-R^2\dot{H}+\frac{Q^2}{R}. \end{aligned}$$
(37)

The same is true for the time derivative of the mass

$$\begin{aligned} \dot{M}=-8\pi qBR^2H. \end{aligned}$$
(38)

This is the same formula from the case of neutral fluid [23]. A portion of the mass is radiated away due to the heat flux.

One can write the boundary equation (31) as

$$\begin{aligned} 2\dot{D}=H^2-1+\frac{Q^2}{R^2}. \end{aligned}$$
(39)

In the neutral case one can integrate this equation and pass to H as a generating function. In the charged case this is not possible.

All formulas in this section reduce to the formulas in [23] when \( Q=0\).

4 Going to the D-level

Starting with Eqs. (33, 34) we may express all fluid characteristics in terms of Q, D and its time derivatives. The derivative of Eq. (33) gives

$$\begin{aligned}&{\dot{R}}=\frac{\left( 2\dot{D}+1\right) D\dot{D}-D^2{\ddot{D}}}{\left( 2\dot{D}+1\right) ^{3/2}\left( D^2+Q^2\right) ^{1/2}}, \end{aligned}$$
(40)
$$\begin{aligned}&H-{\dot{R}}=\frac{D\left( 2\dot{D}+1\right) \left( \dot{D}+1\right) +\left( D^2+Q^2\right) {\ddot{D}}}{\left( 2\dot{D}+1\right) ^{3/2}\left( D^2+Q^2\right) ^{1/2}}. \end{aligned}$$
(41)

Equation (34) yields

$$\begin{aligned} \dot{H}=\frac{D^3{\ddot{D}}+\left[ \dot{D}\left( 2\dot{D}+1\right) +D\ddot{D}\right] Q^2}{\left( 2\dot{D}+1\right) ^{1/2}\left( D^2+Q^2\right) ^{3/2}}. \end{aligned}$$
(42)

The mass from Eq. (37) becomes on the D level

$$\begin{aligned} M=-\frac{D\left( D^2+Q^2\right) ^{1/2}{\ddot{D}}}{\left( 2\dot{D}+1\right) ^{3/2} }+\frac{\left( {\dot{D}}+1\right) Q^2}{\left( D^2+Q^2\right) ^{1/2}\left( 2{\dot{D}}+1\right) ^{1/2}}. \nonumber \\ \end{aligned}$$
(43)

Then the compactness reads

$$\begin{aligned} \frac{M}{R}=-\frac{D{\ddot{D}}}{2\dot{D}+1}+\frac{\left( \dot{D}+1\right) Q^2}{ \left( D^2+Q^2\right) ^{1/2}}. \end{aligned}$$
(44)

5 Pairs of solutions

Equations (33, 34) show that one and the same generating function D gives rise to two solutions – a neutral one with \(R_0\), \(H_0\) and \(Q=0\), and a charged one with \(R_1\), \(H_1\) and \(Q\ne 0\). We have

$$\begin{aligned} R_1=\alpha R_0,\quad \alpha =\frac{R_1}{R_0}=\sqrt{1+\frac{Q^2}{D^2}}. \end{aligned}$$
(45)

We have introduced the function \(\alpha \), which is positive and \(\alpha \ge 1\). Its derivative reads

$$\begin{aligned} {\dot{\alpha }} =-\frac{Q^2\dot{D}}{\alpha D^3}. \end{aligned}$$
(46)

Since \({\dot{D}}\) is negative, \({\dot{\alpha }} \) is positive, hence \(\alpha \) increases with time and becomes infinite when a black hole forms (\(D=0\)). We have \(D=R_1H_1=R_0H_0\). Therefore

$$\begin{aligned} R_1>R_0,\quad H_1<H_0,\quad Z_1>Z_0. \end{aligned}$$
(47)

The last inequality follows from Eq. (22). In other words, the charged member of the pair possesses a bigger radius and surface redshift, but a smaller horizon function than the neutral member.

Equation (44) may be written as

$$\begin{aligned} \frac{M_1}{R_1}=\frac{M_0}{R_0}+\frac{\left( {\dot{D}}+1\right) Q^2}{\left( D^2+Q^2\right) ^{1/2}},\quad \frac{M_0}{R_0}=-\frac{D{\ddot{D}}}{2{\dot{D}}+1}. \end{aligned}$$
(48)

Hence

$$\begin{aligned} \frac{M_1}{R_1}>\frac{M_0}{R_0},\quad {\ddot{D}}<0. \end{aligned}$$
(49)

Then

$$\begin{aligned} M_1>\alpha M_0>M_0. \end{aligned}$$
(50)

Both the compactness and the mass of the charged solution are bigger than those of the neutral one.

Finally, let us examine the rate of collapse. Eqs. (33, 34) give

$$\begin{aligned} R\dot{R}=\frac{\left( 2\dot{D}+1\right) D\dot{D}-\left( D^2+Q^2\right) {\ddot{D}}}{ \left( 2\dot{D}+1\right) ^2}. \end{aligned}$$
(51)

The r.h.s. increases with Q, hence, \(R_1\dot{R}_1>R_0\dot{R}_0\) or \(\alpha \mid \dot{R}_1\mid <\mid \dot{R}_0\mid \). Therefore

$$\begin{aligned} \mid \dot{R}_1\mid <\mid \dot{R}_0\mid , \quad \dot{R}_1>\dot{R}_0. \end{aligned}$$
(52)

This shows that charge slows the collapse of the fluid.

6 Charging known solutions

It is interesting to obtain from our formalism charged versions of some of the solutions found before. The most general of them were presented by [19], using the Lie group symmetry method. In this way generalised travelling waves and self-similar solutions were found, which depend on an arbitrary function. In our approach we take \(D=D\left( x\right) \), where x is

$$\begin{aligned} x=\int \frac{dr}{f\left( r\right) }-\frac{t}{a}, \end{aligned}$$
(53)

a is a constant, while \(f\left( r\right) \) is an arbitrary function. When \( f\left( r\right) =1\) we have a travelling wave with speed 1 / a. One easily finds that

$$\begin{aligned} \dot{D}=-\frac{1}{a}D_x \end{aligned}$$
(54)

is also a function of x. Equations (33, 34) show that \(R=R\left( x\right) \) and \( H=H\left( x\right) \) because Q is a constant and from Eq. (14)

$$\begin{aligned} B=\frac{R_x}{f\left( r\right) \left( H+R_x/a\right) }=\frac{h\left( x\right) }{f\left( r\right) }. \end{aligned}$$
(55)

We obtain exactly the first class of solutions in [19]. Here h satisfies a Riccati equation because B does so. The latter can be seen by plugging Eqs. (8, 10) into the junction condition (30) and multiplying by \( -R^2B^2\). The result is

$$\begin{aligned} 2RR^{\prime }\dot{B}=\left( 2R{\ddot{R}}+\dot{R}^2-1+\frac{Q^2}{R^2}\right) B^2+2R\dot{R}^{\prime }B-R^{\prime 2}. \nonumber \\ \end{aligned}$$
(56)

It is a Riccati equation for B no matter what Q is. One can replace the time derivatives by x derivatives as in Eq. (54). Another way to derive it is to plug the definition of H (Eq. (13)) into Eq. (31), which is equivalent to Eq. (56). In the neutral case the second class of solutions in [19], which are self-similar, can be restored too. This doesn’t seem possible in the charged case.

The neutral solution was studied recently in [20], where the stellar radius was chosen explicitly as

$$\begin{aligned} R\left( x\right) =\left( \beta x+\gamma \right) ^\varepsilon , \end{aligned}$$
(57)

with \(\beta , \gamma , \varepsilon \) being some constants. New models were given for different \(\varepsilon \). It is normal to choose an explicit R when one is working with Eq. (56) (with \(Q=0\) in this case) and then solve it for B. One has to integrate the Riccati equation for every value of \( \varepsilon \).

A simpler procedure is to use Eq. (31), which becomes in the neutral case

$$\begin{aligned} 2\dot{D}=\frac{D^2}{R^2}-1. \end{aligned}$$
(58)

We can find the corresponding D for a given R by solving this equation. Let us set \(z=\beta x+\gamma \). Then

$$\begin{aligned} \dot{D}=-\frac{1}{a}D_x=-\frac{\beta }{a}D_z \end{aligned}$$
(59)

and Eq. (58) becomes

$$\begin{aligned} D_z=-\frac{a}{2\beta }z^{-2\varepsilon }D^2+\frac{a}{2\beta }. \end{aligned}$$
(60)

This Riccati equation is integrable (see Example 1.2.2.12 from [34]). After a transformation of z it becomes the Special Riccati equation (Example 1.2.2.4)

$$\begin{aligned} D_\xi= & {} -\frac{a}{2\beta \left( 1-2\varepsilon \right) }D^2+\frac{a}{2\beta \left( 1-2\varepsilon \right) }\xi ^{\frac{2\varepsilon }{1-2\varepsilon } }, \ \ \xi =z^{1-2\varepsilon }. \nonumber \\ \end{aligned}$$
(61)

Its solution for \(\varepsilon \ne 1/2\) is given by

$$\begin{aligned} D=\frac{2\beta \left( 1-2\varepsilon \right) }{a}\frac{U_\xi }{U}, \end{aligned}$$
(62)

where

$$\begin{aligned} U= & {} \sqrt{\xi }\left[ C_1J_{\frac{1-2\varepsilon }{2\left( 1-\varepsilon \right) }}\left( \frac{ia}{2\beta \left( 1-\varepsilon \right) }\xi ^{\frac{ 1-\varepsilon }{1-2\varepsilon }}\right) \right. \nonumber \\&\left. +\,C_2Y_{\frac{1-2\varepsilon }{ 2\left( 1-\varepsilon \right) }}\left( \frac{ia}{2\beta \left( 1-\varepsilon \right) }\xi ^{\frac{1-\varepsilon }{1-2\varepsilon }}\right) \right] . \end{aligned}$$
(63)

\(C_1\), \(C_2\) are constants and \(J_\tau \), \(Y_\tau \) are Bessel functions. When \(\tau =n+1/2\) or \(\tau =-n-1/2\) with n an integer, and for imaginary argument, they reduce to derivatives of exponents. This happens for

$$\begin{aligned} \varepsilon =\frac{2n}{2n-1}\quad \text {or}\quad \varepsilon =\frac{2n+2}{ 2n+3}. \end{aligned}$$
(64)

The \(\varepsilon \) studied in [20] are exactly of this type. The derivatives of these Bessel functions give other Bessel functions with the same kind of index \(\tau \). Thus the solutions, listed in [20], are obtained by solving just one Riccati equation, which holds for any \( \varepsilon \). In order to find B it is useful to transform Eq. (14) into

$$\begin{aligned} B=\frac{\left( R^2\right) ^{\prime }}{2D-\left( R^2\right) ^{.}}. \end{aligned}$$
(65)

Thus the neutral solution is obtained when R is given. Knowing D, its charged companion follows from Eq. (45) for \(R_1\) and \(H_1=D/R_1\).

7 Conclusions

In this paper we give a generating function D for solutions of the main junction condition (31). It holds for charged, geodesic, anisotropic spherical collapse. For this purpose we have used the physically important object H, called the horizon function [22, 23]. It rules the appearance of a black hole (\(H=0\)). Fortunately, it and \(D=HR\) satisfy Riccati equations, simpler than the previous such equation for B. The junction equation has been derived from a formula, which holds in the interior of the star, unlike its previous derivations in [22, 23]. The total charge of the star Q enters the equation, but it remains of Riccati type for D, while the stellar radius R enters algebraically, just like in the neutral case.

The generating function is unique. One cannot choose H or Z as generating functions, as in the neutral case.

It is shown that every neutral solution has a charged companion with the same D. Certain inequalities between the members of such pairs have been derived. The charged member has bigger radius, surface redshift, mass and compactness than the neutral one. Its horizon function is smaller and the rate of collapse slower.

A class of the known exact neutral solution [19], containing generalised travelling waves, has been charged. We also show in a simple universal way how to find the generating function when R is given, like in [20], and then charge the solution.