1 Introduction

The embedding of a 4-dimensional Riemann manifold into a higher dimensional Euclidean space has special interest in general relativity. Embeddings provide a way to geometrically characterise models in cosmology and astrophysics in a systematic fashion. They may also lead to new exact solutions of the Einstein field equations and modified gravity theories. In addition to classical gravity theories, embeddings are important in applications arising in extrinsic gravity studies, models of strings and membranes, and the brane world scenario [1]. Much attention has been given to finding explicit embeddings of well known spacetimes over the years. Important information and reviews on isometric embeddings of Riemann manifolds can be found in Eisenhart [2] and Stephani et al. [3]. The relevant conditions are contained in the Gauss–Codazzi–Ricci equations. The Riemann tensor has to be written in terms of a rank two symmetric tensor for an embedding to be possible. In a recent study Murad [4] provides a history of embeddings and references to early papers in the subject. In this treatment a general algorithm is described to embed anisotropic compact stellar objects. Spherical symmetry has received the most attention because of cosmological and astrophysical applications. Early results on spherical symmetry with embedding conditions are contained in the works of Eiesland [5], Karmarkar [6] and Kohler and Chao [7].

Compact objects in strong gravitational fields with high densities are of interest in astrophysics. Recently the connections between compact objects, static spherical geometry and embeddings have received considerable attention in many studies [8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]. These studies show that embeddings may lead to solutions of the field equations which are physically acceptable in the description of superdense astronomical objects. Radiating spherically symmetric stars with relativistic effects are also of physical importance. Such radiating objects are more difficult to study in conjunction with the Gauss–Codazzi–Ricci equations. A few models in this context have been obtained recently. Naidu et al. [31] found a radiating model using the embedding equations for specific choices of the potentials. A shear-free dissipative model was studied by Ospino and Nunez [32]. An initial static core eventually contracts through dissipation loading to a radiating model considered by Govender et al. [33]. Models obtained through embeddings generate realistic temperature profiles and are consistent with causal thermodynamics as shown by Jaryal [34]. We expect that embeddings in radiating structures will reveal interesting behaviour not easily describable in other approaches when solving the field equations or the boundary condition at the surface of the star.

A Lie group analysis can be used to obtain group invariant solutions to partial differential equations. Lie symmetries can be used to create group invariants which locally transform partial differential equations to ordinary differential equations. Lie symmetries frequently arise in stellar models as seen in the studies of [35,36,37]. The possibility of utilising Lie symmetries for the embedding equations was considered for particular conformally flat and shear-free spherical geometries by Paliathanasis et al. [38]. Lie symmetries do lead to radiating stars via embedding. We find that in this study that the Karmarkar condition in spherical symmetry always admits Lie point symmetries. Hence simplification of the Karmarkar condition is possible by a change of variable simplifying the process of finding exact solutions to the embedding equations. These solutions will hold in any theory of gravity as the embedding condition is geometrical. Such solutions to the field equations may be used to generate cosmological models. If the boundary conditions at the stellar surface are satisfied in addition to the Karmarkar condition then we can generate a relativistic star.

The purpose of this paper is to consider the role of the Karmarkar embedding condition in a general spherically symmetric spacetime utilising Lie groups. Our approach may be viewed as an extension to the study in [38]. However unlike [38], we do not place any restrictions on the metric functions when obtaining the Lie symmetries. This allows for a more general treatment to be conducted. We first consider the special geometric cases of conformally flat, geodesic and shear-free metrics. The Lie symmetries are obtained for the embedding condition in each case with related exact solutions. In addition, we consider the general embedding equation, without any geometric restrictions, and find the Lie symmetries of the Karmarkar condition without any restrictions in the case of spherical symmetry. Exact solutions are found in this general case; we believe that this is the first such analysis. We also use one of the solutions for the Karmarkar condition to find a radiating stellar model. This model has the remarkable feature of having three distinct properties: group invariant under the one parameter Lie symmetry group, embeddable in a higher dimensional Euclidean space, and satisfying an equation of state.

2 Karmarkar condition

The general line element for a spherically symmetric spacetime is given by

$$\begin{aligned} \text{ d }s^2=-A^2\text{ d }t^2+B^2\text{ d }r^2+Y^2\left( \text{ d }\theta ^2+\sin ^2\theta \text{ d } \phi ^2\right) , \end{aligned}$$
(1)

where A, B and Y represent the gravitational potential functions, which are functions of r and t. The Karmarkar condition can be used to embed a 4-dimensional spherically symmetric spacetime into a 5-dimensional pseudo Euclidean space, and was expressed in [6] via the Riemann tensor components in a spherically symmetric spacetime. The relationship between the Riemann tensor components is give by

$$\begin{aligned} R_{1010}R_{2323}=R_{1212}R_{3030}-R_{2102}R_{3103}, \end{aligned}$$
(2)

where \( (x^a)=\left( x^0,x^1,x^2,x^3 \right) =\left( t,r,\theta , \phi \right) \). The nonzero Riemann tensor components are given by

