{'fraction_non_alphanumeric': 0.06063032405862859, 'fraction_numerical': 0.015880429705744978, 'mean_word_length': 4.406035830227245, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Algorithms for Generating All Static Spherically Symmetric (An)isotropic Fluid Solutions of Einstein's Equations

We study the Einstein equations of the static spherically symmetric anisotropic fluid system in curvature coordinates to find algorithms that generate all solutions and all solutions that are regular at the center. All possible combinations of input functions from the set of four functions that characterize the anisotropic system are considered and all equivalent conditions for central regularity are determined (for both isotropic and anisotropic systems). We provide the first regularity analysis of the known algorithm that uses the potential function and anisotropy as inputs. For three other choices of input function pairs (any two of the potential function, density, or radial pressure), a remarkably straightforward algorithm follows, which is very efficient in generating regular anisotropic solutions. This is because the equivalency of the three pairs in this algorithm arises precisely from the same algebraic relation that made the different equivalent sets of regularity conditions possible. In addition, the choice of functions makes this algorithm very suitable for finding particular solutions that admit other desirable physical properties; we construct three examples. This algorithm does not admit an isotropic limit although all isotropic solutions are produced as part of the anisotropic system. The remaining two choices of input function pairs (anisotropy with the radial pressure or density) lead to the old barriers one encounters in the isotropic system: Riccati and Abel equations. However, with any solution generated by the new and existing algorithms, one can now construct the general solution of the corresponding Riccati equation to obtain a one-parameter family of geometries for each input solution. We discuss the regularity of the resulting solutions.


Introduction
The most general spherically symmetric static-fluid configurations possible in general relativity have anisotropic pressure. Einstein's equations for this system reduce to a system of two equations in four unknown functions: density, radial pressure, (one) tangential pressure, and the potential function. The difference between the two pressures is the anisotropy function, and when this vanishes identically, one obtains the system of isotropic fluid configurations. Isotropic and anisotropic systems, thus, require one and two input functions, respectively, to produce a solution. One can also use an equation of state as an input. Isotropic fluid spheres (or perfect fluid spheres, as they are more commonly known) have been studied extensively since the early days of relativity and continue to be of physical and mathematical interest [27,14,10]. There is a large corpus of exact solutions of the isotropic system, which were obtained by employing various ad hoc techniques. However, only a very few of them can be considered physical [10] and, thus, to obtain physically reasonable solutions, one generally uses numerical integration. Despite Einstein's cluster solution in the late 30s [12], anisotropic fluid spheres have received much less attention. In recent times, they have attracted fresh interest, as anisotropy has been found to be relevant in several physical situations [19], especially in modeling static galactic dark matter halos (see, for example, [3]) as well as compact stars, both of which are currently attracting a considerable amount of research interest [4,11,29].
More recently, a number of generation algorithms have been developed that can obtain all static isotropic fluid spheres by quadrature from a single function-the generating function-in various coordinates [2,20,25,23]. This approach is comparable to the well-studied static axisymmetric vacuum system for which one can generate all solutions from an arbitrary (harmonic) generating function (see, for example, [27]). An algorithm gives considerable insight into the structure of the solution space and can be useful in constructing new solutions, exact or otherwise, of particular interest. There is also an algorithm for the anisotropic system in canonical coordinates [18], which extends the perfect fluid algorithm in [20]. The two inputs used in this algorithm are the potential function (equivalently, the g tt component of the metric) and the anisotropy. Another algorithm uses two inputs that are functions of fluid variables to generate anisotropic solutions in canonical coordinates. A less general algorithm that generates a class of anisotropic solutions from isotropic Newtonian solutions is known [22]. Generating functions are not a priori required to be quantities that are readily physically interpretable and they could be complicated expressions in terms of the physical quantities of the system (see, for example, [15]). In any case, even when they can produce all solutions, it is not easy to determine beforehand what inputs will give a desired output solution (like solutions that are regular at the center and have other properties of physical interest). Addressing such issues will be central to this paper.
In this paper, we will systematically study all possible generation algorithms in canonical coordinates using the basic functions of the (an)isotropic system (as in the algorithms of [20] and [18]). We will not consider possibilities using other functions as inputs (as in [15,23]). A generating algorithm that finds all solutions, or solutions of a certain type, of the system via quadrature is not in general not the best way to find particular solutions and these are generally considered separate questions. However, using the basic variables of the system, they can be simultaneously approached since physical conditions in canonical coordinates are given in terms of the basic variables and their derivatives. As we will see in this paper, regularity can be considered within a new algorithm which generates all regular solutions in canonical coordinates. This will streamline the search for particular solutions that satisfy other physical properties. We have three main goals: (i) to identify all possible algorithms using these basic variables such that each algorithm generates all solutions of the system via quadrature, (ii) to generate all (and only) regular solutions using each algorithm found via (i), 1 and (iii) to use (i) and (ii) to find particular examples that satisfy other physical conditions. This paper is arranged as follows. In Section 2, we introduce the Einstein equations for the system, and in Section 3 we examine the geometric conditions of regularity in the light of Einstein's equations. In Section 4, we study the existing algorithm(s) and reformulate it in terms of the tangential pressure function and show how both can produce solutions that are regular at the center. We then present a new algorithm that generates all solutions from three other pairs of functions; this algorithm makes generating regular anisotropic solutions very straightforward. Then, in Section 5, we reconsider the Riccati equations-which on their own could not be integrated-in light of the algorithms. In Section 6, we find solutions that satisfy other physical conditions, staring from the new algorithm. We conclude in Section 7.

Spherically Symmetric Static Fluid Systems
We will be working in the curvature/Schwarzschild coordinates [24]: ds 2 = −e 2Φ(r) dt 2 + e 2Ψ(r) dr 2 + r 2 (dθ 2 + sin 2 θdφ 2 ), (2.1) for which the most general fluid energy-momentum tensor is (see, for example, [13]) where ρ(r) is the energy density, p(r) is the radial pressure, and P (r) is the tangential pressure. The anisotropy is then measured by the anisotropic pressure function: χ(r) ≡ (P (r) − p(r))/3. This is often used instead of P (r). Integrating G t t = 8πT t t from the origin, we get the "mass" function: One can also consider a "core" for r ≤ r c = 0 (which could be made of another fluid solution, a vacuum Schwarzschild solution, or something else): where m c is the "core mass." In either case, we get the following "simplified" line element: Note that generating solutions that are regular at the center (i.e., scalar polynomial invariants constructed from that Riemann tensor that are finite) is an altogether different problem from checking whether an existing solution is regular. There are no discussions in the literature on the regularity of the algorithm in [18]. We will address this as well as regularity in all other algorithms we find.
For the remaining two Einstein equations, it is customary to use the conservation equation, ∇ µ T µ r = 0, and G r r = 8πT r r to obtain P = r 2 dp dr and respectively. The algebraic implication of this equation for the anisotropic system will become important later in this paper. Substituting (2.7) into (2.6) gives the generalized Tolman-Oppenheimer-Volkoff (TOV) equation: dp dr , which takes a slightly tidier form with χ(r): .
In the following, we will often refer to (2.7) and (2.8) as "the system" and will switch between (2.8) and (2.9) freely. The perfect or isotropic system is obtained by setting p(r) = P (r) or χ(r) = 0 in the generalized TOV equation and will be referred to as the "isotropic system."

Central Regularity
The simplified line element (2.5) has reduced the number of independent ordinary differential equations to two, equations (2.6) and (2.7) or equations (2.7) and (2.8), in four unknowns, and thus two inputs are needed to integrate the system (one for the isotropic case). In stellar models with isotropic fluids, for example, the equation of state p = p(ρ) acts as the functional input needed. One takes a finite initial value ρ(0) and integrates (2.4) and (2.9) (with χ = 0) simultaneously until a radius r = r b is reached where p(r) vanishes (see, for example, [16,24]). 2 Any initial finite value of ρ(0), which returns a finite central pressure via the equation of state p(0) = p(ρ(0)), ensures regularity at the center. We will be interested in generating all solutions via solution-generating algorithms -infinite fluid spheres as well as those that terminate at finite radii, as in stellar models. We will also pay special attention to generating solutions that are regular at the center. As we will discuss in detail later, in any solution generation algorithm the generating functions are the input functions which are freely specifiable and which determine the remaining functions via quadratures. For the resulting solutions to be regular at the center one has to ensure that: (i) the input/generating functions have all the properties consistent with the geometric condition of regularity and (ii) their initial values 2 One also generally requires the solution to be surrounded by a Schwarzschild exterior solution (i.e., T µ ν = 0 for r > r b ). Continuity of the metric components requires that e 2Φ(r b ) = (1 − 2M /r b ), where M = m(r b ) is the mass of the Schwarzschild solution. Moreover, the differentiability of the metric components requires the continuity of p(r) and ρ(r). However, physically, for hydrostatic equilibrium, the radial pressure is required to be continuous across the boundary, i.e., p(r b ) = 0, but ρ(r b ) can be nonzero (see e.g., [6]). also ensure that the initial values of the remaining variables are consistent with regularity. If these conditions cannot be fulfilled one will not be able to specialize to regular solutions, although one may be able to generate all solutions. With these in mind, we take a closer look at the regularity conditions below.
As usual in the literature, by regularity, we mean the finiteness of scalar polynomial invariants constructed from the Riemann tensor. This has been discussed by a number of authors for both isotropic and anisotropic fluid spheres (see, for example, [7,21,10,22]). For spherically symmetric static spacetimes it is sufficient that the Kretschmann scalar κ = R ρσ µν R µν ρσ is finite for scalar polynomial invariants constructed from the Riemann tensor (see, for example, [7]).
For such a spacetime in static coordinates, like (2.1) and (2.5), the algebraically independent Riemann tensor is pairwise diagonal with the following nonzero components: R 01 01 , R 02 02 = R 03 03 , R 12 12 = R 13 13 , R 23 23 . 3 Thus, the Kretschmann scalar becomes a sum of four squares: 13 13 and K 4 = −R 23 23 . This is finite iff each square term is finite. 4 . Thus, the finiteness of κ is sufficient to ensure the regularity of these scalars [21].
In the simplified line element (2.5), one geometric and one fluid variables appear, Φ(r) and ρ(r), and 5 As r → 0, m/r 3 → 4πρ/3 from the definition of m(r), equation (2.4). The last two terms in κ near r = 0 are separately proportional to ρ, so one needs ρ(0) to be finite. For the second term to be finite at the center, one needs Φ (0) = 0 and Φ (0) finite simultaneously, which make the first term finite without any extra conditions. Thus, the necessary and sufficient conditions that κ is finite at r = 0 are Under the above conditions, the first and second Weyl invariants, given by (C(r)) 2 /6 and (C(r)) 3 /36, respectively, where vanish identically as r → 0. This shows that the metric is conformally flat at the origin under these conditions [10,21]. These conditions are geometric in that none of the Einstein equations except the G t t component has been used, which amounts to merely renaming Ψ(r). These apply to both isotropic and anisotropic fluids spheres.

Equivalent Conditions of Regularity
We now explore the consequence of these geometric conditions on the other variables of the system. Applying them to the G r r and G θ θ /G φ φ equations, 6 we find The first relation between nonzero finite quantities is known [20] and they will be useful for our analysis. In terms of anisotropy one can write them as Note that any two of ρ(0), p(0), and Φ (0) will fix the initial value of the third quantity via (3.8) as well as imply that Φ (0) = 0 and P (0) = p(0) (or χ(0) = 0) as a consequence of the Einstein equations. In the isotropic case, P (0) = p(0) holds trivially and finiteness of ρ(0) ensures finiteness of p(0) via an equation of state as in stellar models. Thus, the following combinations are equivalent for regularity: Note that none of the above uses P (0). Combinations of P (0) with other functions like are not sufficient to reproduce the geometric conditions of regularity. One, thus, needs a supplemental condition to be able to use them. As we will see when generating regular solutions using (Φ (r), P (r)), such a condition arises quite fortuitously from the considerations of the differential equation. We will also see that and can serve as sufficient conditions for regularity for the anisotropic and isotropic systems, respectively. This is because Einstein's equations will produce the right behavior for m(r), which ensures that κ is finite at the origin. and

TOV and Momentum Conservation with Regularity
The only quantity that has not appeared so far in the discussion is p (r). To see the effect of regularity on p (r), it is natural to turn to the generalized TOV equation. 7 For the anisotropic case, it is easy to see that the TOV applies only for r > 0. However, we argue that, even for the isotropic case, one needs to look at the original momentum conservation equation (2.6) where p (r) appears only in rp (r), which is clearly valid at r = 0. The conditions of regularity then imply that p (r) will satisfy the following condition: lim r→0 rp (r) = 0 (isotropy and anisotropy) (3.19) under the above regularity conditions. This condition can be fulfilled by any finite p (0) (including zero), which would have been the only conclusion had we used the TOV equation. However, (3.19) clearly shows p(r) does not have to be differentiable at r = 0 while p(0) is finite. Such possibilities should be included if one is interested in generating all regular solutions. Further corroboration of condition (3.19) comes from casting the Kretschmann scalar in terms of p(r) using (2.7): The last two terms are the same as before and the second term implies that p(0) should be finite and that lim r→0 rp (r) is finite. However, for conformal flatness at the center, the vanishing of requires lim r→0 rp (r) = 0. Also note that, in either of the expressions above, p (r) does not appear except in rp (r). That the finiteness of κ in terms of ρ(r) and p(r) does not guarantee conformal flatness at the center, unlike when ρ(r) and Φ (r) were used, shows that something can get lost in translation.
To summarize, in choosing p(r) as a generating function, it has to be chosen such that to ensure all possible regular solutions. Other variables in (3.12)-(3.16) do not need any such qualification except that they are continuous and differentiable as shown. It is easy to see that, given the three quantities in the algebraic equation (3.8), no one function alone can ensure regularity at the center. This makes regularity in the anisotropic systems, where two inputs are needed, much easier to handle.
A Simple Nontrivial Example: We have discussed above how it is natural to conclude that p (0) 7 The TOV equation can be turned into a differential equation in m(r) and Φ(r), as we will see later.
is finite if one uses the TOV equation. This narrative is reinforced by the fact that p (0) = 0 is often preferred physically. However, it is easy to see that lim r→0 rp (r) = 0 (with finite p(0)) can be satisfied by functions like the following: where n > 1 and c > 0 is a constant. It is monotonically decreasing and lim r→0 + p (r) = DNE, but lim r→0 + rp (r) = 0 and p(0) = c. It is easy to construct similar examples. Such solutions should be included in the consideration of all regular solutions for both the isotropic and anisotropic systems.

Generating Functions and Solutions
Although for any pair of input functions one can find a solution of the system (2.7) and (2.8), for a pair of generating functions the system admits a general form solution and the metric can be expressed formally in terms of integrals involving these functions only. One then has what is called a generation algorithm. 8 As mentioned in the introduction, generating functions do not have to be from the set of basic variables, although this is the case in the existing algorithms in canonical coordinates, which we will revisit below [20,18]. We will consider all six combinations of two inputs that are possible out of ρ(r), p(r), P (r), and Φ(r). First, note that the following sets are equivalent: 1. Linear combinations of ρ(r), p(r), and P (r) are equivalent. This just involves rewriting the Einstein equations using corresponding linear combinations. This makes P (r) and χ(r) equivalent inputs when used alongside p(r), which we have seen in (2.8) and (2.9). 9 However, if one wants to take advantage of the simplified line element (2.5), one must keep ρ(r) as it is, as we do.
2. Specifying a function is equivalent to specifying another function if they are in a 1-1 algebraic correspondence. This obvious fact will help identify equivalent functions with the basic functions of the system.
3. For complete spheres, r ≥ 0, ρ(r) and m(r) are in 1-1 correspondence thanks to (2.4). Either is equivalent to specifying e ±2Ψ(r) . In the presence of a core, ρ(r) determines m(r) up to an arbitrary constant, the unspecified mass of the core. This point will be elaborated in Sections 4.2 as we will revisit the existing algorithms.
4. In both (2.6) and (2.7), only Φ (r) appears. The additive constant resulting from the integration of Φ(r) becomes a multiplicative constant in the line element and, as such, can be absorbed into the time coordinate of (2.5). Thus, we can treat Φ (r) as the basic function instead of Φ(r). 8 Whether those integrations can be performed exactly to obtain an exact solution is considered an a posteriori issue and considered individually. In most cases, this will require numerical integration, as mentioned in the introduction. 9 If p(r) is not used, one may be preferred over the other, as we have seen in the regularity conditions (3.16).

Algorithm for Generating All Isotropic Solutions
The isotropic system needs one input to generate a solution. This could be an equation of state, one of Φ(r), ρ(r), and p(r), or any suitable combination of these. Exact solutions of this system have been studied extensively and were mostly obtained using ad hoc assumptions on ρ(r), e 2Φ(r) (equivalently, Φ (r)), and e −2Ψ(r) (equivalently, m(r)). Out of the three basic functions, only one can serve as a generating function, as we will see below: • ρ(r): If one uses ρ(r) as the input, the TOV equation (2.8) is a (first-order) Riccati equation in p(r) of the form p + f (r)p + g(r)p 2 = h(r). By replacing p(r) in (2.8) and using (2.6), on the other hand one gets a Riccati equation in Φ (r). In either case, the basic problem is that the general Riccati is not solvable by quadratures. Thus, one cannot create an algorithm to generate all solutions using ρ(r) as the input.
• p(r): With p(r) as the input, the TOV equation is an Abel equation of the second kind in m(r) (see, for example, [32]). This is a more difficult equation to solve than the Riccati equation, even with special choices of coefficients, which perhaps explains why there is not a single example of p(r) being used as the input to obtain an exact solution for the isotropic system [27].
• Φ (r): With Φ (r) as input, the TOV equation turns into a first-order linear differential equation in m(r), which, as Weynman noticed in 1949, "can always be solved by quadratures" [31] and thus, one can have an algorithm that generates all solutions [20]. The details of this algorithm are contained in the corresponding anisotropic algorithm discussed below. This has, thus, been a popular route for obtaining an exact solution, too [27]. However, it is not easy to know beforehand what choice of Φ(r) would produce the desired properties of ρ(r) and p(r) or a particular equation of state. To generate solutions that are regular at the center, Φ(r) must have the property that Φ (0) = 0 and Φ (0) must be finite, as a necessary condition, as we discussed above in Section 3 and in [20]. We will address this below and see how Einstein's equations will fill the gap for regularity.

Generating Regular Anisotropic Solutions from the Existing Algorithm
For the two simultaneous inputs needed for the anisotropic system, if one combines anisotropy χ(r) (or, equivalently, P (r)) with ρ(r), p(r), or Φ(r), the qualitative behaviors remain the same as above. For (ρ(r), P (r)) and (Φ(r), P (r)), the generalized TOV is still a Riccati equation and an Abel equation of the second kind in m(r), respectively, with no gain in their general solvability. The only generating pair is (Φ(r), P (r)), which a natural extension of the isotropic case, and has been worked out using χ(r) [18]. Below we will rederive this and look for specialized algorithms that generate all regular solutions.

Existing Algorithm for (An)isotropic Solutions: A Second Look
The generalized TOV can be turned into a first-order differential equation in m(r) for either (Φ(r), P (r)) or (Φ(r), χ(r)) as input. One can solve (2.7) algebraically for p(r) and substitute it in (2.8) or (2.9) with m (r) = 4πρr 2 to get 10 : Unlike the Riccati or the Abel equation, this can be solved exactly for arbitrary forms of its variable coefficients: The coefficients for (Φ(r), P (r)) are Thus, there is a one-parameter family of solutions m(r) for any input (Φ(r), P (r)), which will give a parameter-dependent p(r) algebraically via (2.7). The resulting one-parameter family of geometries found by substituting (4.2) and Φ(r) in the line element (2.5) will differ nontrivially in its g rr component for different values of C. The isotropic case is recovered by setting P (r) = p(r); in this case, one would have eliminated at the previous step the P (r) appearing in b(r). If one uses χ(r) instead of P (r), the coefficients of (4.1) are then as follows: The algorithm presented in [18] uses the inputs (z(r), Π(r)): z(r) = Φ + 1/r, (4.7) Π = 8π(p − P ), (4.8) which, from the discussion at the beginning of this section, are equivalent to the (Φ (r), P (r)) or (Φ (r), χ(r)) that we used above. It also used y(r) = 1 − 2m(r)/r instead of m(r). This is e −2Ψ(r) . With these, it is easy to check that (4.1) is precisely equation (8) of [18]: We do not reproduce the final one-parameter y(r) or the metric expressed in terms of z and Π [18]. Although completely equivalent, using m(r) instead of y(r) makes it slightly easier to interpret the free parameter in the general solution. 10 One can also use G θ θ and G r r − G θ θ equations for this.

Regular Solutions using Φ(r) and P (r)
There is no discussion in the literature on the role of the parameter that appears in the solution of y(r) in [18] or in m(r) in [20] for the isotropic case. We will now identify the parameter by looking at (4.1) from the point of view of an initial-value problem first and discuss its subsequent role as r → 0. Assuming, there is a core, i.e., r = r c > 0, one needs to solve the following initial-value problem for r ≥ r c : where m c is the mass of the core. This has the unique solution: which, on comparison with (4.2), shows that C = m c precisely. Thus, the parameter C in our formulation above, and in that of [20], represents the mass of the (nonzero) core. 11 (We will soon see that for complete spheres it will assume a different meaning.) One can further qualify C on physical grounds for nonzero cores. For example, for a Schwarzschild core, one must have: Thus, contrary to the impression given by the general solution (4.2) of m(r), not all possible values of the parameter C are admissible. For complete fluid spheres with r ≥ 0, unfortunately, one cannot set m(0) = 0 to get C = 0 as r = 0 is a singular point of the differential equation (lim r→0 + a(r) diverges). However, r = 0 is a regular singular point since lim r→0 + ra(r) is finite (see, for example, [9]). To analyze the solution near it, we consider the dominant terms in a(r) and b(r) as r → 0: where we have used lim r→0 + Φ(r)/r = Φ (0). This yields the following general solution: Imposing the initial value m(0) = 0 will not allow us to determine the arbitrary constant C 1 , illustrating the breakdown of the uniqueness theorem at the singular point r = 0. This linear term will prevent lim r→0 + m(r)/r 3 from being finite and will give a non-regular solution for any C 1 = 0. 12 This is expected from our discussions on regularity in Section 3 since Φ (0) = 0, Φ (0) finite, and P (0) finite are not sufficient for regularity. The cubic term in (4.15) comes from the first term of (4.2). The linear term, on the other hand, comes from the second term of (4.2), Ce − a(r)dr , which gives the difference between any two 11 Note that this does not follow from the look of (4.1) since C is in its numerator. 12 The condition m(0) = 0 is a necessary but not sufficient condition of regularity; it avoids a conical singularity [30] and one needs m(r)/r 3 to be finite as we discussed earlier.
solutions of (4.1). It is, thus, easy to see that C 1 = C in (4.15). So, if we can find a condition that requires C 1 = 0 in (4.15), we can set C = 0 in general.
Fortunately, this can be argued from the general solution (4.2) as a limiting process as follows. After integrating the diverging term 1/r, (4.2) can be rewritten as It is easy to see as r → 0, both α(r) and b(r)/r go to zero. As r → 0 the first term of the right hand side diverges since the integrand α(r) → 0. However, the other part is finite: Since lim r→0 + m/r 3 = 4πρ(0)/3, one get from (4.16) This is the regularity condition (3.9). We, thus, have the following theorem. and central density given by

Regular Solutions using Φ(r) and χ(r)
The above (i.e., the vanishing of C 1 and, hence, C) can also be argued by invoking the vanishing of anisotropy at the center in regular solutions, i.e., χ(0) = 0. Using anisotropy, i.e., (4.5) and (4.6) for a(r) and b(r), and keeping the dominant terms as before one gets: Here, opposite to (4.15), the first and second terms come, respectively, from the second and first terms of the corresponding general solution (4.2). 13 Other terms in the expansions of Φ (r) and χ(r) would produce terms with powers higher than three, as one can easily check.
Comparing (4.15) with (4.23) clearly shows that we have to set C 1 = 0 in (4.15), and hence, C = 0 in (4.2), to achieve isotropy and regularity simultaneously at the center. This also shows that in (4.23) C = Φ (0) − 4πP (0), which could not be achieved using only anisotropy. The resulting m(r) and p(r) will be parameter-free and so the metric (2.5) will be unique for every appropriate choice of (Φ (r), P (r)).
The general solution (4.2) with χ(r) can also be used for r = 0 provided one imposes the conditions of regularity as r → 0 + . This can be seen by rewriting the general solution as It is easy to check that lim r→0 + α(r) = 0 and lim r→0 + b(r)/r 3 is finite if, for χ(0) = 0, χ (0) and Φ (0) are finite. However, these extra conditions do not appear in the Einstein equations for the system. So, the right way to recover the solution at r = 0 from the general form (4.24) above (which was obtained for r = 0) is, first, to impose the conditions of regularity: χ(0) = 0 and lim r→0 + Φ(r)/r = Φ (0). After integration, the second term in (4.24) will then precisely reproduce the Φ (0)r 5 /2 term of (4.23). With this, (4.24) is a regular one-parameter family of solutions. 14 Theorem 4.2: For two differentiable functions Φ (r) and χ(r) defined on the common interval [0, r b ), 0 < r b < ∞, such that Φ (0) = χ(0) = 0 and Φ (0) is finite, each input (Φ (r), χ(r)) generates a one-parameter family of anisotropic fluid spheres that are regular at the center.
Thus, the conditions Φ (0) = χ(0) = 0 and finite Φ (0) are sufficient conditions for regularity for anisotropic fluid spheres. Note that these conditions alone do not make κ finite. However, they prove sufficient for the system because the Einstein equations lead to m(r) having the right behavior under these conditions, making κ finite. We, thus, have the following for the isotropic system:

Three New Choices and an Algorithm
We now consider the remaining three combinations of the four variables of the anisotropic system: (ρ(r), p(r)), (ρ(r), Φ(r)), and (p(r), Φ(r)). The line element (2.5) can be formally integrated and be expressed it in terms of ρ(r) and p(r) 15 : (ρ(r)+p(r))r 2 r−2m(r) dr dt 2 + dr 2 1 − 2m(r) r + r 2 (dθ 2 + sin 2 θdφ 2 ). (4.30) This metric requires two integrations to generate any particular solution, but it is now abundantly clear that one can generate all solutions by specifying (ρ(r), p(r)). However, what about the other two pairs and regular solutions? The answer can be summarized as follows. Proof: We first note that the algebraic relation (2.6) is linear in Φ (r), m(r), and p(r). Thus, any two determine the third one uniquely. 16 We have already noted that Φ (r) and Φ(r) are equivalent and that ρ(r) and m(r) are equivalent if we have the origin at r = 0 (with zero cental mass) or a core r ≤ r c with a known mass. Thus, (m(r), p(r)), (ρ(r), Φ(r)), (p(r), Φ(r)), and (ρ(r), p(r)) are equivalent inputs. In the absence of any such boundary condition, purely at the differential equation level, specifying ρ(r) will return a family of functions m(r) with an arbitrary additive constant (parameter) C. The equivalence will continue to hold, since (ρ(r), p(r)) and (ρ(r), Φ(r)) will then, respectively, determine Φ(r) and p(r) via the same algebraic relation above, up to the same parameter. On the other hand, using (p(r), Φ(r)) as input will determine m(r) and hence, ρ(r) uniquely. 15 This is obtained by rewriting Φ(r): . Given that (ρ(r), p(r)), (ρ(r), Φ(r)), and (p(r), Φ(r)) are equivalent inputs, it is sufficient to work with the pair (ρ(r), p(r)) to see that it generates all solutions. ρ(r) determines m(r) and hence, g rr and the pair (ρ(r), p(r)) fixes Φ(r) and hence, g tt uniquely and determines P (r) uniquely algebraically via (2.8). Thus, for any of (ρ(r), p(r)), (ρ(r), Φ(r)), or (p(r), Φ(r)), one requires two integrations to find m(r) and Φ(r). For fluid solutions starting from r = 0 or surrounding a central core of known mass, every choice of input pair will generate a unique sphere. On the other hand, if one does not consider a boundary value imposed by the center, as we discussed above, one gets a one-parameter family.
It is important to appreciate that nothing trivial is happening here. The line element (4.30) is equally valid for the isotropic case, but there ρ(r) and p(r) cannot be specified simultaneously. For the same reason, the algebraic equivalence of the three pairs loses its significance (except at the level of regularity) in the isotropic case, since one can specify only one input. On the other hand, specifying ρ(r) or p(r) leads to Abel or Riccati equations, which are very difficult to solve in general. Here, we can choose ρ(r) and p(r) simultaneously and independently, which makes it immensely simpler to satisfy the regularity conditions. This is a clear advantage of the anisotropic system over the isotropic system.
The isotropic limit of any anisotropic solution with the same potential function can be found by applying the algorithm of [20]. For a given potential function Φ(r), if m A (r) and m I (r) are the mass functions for the anisotropic and isotropic solutions, respectively, then by introducing a parameter α, one can write: m A (r) = m I (r) + αF (r). (4.34) Since the field equations (3.6) and (3.7) are linear (as an algebraic equation and as a differential equation) in the mass function, the radial and tangential pressures have linear relations with the isotropic pressure. (See [8] or substitute (4.34) into (3.6) and (3.7) to obtain p(r) and P (r) in terms of the isotropic pressure and F (r).)

Regular Solutions via the New Algorithm
Combining with the discussions on regularity in Section 3, it is very clear how one can generate all regular anisotropic solutions using the above algorithm in addition to Theorem 4.1 Theorem 4.5: All anisotropic fluid solutions of Einstein equations in canonical coordinates that are regular at the center can be generated using any of the following: (a) (ρ(r), p(r)) with ρ(0) finite, p(0) finite, and lim r→0 rp (r) = 0, (b) (ρ(r), Φ(r)) with ρ(0) finite, Φ (0) = 0, and Φ (0) finite, (c) (p(r), Φ(r)) with p(0) finite, lim r→0 rp (r) = 0, Φ (0) = 0, and Φ (0) finite. This algorithm cannot be specialized to produce only isotropic solutions. However, it does generate all isotropic solutions as the special case when the pair (ρ(r), p(r)) satisfies the TOV equation of the isotropic system.

Harvesting the Riccati
An interesting feature of a Riccati equation is that if a particular solution is known, one can find the general solution by adding to the particular solution the general solution of an associated Bernoulli equation. 17 Finding a particular solution, thus, is as difficult as finding the general solution, unless the particular solution is exported from elsewhere. The two algorithms can do just that.

Riccati in p(r)
Any "seed" solution (ρ i (r), p i (r), Φ i (r), χ i (r)) or, equivalently, (ρ i (r), p i (r), Φ i (r), P i (r)) generated by either algorithm can be seen as a particular solution of equation (2.8) and (2.8). They both are Riccati equations in p(r): dp dr + f (r)p + g(r)p 2 = h(r), where the coefficients f (r), g(r), and h(r) are determined by ρ i (r) and χ i (r) as in (2.9) or by ρ i (r) and P i (r) as in (2.8). The general solution of (2.9) is It is easy to check that as r → 0, both f (r) → 0 and g(r) → 0 under the same conditions of regularity discussed in Section 3. Thus, However, since anisotropy has been kept the same, and thus still vanishes at the center, in the new solution the two pressures increase or decrease by the same amount C and that the new solution is regular for any C. Thus one gets a one-parameter family of regular solutions for any regular seed solution.
On the other hand, the general solution of (2.8), where f (r), g(r), and h(r) are determined by ρ i (r) and P i (r), the general solution is where f 0 (r) = f (r) − 2/r. It is easy to see that unless the second term vanishes, there is no way one can get p(r) = P i (r). So there will be nonzero anisotropy at the center and the one-parameter solution is not regular. 17 There is a nice discussion in the appendix of [5] on the possible forms of general solutions of the Riccati equation when one, two, or three particular solutions are known; in all cases there is one single constant of integration, as expected. There are a number of transformations that convert a general Riccati into a homogeneous linear secondorder ordinary differential equations whose general solutions have two arbitrary constants; however, all of these map back to a one-parameter solution of the Riccati equation.

Riccati in Φ (r)
As we mentioned earlier, the generalized TOV can also be seen as a Riccati equation in Φ (r), One can thus generate another one-parameter solution using a regular seed solution and it is not difficult to see that Φ N (0) = Φ i (0) (5.6) and thus the resulting one-parameter solutions can be regular. However, since this uses the same input (ρ(r), P (r)) as the Riccati equation in p(r), all solution of the latter can be combined with ρ(r) algebraically via (2.7) to give the same Φ (r) and hence one will get the same one-parameter family of solutions. We, thus, have the following theorem: This would apply to all solutions including those generated using equations of state. The resulting one-parameter solutions, however, will not in general obey the equation of state of the seed.

Physical Solutions: Two New Classes of Anisotropic Solutions
In addition to central regularity and matching with the Schwarzschild metric at the boundary, the following properties are often sought in a physical fluid sphere (see, for example, [10,17]):

Example I
Consider the following density and radial pressure as two input functions: where r b > 0 is a boundary. Thus, the radial pressure and density follow the relationship, p ∝ ρ 2 , and vanish simultaneously at the boundary. Furthermore, From condition (3.14), the solution is regular the center. The mass function is given by Thus, the mass function is same as in the Tolman-VII solution 20 [28]. It turns out that the tangential pressure vanishes at the boundary as well and is given by (6.4) Furthermore, the g tt component of metric, from (4.30) reduces to (6.6)

Example II
Consider the following potential function and density profile as two input functions: 21 In other words, the g tt component of the metric is Gaussian. Moreover, Therefore, from (3.12), the solution is regular at the center. Since
Once again, the mass function is the same as that in the Tolman-VII solution (but the density is non-zero at the boundary) where From the field equations We take γ = 1 for simplicity. Thus, p(0) = P (0) > 0 if (6.14) Since the radial pressure is of degree four in r and is symmetric under the transformation r → −r, equation p(r) = 0 has a maximum of two roots for r ≥ 0. If r b is the smaller root, ρ b can be found in terms of ρ 0 and r b . One way to find specific solution would be to choose ρ 0 first, and then choose r b such that 0 ≤ ρ b < ρ 0 . Here, we directly choose values of a 2 and b 2 such that all physical conditions, except (5), are satisfied.

Conclusion
We studied all possible combinations of the basic functions in curvature coordinates to produce all solutions of the (an)isotropic fluid system via quadrature and paid particular attention to subalgorithms that can generate all (and only) regular solutions. This first required us to revisit and take a closer look at the geometric conditions of central regularity under the Einstein equations of the system and work out different equivalent conditions of regularity. The conditions of regularity, in general, are three conditions on two functions, with the only exception in the case of isotropy when two conditions on the potential function are found to be sufficient. We also found that one can allow p(r) to be non-differentiable at r = 0 as long as lim r→0 rp (r) = 0 to generate regular solution; one should include such functions to generate all (regular) solutions when using p(r) as one of the inputs. There is no discussion in the literature on the regularity of the existing algorithm for the anisotropic system [18]. We, therefore, revisited this first using a slightly different set of variables, Φ (r) and P (r). We noted that the parameter arising in the general solution of this algorithm could be interpreted as the core mass in the presence of a nonzero core, which, therefore, cannot be negative or unbounded on physical grounds. For solutions starting from r = 0, i.e., complete spheres (possibly terminating at a finite radius), the same analysis gives multiple solutions with zero central mass, and they are regular if and only if the parameter is set to zero. Thus, all anisotropic spheres are produced in a 1-1 fashion using Φ (r) and P (r) as generating functions. When Φ (r) and χ(r) are used as input functions, as in [18], the parameter in the general solution reverses its role and does not have to be zero; one, thus, have a one-parameter family of solutions that are regular under the usual initial conditions on Φ (r) and χ(r) for regularity. In addition, in comparison with the algorithm using Φ (r) and P (r), we can now interpret the parameter as the central density. This also means that for pure isotropy, we get a one-parameter family of regular solutions, and the parameter, the central density, remains free; this analysis thus complements the analysis for the isotropic system in [20].
We found that the three other combinations-(ρ(r), p(r)), (ρ(r), Φ (r)), and (p(r), Φ (r))lead to another algorithm for the anisotropic system. The equivalency of the three pairs in this algorithm arises precisely because of the same algebraic relation between these three functions that made the different equivalent sets of regularity conditions possible. 22 The line element (4.30) is very suitable for this algorithm. We noted that in regular solutions finiteness of p(0) has to be be supplemented by lim r→0 rp (r) = 0. This extra condition comes from our analysis of (2.6) and is reconfirmed by the tensorial conditions of regularity. As for the other two choices-(ρ(r), Φ (r)) and (p(r), Φ (r))-we find that they are algebraically equivalent to (ρ(r), p(r)) and can be used with their accompanying regularity conditions to generate all regular solutions. It is quite conceivable that one would convert any such pair to (ρ(r), p(r)) and use (4.30). Note that ρ(r) and p(r) are output variables in the existing algorithms of isotropic and anisotropic systems and as such the line element (4.30) is especially significant only in this new algorithm for the anisotropic system. The conditions of regularity, as well as any energy condition, become a simple matter of choosing the appropriate algebraic forms of two generating functions in this algorithm. These exhaust all possible combinations of the basic functions of the anisotropic system. These results can be used with equations of state with little change.
An interesting feature of a Riccati equation is that if a particular solution is known one can work out the general solution. We have now three algorithms-with (ρ(r), p(r)), (Φ (r), P (r)), and (Φ (r), χ(r))-that generate all solutions and each of them is capable of generating all regular solutions. Any given solution generated by them can be seen as the particular solution of the Riccati equation (in p(r) or in Φ (r)) and one gets two distinct one-parameter family of solutions. We found that one of them necessarily results in solutions that are regular at the center, for both 22 We could not find a formal statement in the literature to this effect, but that (ρ(r), p(r)) can serve as generating functions for all anisotropic solutions is amply clear if one reads the generalized TOV equation as the defining algebraic equation for P (r) in terms of ρ(r) and p(r).This fact, for example, was noted in [5] and this was used in [22] to generate a certain class of anisotropic solutions (using the Newtonian relationship p = −mρ/r 2 ). isotropy and anisotropy, if the particular solution used is regular.
Finally, following the new algorithm, we used (ρ(r), Φ(r)) and (ρ(r), p(r)) to generate examples of regular solutions that satisfy other physical conditions in addition to the condition of central regularity. In another work, we will discuss various maps between and within isotropic and anisotropic solutions and see how they can facilitate the process of finding solutions that satisfy all physical conditions.