1 Introduction

In the so-called modified/extended theories of gravity [1] new dynamical terms, of geometric origin, are introduced which force the evolution of the gravitational field equations in order to explain various phenomena which were studied by recent observations [2, 3]. However, in the modified gravitational theories the new terms increase the complexity of the field equations and even in the simplest models, such as that of an isotropic and homogeneous universe, the existence of an analytical solution is not obvious. Although numerical methods can be applied to approximate the evolution of the field equations, that is not sufficient for the complete study of a theory; the analysis of the critical points it is not sufficient to provide us with information for the evolution of a system far from the critical points. Consequently the existence of analytical solutions for the field equations has lead to the application of various techniques from the analysis of dynamical systems for the study of the integrability.Footnote 1

One of the simplest modifications of the Einstein–Hilbert action which consider quantum corrections is the Starobinsky model of inflation [9] with action integral

$$\begin{aligned} S=\int \mathrm{d}^{4}x\sqrt{-g}(R+qR^{2})+\int \mathrm{d}^{4}x\sqrt{-g}L_{m}, \end{aligned}$$
(1)

where \(R^{2}\) describes the quantum-gravitational effects in the early universe and \(L_{m}\) is the Lagrangian of the matter source. The latter action integral corresponds to the family of the so-called quadratic theories instance [10,11,12].

The gravitational field equations are of fourth order and in the case of a spatially flat Friedmann–Lemaître–Robertson–Walker (FLRW) universe with line elementFootnote 2

$$\begin{aligned} \mathrm{d}s^{2}=-\mathrm{d}t^{2}+a^{2}(t)( \mathrm{d}x^{2}+\mathrm{d}y^{2}+\mathrm{d}z^{2}) \end{aligned}$$
(2)

are calculated to be

$$\begin{aligned}&3\left( \frac{\dot{a}}{a}\right) ^{2}-54q\left( \frac{\dot{a}}{a}\right) ^{4}+18q\left( 2\left( \frac{\dot{a}}{a}\right) ^{2}\frac{\ddot{a}}{a}-\left( \frac{\ddot{a}}{a}\right) ^{2}\right. \nonumber \\&\qquad \qquad \quad \left. +2\left( \frac{\dot{a}}{a}\right) ^{2}a^{\left( 3\right) }\right) =\rho _{m} \end{aligned}$$
(3)

and

$$\begin{aligned}&2\frac{\ddot{a}}{a}+\left( \frac{\dot{a}}{a}\right) ^{2}+18q\left( \left( \frac{\dot{a}}{a}\right) ^{4}+\frac{\ddot{a}}{a^{2}}\right) +24q\left( \frac{\dot{a}}{a^{2}}a^{\left( 3\right) }\right. \nonumber \\&\qquad \left. -3\left( \frac{\dot{a}}{a}\right) ^{2}\frac{\ddot{a}}{a}\right) +12q\frac{a^{\left( 4\right) }}{a}=-p_{m}, \end{aligned}$$
(4)

where \(\rho _{m}\), \(p_{m}\) are the energy density and the pressure of the matter source. In the case of vacuum the field equations (3) and (4) admit an unstable (special) nonsingular solution [9]. Moreover, it is important to mention that, when the equation of state parameter of the matter source, \(\rho _{m},~p_{m}\), is that of an ideal gas, i.e., \(p_{m}=\left( \gamma -1\right) \rho _{m}\), then Eq. (4) can be integrated to (3), while in general the conservation law \(\dot{\rho }_{m}+3H\left( \rho _{m}+p_{m}\right) =0\) holds.

The action integral (1) corresponds to the \(f\left( R\right) \) theories of gravity [13], where \(f\left( R\right) =R+qR^{2},\) while a more general consideration of the Starobinsky model is theFootnote 3 \(f\left( R\right) =R+qR^{n}\) theoryFootnote 4 [26] or [27]. Exact solutions of power-law f(R) theories can be found in [28, 29]. The importance of the Starobinsky model (1) is that it provides an inflationary scenario which is favored by the observations [30]. Furthermore, it has been shown that various models of inflation are identical to the Starobinsky model when the inflationary phase takes place [31] whereas the Mixmaster universe provides nonchaotic trajectories [32].