$$\begin{aligned} R_{1010}= & {} \frac{1}{A B} \left( -A_r A^2 B_r+A_t B^2 B_t+A_{rr} A^2 B-A B^2 B_{tt}\right) , \end{aligned}$$
(3a)
$$\begin{aligned} R_{2323}= & {} \frac{\sin ^2(\theta ) Y^2}{A^2 B^2} \left( A^2 B^2-A^2 Y_r^2+B^2 Y_t^2\right) , \end{aligned}$$
(3b)
$$\begin{aligned} R_{1212}= & {} -\frac{1}{A^2 B} Y \left( -A^2 B_rY_r+A^2 B Y_{rr} -B^2 B_t Y_t\right) , \end{aligned}$$
(3c)
$$\begin{aligned} R_{3030}= & {} \frac{\sin ^2(\theta ) Y }{A B^2} \left( A_t B^2 Y_t+A_r A^2 Y_r-A B^2 Y_{tt}\right) , \end{aligned}$$
(3d)
$$\begin{aligned} R_{2102}= & {} \frac{Y }{A B} \left( -A_r B Y_t-A B_t Y_r+A B Y_{rt}\right) , \end{aligned}$$
(3e)
$$\begin{aligned} R_{3103}= & {} \frac{\sin ^2(\theta ) Y}{A B}\left( -A_r BY_t-AB_t Y_r+A B Y_{rt}\right) . \end{aligned}$$
(3f)

Unless otherwise stated, throughout this paper subscripts on the variables denote partial differentiation. We use (2) and (3) to express the Karmarkar condition for the line element (1) as the partial differential equation

$$\begin{aligned}{} & {} A B \left( B \left( A_r Y_t-A Y_{rt}\right) +A B_t Y_r\right) ^2+\left( -A_r A^2 B_r\right. \nonumber \\{} & {} \quad \left. \,+B^2 \left( A_t B_t-A B_{tt}\right) +A_{rr} A^2 B\right) \left( B^2 \left( A^2+Y_t^2\right) \right. \nonumber \\{} & {} \quad \left. \,-A^2 Y_r^2\right) -\left( B^2 \left( A_t Y_t-A Y_{tt}\right) +A_r A^2 Y_r\right) \nonumber \\{} & {} \quad \times \left( A^2 B_r Y_r -A^2 B Y_{rr}+B^2 B_t Y_t\right) =0. \end{aligned}$$
(4)

Particular solutions to the embedding condition (4) have been found in the past. The physically interesting cases are listed in Stephani et al. [3]. Some other special cases are presented in Paliathanasis et al. [38]. Our treatment is a general analysis using Lie symmetries in a group theoretical approach. We first consider conformally flat, shear-free and geodesic metrics. Finally the general spherically symmetric metric is analysed without placing any restriction on the spacetime. In all cases the Lie point symmetries for the Karmarkar condition (4) are found. Exact solutions to (4) are presented.

3 Conformally flat metric

We first consider conformally flat metrics. Note that a spacetime is conformally flat if and only if the Weyl tensor vanishes [3]. It is therefore not necessary to consider Weyl-free metrics unlike the case in the study conducted in [38]; the Weyl-free metrics can all be transformed to the form given in (5). For conformal flatness we set \(A=B\) and \(Y=rB\) in (1) and obtain the line element

$$\begin{aligned} \text{ d }s^2=B^2\left( -\text{ d }t^2+\text{ d }r^2+r^2\left( \text{ d }\theta ^2+\sin ^2\theta \text{ d } \phi ^2\right) \right) . \end{aligned}$$
(5)

For this metric (4) reduces to

$$\begin{aligned}{} & {} -4 r^2 B_t B_r B_{rt}+B \left( r^2 B_{rt}^2+B_r^2+r B_{tt} B_r \right. \nonumber \\{} & {} \quad \left. -r \left( r B_{tt}+B_r\right) B_{rr}\right) +2 r B_r^2 \left( r B_{tt}+B_r\right) \nonumber \\{} & {} \quad \,+2 r B_t^2 \left( r B_{rr}-B_r\right) =0, \end{aligned}$$
(6)

which is the Karmarkar condition. We use the software package SYM [39] interactively to obtain all Lie symmetries in this paper. The symmetries for (6) are given by

$$\begin{aligned} X_1= & {} \partial _t, \end{aligned}$$
(7a)
$$\begin{aligned} X_2= & {} B \partial _B,\end{aligned}$$
(7b)
$$\begin{aligned} X_3= & {} \frac{1}{r}\partial _r,\end{aligned}$$
(7c)
$$\begin{aligned} X_4= & {} B^2 \partial _B\end{aligned}$$
(7d)
$$\begin{aligned} X_5= & {} \left( r^2 -t^2\right) B^2 \partial _B, \end{aligned}$$
(7e)
$$\begin{aligned} X_6= & {} tB^2 \partial _B,\end{aligned}$$
(7f)
$$\begin{aligned} X_7= & {} r\partial _r + t \partial _t,\end{aligned}$$
(7g)
$$\begin{aligned} X_8= & {} \frac{1}{rB}\partial _r,\end{aligned}$$
(7h)
$$\begin{aligned} X_9= & {} \frac{t^2}{r}\partial _r +t \partial _t,\end{aligned}$$
(7i)
$$\begin{aligned} X_{10}= & {} \frac{t}{r}\partial _r,\end{aligned}$$
(7j)
$$\begin{aligned} X_{11}= & {} \frac{t}{rB}\partial _r +\frac{1}{B} \partial _t,\end{aligned}$$
(7k)
$$\begin{aligned} X_{12}= & {} \left( \frac{t^3}{r}-r t \right) \partial _r - (r^2-t^2) \partial _t,\end{aligned}$$
(7l)
$$\begin{aligned} X_{13}= & {} 2tB \partial _B -2 r t\partial _r -(r^2+ t^2) \partial _t,\end{aligned}$$
(7m)
$$\begin{aligned} X_{14}= & {} 2 \partial _B- \left( \frac{t^2}{rB }+\frac{r}{B} \right) \partial _r -\frac{2t}{B} \partial _t,\end{aligned}$$
(7n)
$$\begin{aligned} X_{15}= & {} \left( 2r^2 B -2 t^2 B \right) \partial _B + \left( \frac{t^4}{r}-r^3 \right) \partial _r \nonumber \\{} & {} + \left( 2 t^3-2 r^2 t \right) \partial _t. \end{aligned}$$
(7o)