The introduction of a Lagrange multiplier in \(f\left( R\right) \) theories [33] can be used to reduce the order of the theory from a fourth-order to a second-order theory by increasing at the same time the number of degrees of freedom [34]. In particular a new field is introduced which is equivalent to that of a Brans–Dicke scalar field with zero Brans–Dicke parameter [14, 35] the so-called O’Hanlon theory [36]. Therefore the field equations in a FLRW background form a two-dimensional canonical Hamiltonian system which describes a particle moving in a flat space while the potential which forces the evolution of the system is related with the form of the \(f\left( R\right) \) function. Because the scalar field description is that of a Brans–Dicke field the theory is defined in the Jordan frame. Hence under a conformal transformation a minimally coupled scalar field is defined and the theory is defined now in the Einstein frame.Footnote 5 Therefore the Starobinsky model can be seen as a mechanical model providing a minimally scalar field [39] to drive the inflationary phase of the universe; for a review see [40].

By using the property that the field equations describe a canonical Hamiltonian system various functions \(f\left( R\right) \) have been determined in which the field equations admit conservation laws which are linear or quadratic in the momentum [8], while recently in [41] it was found that the cosmological model \(f\left( R\right) =R+qR^{n}\) passes the singularity test and is integrable for some values of the power n. However, the case \(n=2\), which is that of the Starobinsky model, has been ruled out and the main reason is that for \(n\ne 2\) the field equations admit singular special solutions following from the \(R^{n}\) term. This is in contrast to the Starobinsky model, in which the \(R^{2}\) term provides a nonsingular solution as mentioned above.

A specific \(f\left( R\right) \) theory provides a de Sitter universe if there exists \(R=R_{0}\) such that the Barrow–Ottewill [42] condition holds,

$$\begin{aligned} R_{0}f^{\prime }\left( R_{0}\right) -2f\left( R_{0}\right) =0. \end{aligned}$$
(5)

It is straightforward to see that, for arbitrary \(R_{0}\), that is, \(R_{0}\rightarrow R\), the latter condition can be seen as a first-order differential equation with solution the quadratic function \(f\left( R\right) =f_{0}R^{2}\), where \(f_{0}\) is a constant of integration.

2 Integrability of the field equations

In the case of the vacuum the field equations in \(f\left( R\right) =R^{2}\) theory are

$$\begin{aligned} 2a^{2}\dot{a}a^{(3)}-3(\dot{a}) ^{4}-a\ddot{a}(a\ddot{a}-2\dot{a}^{2}) =0 \end{aligned}$$
(6)

and

$$\begin{aligned} 2a^{3}a^{\left( 4\right) }+4a^{2}\dot{a}a^{\left( 3\right) }+3\left( \dot{a}\right) ^{4}+3a\ddot{a}( a\ddot{a}-4( \dot{a})^{2}) =0. \end{aligned}$$
(7)

The two equations are not independent and derivation of (6) gives the fourth-order equation (7). There are various ways in which Eq. (6) can be written as a first-order ordinary differential equation.Footnote 6 If we select the new dependent variable \(w=\frac{1}{u}\frac{\mathrm{d}u}{\mathrm{d}v}\) and independent variable v, where \(u=\dot{a},~v=a\), then Eq. (6) becomes the following Riccati equation:

$$\begin{aligned} 2\frac{\mathrm{d}w}{\mathrm{d}v}+3w^{2}+2\frac{w}{v}-\frac{3}{v^{2}}=0 \end{aligned}$$
(8)

with solution \(w\left( v\right) =\frac{v^{3}-w_{0}}{v\left( v^{3} +w_{0}\right) }\), where \(w_{0}\) is a constant of integration. Therefore it follows that \(\frac{H\left( t\right) }{H_{0}}=( v_{0}^{2}a^{-\frac{3}{2}}+a^{\frac{3}{2}})^{\frac{2}{3}}\), where \(H\left( t\right) =\frac{\dot{a}}{a}\), and for initial conditions such that \(v_{0}=0\) provides the closed-form solution \(a\left( t\right) \simeq t^{-1}\). That is not the unique case. In order to see that consider now the new variables \(\left\{ x,y\right\} =\{ H\left( t\right) ,\frac{\mathrm{d}}{\mathrm{d}t}\left( H\left( t\right) \right) \} ;\) Eq. (6) takes the form of the linear equation

$$\begin{aligned} 2\frac{\mathrm{d}y}{\mathrm{d}x}-y+6x^{2}=0 \end{aligned}$$
(9)