In Paliathanasis et al. [38] only the Lie symmetries \(X_1\) to \(X_7\) are presented. However, there exist another eight Lie point symmetries given by \(X_8\) to \(X_{15}\) which are given above. Therefore there exists a 15-dimensional Lie algebra of symmetries for the Karmarkar condition for the conformally flat metric in general. Conformally flat metrics are equivalent to Weyl-free metrics, therefore there exists a 15-dimensional Lie algebra of symmetries for metrics with a vanishing Weyl tensor.

We demonstrate that group invariant exact solutions to the embedding condition (6) can be obtained via the Lie group approach. We take a general linear combination of \(X_1\), \(X_2\) and \(X_3\) to obtain

$$\begin{aligned} U=a_2 B\frac{\partial }{\partial B}+ \frac{a_3}{r} \frac{\partial }{\partial r}+ a_1\frac{\partial }{\partial t}, \end{aligned}$$
(8)

where \(a_1\), \(a_2\) and \(a_3\) are arbitrary constants. We use (8) to obtain the group invariants

$$\begin{aligned} x= & {} \frac{r^2}{2 a_3}-\frac{t}{a_1}, \end{aligned}$$
(9a)
$$\begin{aligned} B= & {} f e^{\frac{a_2 }{a_1}t}, \end{aligned}$$
(9b)

where f is a function of x. We substitute (9) into (6) to obtain the ordinary differential equation

$$\begin{aligned} -f f' \left( a_1^2 f''+a_2^2 a_3 f'\right) +2 a_1^2 f'^3+a_2^2 a_3 f^2 f''=0. \end{aligned}$$
(10)

We solve (10) to obtain

$$\begin{aligned} f= \frac{d_2 e^{\frac{\sqrt{a_1^4+2 a_1^2 a_2^2a_3 x+2 a_2^2 a_3 d_1}}{a_1^2}}}{a_1^2+\sqrt{a_1^4+2 a_1^2 a_2^2 a_3 x+2 a_2^2 a_3 d_1}}, \end{aligned}$$
(11)

where \(d_1\) and \(d_2\) are the arbitrary constants of integrations. Therefore we have the explicit form

$$\begin{aligned} x= & {} \frac{r^2}{2 a_3}-\frac{t}{a_1}, \end{aligned}$$
(12a)
$$\begin{aligned} B= & {} \frac{c_2}{a_1^2+\sqrt{a_1^4+a_1^2 a_2^2 r^2-2 a_1 a_2^2 a_3 t+2 a_2^2 a_3 d_1}}\nonumber \\{} & {} \times \exp \left( \frac{ \sqrt{a_1^4+a_1^2 a_2^2 r^2-2 a_1 a_2^2 a_3 t+2 a_2^2 a_3 d_1}}{a_1^2} +\frac{d_1 a_2 t}{a_1^2} \right) ,\nonumber \\ \end{aligned}$$
(12b)

which represents a solution set to (6).

4 Shear-free metric

We now consider another important physical case that arises in many models of radiating relativistic stars; that of shear-free metrics. The shear-free condition requires \(Y=rB\) in (1). We now work with the shear-free line element

$$\begin{aligned} \text{ d }s^2=-A^2\text{ d }t^2+B^2\left( \text{ d }r^2+r^2\left( \text{ d }\theta ^2+\sin ^2\theta \text{ d } \phi ^2\right) \right) . \end{aligned}$$
(13)

Note that A and B are still arbitrary. In particular, A is not constrained as in [38]. For this metric (4) reduces to

$$\begin{aligned}{} & {} \left( -A^2 \left( r B_r+B\right) ^2+A^2 B^2+r^2 B_t^2 B^2\right) \nonumber \\{} & {} \quad \times \left( -A_r A^2 B_r +B^2 \left( A_t B_t-A B_{tt}\right) +A_{rr} A^2 B\right) \nonumber \\{} & {} \quad +A B \left( r B_t \left( A_r B+A B_r\right) -r A B B_{rt}\right) ^2\nonumber \\{} & {} \quad -\left( A_r A^2 \left( r B_r+B\right) +r A_t B^2 B_t-r A B^2 B_{tt}\right) \nonumber \\{} & {} \quad \times \left( r A^2 B_r^2-A^2 B \left( B_r+r B_{rr}\right) +r B^2 B_t^2\right) =0, \end{aligned}$$
(14)

which is the Karmarkar condition.

We obtain the following Lie symmetries for (14) in the form

$$\begin{aligned} X_1= & {} A \partial _A + B \partial _B, \end{aligned}$$
(15a)
$$\begin{aligned} X_2= & {} -A {\mathcal {T}}' \partial _A + {\mathcal {T}} \partial _t,\end{aligned}$$
(15b)
$$\begin{aligned} X_3= & {} -B \partial _B +r \partial _r,\end{aligned}$$
(15c)
$$\begin{aligned} X_4= & {} \frac{1}{rB}\partial _r,\end{aligned}$$
(15d)
$$\begin{aligned} X_5= & {} 2 \partial _B - \frac{r}{B } \partial _r, \end{aligned}$$
(15e)