with solution \(y\left( x\right) =-2x^{2}+u_{1}\sqrt{x}~\), that is, \(\int \frac{\mathrm{d}H}{u_{1}\sqrt{H}-2a^{2}}=\left( t-t_{0}\right) \) where, in the limit \(u_{1}=0\), it gives \(H\left( t\right) =\frac{1}{2\left( t-t_{0}\right) }\), that is, \(a\left( t\right) =a_{0}\sqrt{\left( t-t_{0}\right) }\). This is an ideal gas solution which mimics a radiation solution, while it is a singular (special) solution. This singular solution is used below in order to prove the integrability of the Starobinsky model. The existence of the radiation solution is not a surprise in the sense that \(f\left( R\right) \)-gravity can always provide a radiation epoch in the evolution of the universe [43]. However, the radiation solution has been investigated before in a higher-order theory which includes the Starobinsky term as also other terms follow from the Gauss–Bonnet invariant in [44,45,46]. Moreover the radiation solution in quadratic theories has been found that can describes a past isotropic singularity for the Bianchi I universe [47].

The method that we apply is that of the singularity analysis and specifically we follow the ARS algorithm [48,49,50]. Singularity analysis is a powerful method which has been applied in cosmological studies for the reconstruction of the analytical solution of various models [41, 51,52,53,54]. We omit the properties of the singularity analysis and we refer the reader to the extended review [55].

We continue by firstly applying the method for the quadratic theory \(f\left( R\right) =R^{2}\) and consider now Eq. (7).

We find that the leading-order behavior is the power-law solution \(a\left( t\right) =a_{0}\tau ^{1/2}\), where \(\tau =t-t_{0}\) and \(t_{0}\) denotes the position of the singularity. The application of the ARS algorithm shows the resonances to be \(s_{1}=-1~,~s_{2}=0~,~s_{3}=\frac{3}{2}\) and \(s_{4}=\frac{5}{2},\) which means that the analytic solution is expressed by the right Painlevé series [56]

$$\begin{aligned} a\left( t\right) =a_{0}\tau ^{\frac{1}{2}}+a_{1}\tau +a_{2}\tau ^{\frac{3}{2} }+a_{3}\tau ^{2}+ {\displaystyle \sum \limits _{i=4}^{\infty }} a_{4}\tau ^{\frac{1+i}{2}}, \end{aligned}$$
(10)

where the constants of integration are \(a_{0},~a_{3},~a_{5}\) and the position of the singularity is \(t_{0}\). However, with the use of (6) we find that \(a_{5}=0\), while the calculation of the first coefficient constants gives the solution

$$\begin{aligned} a\left( t\right)= & {} a_{0}\tau ^{\frac{1}{2}}+a_{3}\tau ^{2}+\frac{19}{32} \frac{\left( a_{3}\right) ^{2}}{a_{0}}\tau ^{\frac{7}{2}}+\frac{17}{264} \frac{\left( a_{3}\right) ^{3}}{\left( a_{0}\right) ^{2}}\tau ^{5}\nonumber \\&+\,{\sum \limits _{j=10}^{\infty }} a_{j}\tau ^{\frac{1+j}{2}}. \end{aligned}$$
(11)

For the field equations of the Starobinsky model we apply the same algorithm and we find the same resonances as those of the quadratic model, which means that the analytic solution is given by Eq. (10) or specifically, by calculation of the first nine coefficient constants, the solution is

$$\begin{aligned} a\left( t\right)= & {} a_{0}\tau ^{\frac{1}{2}}+a_{3}\tau ^{2}-\frac{a_{0} }{72q}\tau ^{\frac{5}{2}}+a_{5}\tau ^{3}+\frac{19}{32}\frac{\left( a_{3}\right) ^{2}}{a_{0}}\tau ^{\frac{7}{2}}\nonumber \\&-\,\frac{5}{252}\frac{a_{3}}{q} \tau ^{4}+\left( \frac{41}{259200q^{2}}+\frac{a_{3}a_{5}}{16a_{0}}\right) \tau ^{\frac{9}{2}}\nonumber \\&+\left( \frac{17}{264}\frac{\left( a_{3}\right) ^{3} }{\left( a_{0}\right) ^{2}}-\frac{a_{5}}{132q}\right) \tau ^{5}+{\sum \limits _{j=10}^{\infty }} \bar{a}_{j}\tau ^{\frac{1+j}{2}}, \end{aligned}$$
(12)