where \({\mathcal {T}}\) is an arbitrary function of t. Paliathanasis et al. [38] obtained only three Lie symmetries for a restricted case of the shear-free spacetime by assuming a relationship between A and B. We find that five Lie symmetries exist for the Karmarkar condition for the general shear-free metric.

Exact solutions to (14) can be found using Lie symmetries. We take a general linear combination of (15a), (15b) and (15c) to obtain

$$\begin{aligned} U= & {} A\left( a_1-a_2{\mathcal {T}}'\right) \frac{\partial }{\partial A} +B\left( a_1 -a_3\right) \frac{\partial }{\partial B}\nonumber \\{} & {} + a_3 r\frac{\partial }{\partial r}+ a_2 {\mathcal {T}}\frac{\partial }{\partial t}, \end{aligned}$$
(16)

where \(a_1\), \(a_2\) and \(a_3\) are arbitrary constants. We use (16) to obtain the group invariants

$$\begin{aligned} x= & {} \frac{1}{a_1} \int \frac{1}{{\mathcal {T}}} \, \text{ d }t-\frac{\log (r)}{a_3}, \end{aligned}$$
(17a)
$$\begin{aligned} A= & {} \frac{f }{{\mathcal {T}}}e^{\frac{(a_2+a_3)}{a_1}\int \frac{1}{{\mathcal {T}}} \, \tiny {\text{ d }}t}, \end{aligned}$$
(17b)
$$\begin{aligned} B= & {} g r^{a_2/a_3}, \end{aligned}$$
(17c)

where f and g are functions of x. We use (17) to reduce (14) to the ordinary differential equation

$$\begin{aligned}{} & {} a_1^2 f^3 e^{2 x (a_2+a_3)} \left( g \left( g' \left( -\left( \left( 3 a_2^2+6 a_2 a_3+2 a_3^2\right) f'\right) \right. \right. \right. \nonumber \\{} & {} \quad \left. \left. \left. \, -2 (a_2+a_3) f''\right) +(a_2+a_3) f' g''\right) \right. \nonumber \\{} & {} \quad \left. +g' \left( g' \left( 2 (a_2+a_3) f'+f''\right) -f' g''\right) \right. \nonumber \\{} & {} \quad \left. \, +a_2 (a_2+2 a_3) g^2 \left( (a_2+a_3) f'+f''\right) \right) \nonumber \\{} & {} \quad +a_3^2 f g g' \left( a_2 (a_2+2 a_3) g^2 f'+g \left( f' g'' \right. \right. \nonumber \\{} & {} \quad \left. \left. -g' \left( 4 (a_2+a_3) f'+f''\right) \right) +2 f' g'^2\right) +a_3^2 f^2 \left( 2 (a_2 \right. \nonumber \\{} & {} \quad \left. +a_3) g g'^3+(a_2+a_3) g^2 g' \left( g''-2 (a_2+a_3) g'\right) \right. \nonumber \\{} & {} \quad \left. +a_2 (a_2+2 a_3) g^3 \left( (a_2+a_3) g'-g''\right) -g'^4\right) \nonumber \\{} & {} \quad -a_3^2 g^2 f'^2 g'^2=0. \end{aligned}$$
(18)

Then we set

$$\begin{aligned} f=c_1g \quad \text {and}\quad a_2=-a_3, \end{aligned}$$
(19)

where \(c_1\) is an arbitrary constant, in (18) to obtain the reduced equation

$$\begin{aligned} a_3 c_1 g (a_3-a_1 c_1) (a_1 c_1+a_3) \left( g g''-g'^2\right) =0. \end{aligned}$$
(20)

This has solution

$$\begin{aligned} g=d_2 e^{d_1 x}, \end{aligned}$$
(21)

where \(d_1\) and \(d_2\) are the arbitrary constants of integrations. Therefore we have the analytic forms

$$\begin{aligned} x= & {} \frac{\int \frac{1}{{\mathcal {T}}} \, \text{ d }t}{a_1}-\frac{\log (r)}{a_3}, \end{aligned}$$
(22a)
$$\begin{aligned} A= & {} \frac{c_1 d_2e^{d_1 x}}{{\mathcal {T}}}, \end{aligned}$$
(22b)
$$\begin{aligned} B= & {} \frac{d_2 e^{d_1 x}}{r}, \end{aligned}$$
(22c)

which comprise a solution to (14).

5 Geodesic metric

In this final physically important case, the particles are not accelerating and so exhibit geodesic motion. This requires \(A=1\) in (1) and we obtain the line element

$$\begin{aligned} \text{ d }s^2=-\text{ d }t^2+B^2\text{ d }r^2+Y^2\left( \text{ d }\theta ^2+\sin ^2\theta \text{ d } \phi ^2\right) . \end{aligned}$$
(23)

The Karmarkar condition for the metric (23) is given by the partial differential equation

$$\begin{aligned}{} & {} \left( B_t Y_r-B Y_{rt}\right) ^2-B B_{tt} \left( B^2 \left( Y_t^2+1\right) -Y_r^2\right) \nonumber \\{} & {} \quad +B Y_{tt} \left( B_t B^2 Y_t+B_r Y_r-B Y_{rr}\right) =0. \end{aligned}$$
(24)

We obtain the following Lie symmetries to (24) in the form

$$\begin{aligned} X_1= & {} -B{\mathcal {R}}' \partial _B+ {{\mathcal {R}}} \partial r, \end{aligned}$$
(25a)
$$\begin{aligned} X_2= & {} \partial _t, \end{aligned}$$
(25b)
$$\begin{aligned} X_3= & {} B \partial _B +t \partial _t +Y \partial _Y.\end{aligned}$$
(25c)
$$\begin{aligned} X_4= & {} \partial _r\end{aligned}$$
(25d)
$$\begin{aligned} X_5= & {} \partial _Y,\end{aligned}$$
(25e)
$$\begin{aligned} X_6= & {} Y \partial _t -t \partial _Y, \end{aligned}$$
(25f)

where \({\mathcal {R}}\) is an arbitrary function of r. Note that the geodesic case was not considered in the reference [38]. We find that there are six Lie symmetries to the Karmarkar condition for the geodesic metric.

We now show that group invariant solutions to (24) exist. We take a linear combination of (25a), (25b) and (25c) to obtain

$$\begin{aligned} U= & {} B\left( a_3-a_1 {\mathcal {R}}'\right) \frac{\partial }{\partial B}+ a_3Y \frac{\partial }{\partial Y}+ a_1 {\mathcal {R}}\frac{\partial }{\partial r}\nonumber \\{} & {} + \left( a_2+a_3t\right) \frac{\partial }{\partial t}, \end{aligned}$$
(26)

where \(a_1\), \(a_2\) and \(a_3\) are arbitrary constants. Then (26) gives the group invariants

$$\begin{aligned} x= & {} (a_2+a_3 t)^{1/a_3} e^{-\frac{1}{a_1}\int \frac{1}{{\mathcal {R}}} \, {\text{ d }}r}, \end{aligned}$$
(27a)
$$\begin{aligned} B= & {} \frac{g }{{\mathcal {R}}}e^{\frac{a_3}{a_1} \int \frac{1}{{\mathcal {R}}} \, {\text{ d }}r}, \end{aligned}$$
(27b)
$$\begin{aligned} Y= & {} h (a_2+a_3 t), \end{aligned}$$
(27c)

where f and g are functions of x. We use (27) to transform (24) to the ordinary differential equation

$$\begin{aligned}{} & {} a_1^2 g^3 \left( x g'' \left( \left( a_3 h+x h'\right) ^2+1\right) -g' \left( \left( a_3 h+x h'\right) \right. \right. \nonumber \\{} & {} \quad \times \left. \left. \left( 2 a_3 x h'+(a_3-1) a_3 h+x^2 h''\right) +a_3-1\right) \right) \nonumber \\{} & {} \quad -x^{2 a_3+3} g'^2 h'^2+x^{2 a_3+2} g h' \left( g' \left( 2 a_3 h'+x h''\right) \right. \nonumber \\{} & {} \quad \left. \, -x g'' h'\right) . \end{aligned}$$
(28)

We set

$$\begin{aligned} h=c_1 x^{-a_3} \quad \text {and}\quad a_3=-1, \end{aligned}$$
(29)

where \(c_1\) is an arbitrary constant. Then (28) reduces to

$$\begin{aligned} x g g'' \left( c_1^2-a_1^2 g^2\right) +c_1^2 x g'^2=0, \end{aligned}$$
(30)

with solution

$$\begin{aligned} g=\frac{\sqrt{c_1^2-a_1^4 d_1^2 (d_2+x)^2}}{a_1}, \end{aligned}$$
(31)

where \(d_1\) and \(d_2\) are the arbitrary constants of integrations. Therefore we have the explicit forms

$$\begin{aligned} x= & {} (a_2+t) e^{-\frac{1}{a_1}\int \frac{1}{{\mathcal {R}}} {\text{ d }}r } \end{aligned}$$
(32a)
$$\begin{aligned} B= & {} \frac{\sqrt{c_1^2-a_1^4 d_1^2 (d_2+x)^2} e^{\frac{1}{a_1} \int \frac{1}{{\mathcal {R}}} \, {\text{ d }}r}}{a_1 {\mathcal {R}}}, \end{aligned}$$
(32b)
$$\begin{aligned} Y= & {} c_1 e^{\frac{1}{a_1} \int \frac{1}{{\mathcal {R}}} \, {\text{ d }}r}, \end{aligned}$$
(32c)

which is a solution set to (24).

6 General metric

In this general case we place no restrictions on the metric functions in (1). The Karmarkar condition (4) has to be analysed in full generality.

The Lie symmetries of (4) are given by

$$\begin{aligned} X_1= & {} -A {\mathcal {T}}'\partial _A+{\mathcal {T}} \partial _t, \end{aligned}$$
(33a)
$$\begin{aligned} X_2= & {} -B {\mathcal {R}}'\partial _B+{\mathcal {R}} \partial _r, \end{aligned}$$
(33b)
$$\begin{aligned} X_3= & {} A\partial _A+B \partial _B + Y \partial _Y, \end{aligned}$$
(33c)
$$\begin{aligned} X_4= & {} \partial _Y, \end{aligned}$$
(33d)

where \({\mathcal {R}}\) and \({\mathcal {T}}\) are arbitrary functions of r and t respectfully. This general case was not considered by Paliathanasis et al. [38] or any other treatment. We find that four Lie point symmetries exist to the Karmarkar condition for the general metric (1). It is remarkable that four explicit Lie point symmetries can be found for the Karmarkar condition for the general spherically symmetric metric. We take a general linear combination of the system of Lie symmetries (33a), (33b) and (33c) to obtain

$$\begin{aligned} U= & {} A\left( a_3-a_1 {\mathcal {T}}'\right) \frac{\partial }{\partial A}+ B\left( a_3-a_2{\mathcal {R}}' \right) \frac{\partial }{\partial B}\nonumber \\{} & {} +a_3Y\frac{\partial }{ \partial Y}+a_1 {\mathcal {T}} \frac{\partial }{\partial t}+a_2 {\mathcal {R}} \frac{\partial }{\partial r}, \end{aligned}$$
(34)

where \(a_1\), \(a_2\) and \(a_3\) are arbitrary constants. We now show that exact solutions to the embedding condition (4) can be found for the general metric (1). Using (34) we obtain the group invariants

$$\begin{aligned} x= & {} \frac{1}{a_1}\int \frac{1}{{\mathcal {T}}}\, \text{ d }t -\frac{1}{a_2} \int \frac{1}{{\mathcal {R}}} \, \text{ d }r, \end{aligned}$$
(35a)
$$\begin{aligned} A= & {} \frac{f e^{\frac{a_3}{a_1}\int \frac{1}{{\mathcal {T}}} \, {\text{ d }}t}}{{\mathcal {T}}}, \end{aligned}$$
(35b)
$$\begin{aligned} B= & {} \frac{g e^{\frac{a_3}{a_2} \int \frac{1}{{\mathcal {R}}} \, {\text{ d }}r}}{{\mathcal {R}}}, \end{aligned}$$
(35c)
$$\begin{aligned} Y= & {} h e^{\frac{a_3}{a_1}\int \frac{1}{{\mathcal {T}}} \, {\text{ d }}t}, \end{aligned}$$
(35d)

where f, g and h are functions of x. We use (35) to transform (4) to the ordinary differential equation

$$\begin{aligned}{} & {} a_1^4 e^{2 a_3 x} f^3 \left( a_2^2 g \left( f' \left( a_3 g-g'\right) +g f''\right) \right. \nonumber \\{} & {} \quad \left. -e^{2 a_3 x} h' \left( f'' h'-f' h''\right) \right) +a_1^2 a_2^2 f g \left( a_2^2 g^2 f' g'\right. \nonumber \\{} & {} \quad \left. +e^{2 a_3 x} \left( g \left( a_3 h+h'\right) \left( a_3 h \left( a_3 f'+f''\right) +f'' h' \right. \right. \right. \nonumber \\{} & {} \quad \left. \left. \left. -f' h''\right) -f' g' \left( a_3^2 h^2+2 a_3 h h'+2 h'^2\right) \right) \right) \nonumber \\{} & {} \quad +a_2^2 g^2 \left( a_3 h+h'\right) \left( a_1^2 e^{2 a_3 x} f'^2 \left( a_3 h+h'\right) \right. \nonumber \\{} & {} \quad \left. +a_2^2 g \left( g' \left( 2 a_3 h'+h''\right) +a_3 h \left( a_3 g'-g''\right) -g'' h'\right) \right) \nonumber \\{} & {} \quad +a_1^2 a_2^2 f^2 \left( a_2^2 g^3 \left( a_3 g'-g''\right) -e^{2 a_3 x} h' \left( g g' h'' \right. \right. \nonumber \\{} & {} \quad \left. \left. -h' \left( g \left( g''-2 a_3 g'\right) +g'^2\right) \right) \right) =0. \end{aligned}$$
(36)

We set

$$\begin{aligned} f=c_1g \quad \text {and}\quad a_3=0, \end{aligned}$$
(37)

where \(c_1\) is an arbitrary constant, in (36) to obtain

$$\begin{aligned}{} & {} g^3 \left( a_1^2 c_1^2-a_2^2\right) \left( a_1^2 a_2^2 c_1^2 g^2 g''-a_1^2 a_2^2 c_1^2 g g'^2 \right. \nonumber \\{} & {} \quad \left. \, +(a_1 c_1+a_2) (a_2-a_1 c_1) h' \left( g'' h'-g' h''\right) \right) =0, \end{aligned}$$
(38)

which is a more tractable equation.

6.1 Model I

We note setting \(a_2=\pm a_1c_1\) solves (38). Hence we have the explicit forms

$$\begin{aligned} x= & {} \frac{1}{a_1} \int \frac{1}{{\mathcal {T}}}\, \text{ d }t\pm \frac{1}{a_1c_1} \int \frac{1}{{\mathcal {R}}} \,\text{ d }r, \end{aligned}$$
(39a)
$$\begin{aligned} A= & {} \frac{c_1 g}{{\mathcal {T}}}, \end{aligned}$$
(39b)
$$\begin{aligned} B= & {} \frac{g}{{\mathcal {R}}}, \end{aligned}$$
(39c)
$$\begin{aligned} Y= & {} h. \end{aligned}$$
(39d)

This represents simple solutions to (4). In this class of models g and h are arbitrary.

6.2 Model II

We observe that it is also possible to integrate (38) to obtain a functional form for h in terms of g. This leads to the explicit form

$$\begin{aligned} h=\int _1^x\frac{\sqrt{a_1^2 a_2^2 c_1^2 g(w)^2+\left( a_1^2 c_1^2-a_2^2\right) d_1 g'(w)^2}}{\sqrt{a_1^2 c_1^2-a_2^2}}\text{ d }w +d_2,\nonumber \\ \end{aligned}$$
(40)

where \(d_1\) and \(d_2\) represents constants of integration and w represents the dummy variable of integration. Hence a particular solution to (4) has the form

$$\begin{aligned} x= & {} \frac{1}{a_1} \int \frac{1}{{\mathcal {T}}} \, \text{ d }t-\frac{1}{a_2} \int \frac{1}{{\mathcal {R}}} \, \text{ d }r, \end{aligned}$$
(41a)
$$\begin{aligned} A= & {} \frac{c_1 g}{{\mathcal {T}}}, \end{aligned}$$
(41b)
$$\begin{aligned} B= & {} \frac{g}{{\mathcal {R}}}, \end{aligned}$$
(41c)
$$\begin{aligned} Y= & {} \int _1^x\frac{\sqrt{a_1^2 a_2^2 c_1^2 g(w)^2+\left( a_1^2 c_1^2-a_2^2\right) d_1 g'(w)^2}}{\sqrt{a_1^2 c_1^2-a_2^2}}\text{ d }w +d_2.\nonumber \\ \end{aligned}$$
(41d)

In this second model the solution of the Karmarkar condition depends only on the function g.

7 Applications

We have shown that the Karmarkar embedding condition has a rich structure in spherically symmetric spacetimes. Lie symmetries exist in cases with kinematical constraints and also for the general metric (1). The existence of Lie symmetries allows us to define new variables, replacing the coordinates t and r, leading to simplified forms of the Karmarkar condition. Then demonstrating exact solutions to (4) is simplified. Consequently solutions to the Karmakar condition, together with the field equations lead to cosmological models. In this cosmological context we mention a special case of the general spherically symmetric metric (1). The expanding de Sitter spacetime is described by \(H^2=\frac{\Lambda }{3}\), where H is the Hubble constant and \(\Lambda \) is the cosmological constant. The de Sitter metric is given by

$$\begin{aligned} \text{ d }s^2=-\text{ d }t^2+e^{2Ht}\left( \text{ d }r^2+r^2\left( \text{ d } \theta ^2+\sin ^2 \theta \text{ d } \phi ^2\right) \right) . \end{aligned}$$
(42)

The de Sitter model is homogeneous and isotropic, representing a section of a maximally symmetric manifold. The metric (42) is written in comoving synchronous coordinates, and it is important in describing cosmological processes such as in studies of dark energy. The Riemann tensor components of the de Sitter metric (42) satisfies the Karmarkar condition (2) and the spacetime is therefore embeddable in 5-dimensional pseudo Euclidean space. Note that the full set of the Gauss–Codazzi–Ricci equations are satisfied for the de Sitter geometry [3]. If we wish to describe astrophysical models with a radiating star in general relativity then the boundary conditions at the surface of the star have to be satisfied. We show that this is possible by considering a particular example. For more information on radiating stars in general relativity see the treatment of Maharaj and Brassel [40].

7.1 Boundary condition

We consider the shear-free metric. The field equations for the line element (13) can be given by

$$\begin{aligned} 8\pi \rho= & {} \frac{1}{r A^2 B^4}\left( r A^2 B_r^2-4 A^2 B B_r-2 r A^2 B( B_{rr} \right. \nonumber \\{} & {} \left. \, +3 r B^2 B_t^2\right) , \end{aligned}$$
(43a)
$$\begin{aligned} 8 \pi p_{\parallel }= & {} \frac{1}{r A^3 B^4}\left( 2 r A_r A^2 B B_r+2 r A_t B^3 B_t \nonumber \right. \\{} & {} \quad \left. +2 A_r A^2 B^2+r A^3 B_r^2+2 A^3 B B_r \right. \nonumber \\{} & {} \quad \left. \, -r A B^2 B_t^2 -2 r A B^3 B_{tt}\right) ,\end{aligned}$$
(43b)
$$\begin{aligned} 8 \pi p_{\perp }= & {} \frac{1}{r A^3 B^4}\left( 2 r A_t B^3 B_t +A_r A^2 B^2 \right. \nonumber \\{} & {} \quad \left. \, +r A_{rr} A^2 B^2 -r A^3 B_r^2 +A^3 B B_r \right. \nonumber \\{} & {} \quad \left. \, +r A^3 B B_{rr} -r A B^2 B_t^2 -2 r A B^3 B_{tt}\right) , \end{aligned}$$
(43c)
$$\begin{aligned} 8 \pi q= & {} \frac{2}{A^2 B^3} \left( -A_r B B_t-A B_t B_r+A B B_{rt}\right) , \end{aligned}$$
(43d)

where \(\rho \), \(p_{\parallel }\), \(p_{\perp }\) and q respectively represent the energy density, radial pressure, tangential pressure and heat flux. At the boundary of a radiating star the radial pressure \(p_{\parallel }\) is nonvanishing. This leads to the condition

$$\begin{aligned} p_{\parallel }= q. \end{aligned}$$
(44)

We substitute (43b) and (43d) into (44) to obtain the partial differential equation

$$\begin{aligned}{} & {} 2 r A_r A^2 B B_r+2 r A_r A B^2 B_t+2 r A_t B^3 B_t\nonumber \\{} & {} \quad +2 A_r A^2 B^2+r A^3 B_r^2+2 A^3 B B_r +2 r A^2 B B_t B_r\nonumber \\{} & {} \quad -2 r A^2 B^2 B_{rt}-r A B^2 B_t^2-2 r A B^3 B_{tt}=0. \end{aligned}$$
(45)

Equation (44) must be satisfied at the surface for a radiating stellar model. The general and complete solution to (45) is currently unknown.

We set

$$\begin{aligned} d_1=\frac{a_1 a_3 c_1}{\sqrt{3 a_1^2 c_1^2-2 a_1 a_3 c_1-a_3^2}} \end{aligned}$$
(46)

in (22) to obtain the potentials

$$\begin{aligned} x= & {} \frac{\int \frac{1}{{\mathcal {T}}} \, \text{ d }t}{a_1}-\frac{\log (r)}{a_3}, \end{aligned}$$
(47a)
$$\begin{aligned} A= & {} \frac{c_1 d_2 }{{\mathcal {T}}}e^{\frac{a_1 a_3 c_1 x}{\sqrt{3 a_1^2 c_1^2-2 a_1 a_3 c_1-a_3^2}}}, \end{aligned}$$
(47b)
$$\begin{aligned} B= & {} \frac{d_2 }{r}e^{\frac{a_1 a_3 c_1 x}{\sqrt{3 a_1^2 c_1^2-2a_1 a_3 c_1-a_3^2}}}. \end{aligned}$$
(47c)

The solution set (47) satisfies the system of partial differential equations consisting of the Karmarkar condition (14) and the boundary condition (45). Therefore we have generated a relativistic radiating star via an embedding with the assistance of Lie symmetries. Other examples of radiating stars which can be embedded in a 5-dimensional Euclidean space are given by Naidu et al. [31] and Paliathanasis et al. [38].

7.2 Equation of state

The exact solution (47) exhibits a desirable physical feature. A requirement for a physical radiating star is that a linear equation of state exists with

$$\begin{aligned} p_{\parallel }=\alpha \rho , \end{aligned}$$
(48)

where \(\alpha \) is the equation of state parameter. For the shear-free metric (13), Eq. (48) can be expressed as the partial differential equation

$$\begin{aligned}{} & {} 2 r A_r A^2 B B_r+2 r A_t B^3 B_t+2 A_r A^2 B^2\nonumber \\{} & {} \quad -\alpha r A^3 B_r^2+4 \alpha A^3 B B_r+2 \alpha r A^3 B B_{rr}\nonumber \\{} & {} \quad -3 \alpha r A B^2 B_t^2+r A^3 B_r^2+2 A^3 B B_r-r A B^2 B_t^2\nonumber \\{} & {} \quad -2 r A B^3 B_{tt}=0. \end{aligned}$$
(49)

The solution set (47) when

$$\begin{aligned} \alpha =\frac{a_1 a_3 c_1}{a_1^2 c_1^2-a_1 a_3 c_1+a_3^2}, \end{aligned}$$
(50)

satisfies the system of partial differential equations consisting of Karmarkar condition (14), the boundary condition (45) and equation of state (49). Consequently our radiating stellar model obtained via embedding admits a linear barotropic equation of state. Boundary conditions that admit equation of states in radiating relativistic stars are studied in Naidoo et al. [41]. It is therefore possible that other relativistic stars which are embeddable can be found with equations of state for the general spherical metric.

8 Discussion

We have performed a Lie symmetry analysis on the Karmarkar embedding condition for conformally flat, shear-free, geodesic and general spherical line elements. In each case we used (2) to express the Karmarkar condition as a partial differential equation. Then we obtained the Lie symmetries of the resulting partial differential equations, which we used to find group invariants. We then used the group invariants to transform the partial differential equations to ordinary differential equations. In each case we presented solutions to the transformed Karmarkar ordinary differential equations. Our results extend the earlier Lie group analysis of Paliathanasis et al. [38] who considered particular metrics in spherical geometry. We have found that additional Lie symmetries exist for conformally flat and shear-free metrics. We have also considered the geodesic and general spherical metrics, and found the corresponding Lie symmetries and exact solutions to the Karmarkar condition. Our analysis was comprehensive. The solutions we obtained to the Karmarkar condition are physically reasonable. We provided an application of the Karmarkar embedding condition to astrophysics in Sect. 6, by showing that the embedding solution (22), when certain parameters are restricted, can be used in a shear-free radiating star model that admits an equation of state. This stellar model has interesting properties: firstly, the solutions are (Lie) group invariant. Secondly, they satisfy the Karmarkar condition. Finally, they also admit an equation of state. As far as we are aware this is the first such model with all these properties.

It is important to note that the Lie symmetries for the conformally flat (5), shear-free (13), and geodesic metrics (23) for the embedding conditions are not contained in the Lie symmetries of the embedding condition for the general line element (1). This is because Lie symmetries can only be used to create local transformations in partial differential equations, and not all Lie symmetries for the different physical scenarios, considered in Sects. 34 and 5 can be obtained from the general Karmarkar condition (4). (This is similar to the case of a preliminary group classification where special cases of more general equations admit different Lie algebras of symmetries [42].) When restrictions are placed on the general Karmarkar condition (4) additional symmetries can be obtained. This study demonstrates the importance of the Lie symmetry approach in solving partial differential equations. This is seen in the group invariant exact solution set (47) and (50) that satisfies the system of partial differential equations consisting of Karmarkar condition (14), the boundary condition (45) and equation of state (49). In future studies we will explore additional approaches to solving the Karmarkar embedding conditions that involve other symmetries such as Noether or contact symmetries.