where the constants of integration are again the coefficients \(a_{0} ,~a_{3},~a_{5}\) and the position of the singularity is \(t_{0}\), while the constraint equation (3) gives \(a_{5}=0\) or, if we assume the existence of a dust fluid, that is, \(p_{m}=0\) and \(\rho _{m}=\rho _{m0}a^{-3}\), it follows that \(\rho _{m0}=\frac{315}{2}qa_{5}\left( a_{0}\right) ^{2}\). In the latter scenario it is important to mention that the term \(a_{0}t^{1/2}~\)describes the leading-order behavior.

From the values of the resonances it is easy to see that the radiation solution is an unstable solution,Footnote 7 while the field equations of the Starobinsky model for inflation in a spatially flat FLRW spacetime pass the singularity test and are integrable.

3 Discussion

Singularity analysis is a powerful method to study the integrability of dynamical systems. However, it has a basic disadvantage in that it is coordinate dependent. That is the reason that the Starobinsky model did not pass the singularity analysis in the consideration of [41]. The reason is that in the space of variables \(\left\{ a,R\right\} \), in which usually \(f\left( R\right) \)-gravity is referred to, the leading-order behavior, \(a\left( t\right) =a_{0}t^{\frac{1}{2}}\), provides a singular behavior for only one of the dynamical variables, while for the Ricci scalar it is a constant. However, we overpassed that problem by working directly with the fourth-order differential equation and without using the Lagrange multiplier.

We now consider the case of nonzero spatially curved spacetime. Hence for the action integral (1) the field equations are derived,

$$\begin{aligned} \frac{\rho _{m0}}{a^{3}}= & {} 3\left( \frac{\dot{a}}{a}\right) ^{2} -54q\left( \frac{\dot{a}}{a}\right) ^{4}+18q\left( 2\left( \frac{\dot{a} }{a}\right) ^{2}\frac{\ddot{a}}{a}\right. \nonumber \\&\left. -\left( \frac{\ddot{a}}{a}\right) ^{2}+2\left( \frac{\dot{a}}{a}\right) ^{2}a^{\left( 3\right) }\right) \nonumber \\&+\,\frac{k}{2a^{2}}-6\frac{qk}{a^{2}}\left( \frac{\ddot{a}}{a}\right) +\frac{qk^{2}}{a^{4}},\end{aligned}$$
(13)
$$\begin{aligned} 0= & {} 2\frac{\ddot{a}}{a}+\left( \frac{\dot{a}}{a}\right) ^{2}+18q\left( \left( \frac{\dot{a}}{a}\right) ^{4}+\frac{\ddot{a}}{a^{2}}\right) \nonumber \\&+\,24q\left( \frac{\dot{a}}{a^{2}}a^{\left( 3\right) }-3\left( \frac{\dot{a}}{a}\right) ^{2}\frac{\ddot{a}}{a}\right) \nonumber \\&+\,12q\frac{a^{\left( 4\right) }}{a}+\frac{k}{6a^{2}} +2\frac{qk}{a^{2}}\left( \left( \frac{\dot{a}}{a}\right) ^{2}-2\frac{\ddot{a}}{a}\right) -\frac{qk^{2}}{6a^{4}},\nonumber \\ \end{aligned}$$
(14)

where for the matter source we assumed that of a dust fluid.

We apply the ARS algorithm and we find that the solution is expressed again by the right Painlevé series (11) where now the coefficient constants depend also upon the curvature k. For instance the first terms of the solution are

$$\begin{aligned} a\left( t\right)= & {} a_{0}\tau ^{\frac{1}{2}}-\frac{k}{12a_{0}}\tau ^{\frac{3}{2}}+a_{3}\tau ^{2}-\left( \frac{a_{0}}{72q}+\frac{k^{2}}{288\left( a_{0}\right) ^{3}}\right) \tau ^{\frac{5}{2}}\nonumber \\&+\,a_{5}\tau ^{3}+ {\displaystyle \sum \limits _{r=6}^{\infty }} \bar{a}_{j}\tau ^{\frac{1+r}{2}} \end{aligned}$$
(15)

where from (13) it follows that \(\rho _{m0}=\frac{315}{2}qa_{5}\left( a_{0}\right) ^{2}+30a_{3}qk.\)

We conclude that the Starobinsky model for inflation in a FLRW spacetime with or without spatial curvature is an integrable system. Last but not least, from the singularity analysis we found that the radiation era is described by a unstable point which is in agreement with the dynamical analysis for a higher-order theory [44, 45].