* [49] Y. Li, L. Yuan, and N. Vasconcelos, “Bidirectional learning for domain adaptation of semantic segmentation,” in _Int. Conf. on Computer Vision and Pattern Recognition (CVPR)_ , 2019.
  * [50] Y. Zou, Z. Yu, X. Liu, B. Kumar, and J. Wang, “Confidence regularized self-training,” in _International Conference on Computer Vision (ICCV)_ , 2019.
  * [51] M. Subhani and M. Ali, “Learning from scale-invariant examples for domain adaptation in semantic segmentation,” in _European Conference on Computer Vision (ECCV)_ , 2020.
  * [52] C.-H. Chao, B.-W. Cheng, and C.-Y. Lee, “Rethinking ensemble-distillation for semantic segmentation based unsupervised domain adaption,” in _Int. Conf. on Computer Vision and Pattern Recognition (CVPR)_ , 2021.
  * [53] K. Zhang, Y. Sun, R. Wang, H. Li, and X. Hu, “Multiple fusion adaptation: A strong framework for unsupervised semantic segmentation adaptation,” in _British Machine Vision Conference (BMVC)_ , 2021.
  * [54] J. He, X. Jia, S. Chen, and J. Liu, “Multi-source domain adaptation with collaborative learning for semantic segmentation,” in _Int. Conf. on Computer Vision and Pattern Recognition (CVPR)_ , 2021.
  * [55] W. Tranheden, V. Olsson, J. Pinto, and L. Svensson, “DACS: Domain adaptation via cross-domain mixed sampling,” in _Winter conf. on Applications of Computer Vision (WACV)_ , 2021.
  * [56] V. Olsson, W. Tranheden, J. Pinto, and L. Svensson, “ClassMix: Segmentation-based data augmentation for semi-supervised learning,” in _Winter conf. on Applications of Computer Vision (WACV)_ , 2021.
  * [57] N. Araslanov and S. Roth, “Self-supervised augmentation consistency for adapting semantic segmentation,” in _Int. Conf. on Computer Vision and Pattern Recognition (CVPR)_ , 2021.
  * [58] Y. Zou, Z. Yu, B. Kumar, and J. Wang, “Unsupervised domain adaptation for semantic segmentation via class-balanced self-training,” in _European Conference on Computer Vision (ECCV)_ , 2018.
  * [59] W.-L. Chang, W.-H. Wang, Hui-Po Peng, and W.-C. Chiu, “All about structure: Adapting structural information across domains for boosting semantic segmentation,” in _Int. Conf. on Computer Vision and Pattern Recognition (CVPR)_ , 2019.
  * [60] Y. Yang and S. Soatto, “FDA: Fourier domain adaptation for semantic segmentation,” in _Int. Conf. on Computer Vision and Pattern Recognition (CVPR)_ , 2020.
  * [61] K. De and M. Pedersen, “Impact of colour on robustness of deep neural networks,” in _Int. Conf. on Computer Vision and Pattern Recognition (CVPR)_ , 2020.
  * [62] R. Gong, D. Dai, Y. Chen, W. Li, and L. Van Gool, “mDALU: Multi-source domain adaptation and label unification with partial datasets,” in _International Conference on Computer Vision (ICCV)_ , 2021.
  * [63] J. T. Kajiya, “The rendering equation,” in _Proceedings of the 13th annual conference on Computer graphics and interactive techniques_ , 1986, pp. 143–150.
  * [64] A. Keller, L. Fascione, M. Fajardo, I. Georgiev, P. Christensen, J. Hanika, C. Eisenacher, and G. Nichols, “The path tracing revolution in the movie industry,” in _ACM SIGGRAPH 2015 Courses_. ACM, 2015, pp. 1–7.
  * [65] M. Zwicker, W. Jarosz, J. Lehtinen, B. Moon, R. Ramamoorthi, F. Rousselle, P. Sen, C. Soler, and S.-E. Yoon, “Recent advances in adaptive sampling and reconstruction for monte carlo rendering,” in _Computer graphics forum_ , vol. 34, no. 2, 2015, pp. 667–681.
  * [66] Y. Huo and S.-e. Yoon, “A survey on deep learning-based monte carlo denoising,” _Computational visual media_ , vol. 7, pp. 169–185, 2021.
  * [67] A. Prakash, S. Boochoon, M. Brophy, D. Acuna, E. Cameracci, G. State, O. Shapira, and S. Birchfield, “Structured domain randomization: Bridging the reality gap by context-aware synthetic data,” in _2019 International Conference on Robotics and Automation (ICRA)_. IEEE, 2019, pp. 7249–7255.
  * [68] M. Everingham, S. Eslami, L. Van Gool, C. K. Williams, J. Winn, and A. Zisserman, “The PASCAL visual object classes challenge: A retrospective,” _International Journal of Computer Vision_ , vol. 111, no. 1, pp. 98–136, 2015.
  * [69] Y. Wu, A. Kirillov, F. Massa, W.-Y. Lo, and R. Girshick, “Detectron2,” https://github.com/facebookresearch/detectron2, 2019.
  * [70] M. Contributors, “MMSegmentation: Openmmlab semantic segmentation toolbox and benchmark,” https://github.com/open-mmlab/mmsegmentation, 2020.


11institutetext:  Carnegie Mellon University, Pittsburgh, PA 15213, USA
11email<EMAIL_ADDRESS>University of Michigan,
Ann Arbor, MI 48109, USA
22email<EMAIL_ADDRESS>
# Enhancing LLM-Based Feedback: Insights from Intelligent Tutoring Systems and
the Learning Sciences

John Stamper 11 0000-0002-2291-1468 Ruiwei Xiao 11 0000-0002-6461-7611 Xinying
Hou 22 0000-0002-1182-5839

###### Abstract

The field of Artificial Intelligence in Education (AIED) focuses on the
intersection of technology, education, and psychology, placing a strong
emphasis on supporting learners’ needs with compassion and understanding. The
growing prominence of Large Language Models (LLMs) has led to the development
of scalable solutions within educational settings, including generating
different types of feedback in Intelligent Tutoring Systems. However, the
approach to utilizing these models often involves directly formulating prompts
to solicit specific information, lacking a solid theoretical foundation for
prompt construction and empirical assessments of their impact on learning.
This work advocates careful and caring AIED research by going through previous
research on feedback generation in ITS, with emphasis on the theoretical
frameworks they utilized and the efficacy of the corresponding design in
empirical evaluations, and then suggesting opportunities to apply these
evidence-based principles to the design, experiment, and evaluation phases of
LLM-based feedback generation. The main contributions of this paper include:
an avocation of applying more cautious, theoretically grounded methods in
feedback generation in the era of generative AI; and practical suggestions on
theory and evidence-based feedback design for LLM-powered ITS.

###### Keywords:

Intelligent Tutoring System (ITS) Large Language Models (LLMs) Generative AI
(GenAI) Hint Formative Feedback.

##  1 Introduction

While the term Generative AI (GenAI) has become synonymous with LLMs and
exploded with the release of ChatGPT in 2022 [6], it is important to note that
GenAI has been a part of the AIED community for many years. A long line of
work has been seen in areas where LLMs have shown particular usefulness such
as content generation [12], including generating formative feedback [51]. The
rush to apply LLMs to these areas to improve AIED certainly represents a good
opportunity to help in education, but the community should not discount the
decades of work that has been done in these areas before the current interest
in the latest LLMs. In particular, the AIED community has decades of research
on the proper way to implement hints and feedback, and while LLMs seem to be
helpful in different phases of feedback generation, the approaches used should
be carefully designed and evaluated through theories and empirical evidence.

This work sets forth a balanced discourse on the integration of LLMs with
learning science work, focusing on leveraging both previous insights on
feedback design in intelligent tutoring systems (ITSs) and contemporary
advancements in generative AI. It outlines a strategic blueprint for infusing
LLM-based feedback by building on previous contributions around ITSs and the
learning sciences, aiming to refine feedback generation processes and achieve
more effective learning results. This work underscores the significance of
adhering to established educational frameworks and validates the potential of
LLMs to improve feedback components in educational systems, thus offering a
pathway toward more effective and responsible future educational technologies.

##  2 The Development of ITS Feedback Generation

In this section, we synthesized existing research on ITS feedback generation
based on how they were generated. Three primary methods were identified for
generating feedback: the expert-created learner model, the data-driven learner
model, and the use of large language models. The first method involves experts
manually inputting models of learners’ potential behaviors or constraints of
the problem. The second one compiles data from learners’ interactions with
similar problems to automatically build a model of learner behavior. The third
method leverages LLMs, focusing on supplying the appropriate context and
requirements, striving to generate more adaptive feedback with less human
labor.

###  2.1 Feedback generated from expert-generated learner model

To generate feedback for students, traditional ITSs heavily rely on experts’
input on learner modeling, with an emphasis on student problem-solving states.
There are two main lines of learner modeling methods in these intelligent
tutors: the production rules model, which originated from Anderson’s ACT-R
theory [5], and the constraint-based model (CBM), which is based on Ohlsson’s
theory of learning from performance errors [35]. Specifically, for a given
problem, a production rules model uses a set of if-then rules or example
solutions [3] generated by experts to model the knowledge and possible
decision-making process to solve this problem. A CBM is composed of a set of
expert-written constraints that should not be broken by any potential correct
solutions. When generating feedback, the learner’s solution will be compared
to the rule-based model or constraint-based model, and the point the student
gets astray from the right track will be included in the delivered feedback.

The effectiveness of expert-generated models for both approaches has been
repeatedly proven by evidence from theories and classroom studies. For
example, feedback in CTAT tutors [2] is generated from production rules. Until
2016, there were 18 CTAT tutors distributed in real educational settings, used
by approximately 44,000 students. One of the CTAT tutors, Andes Physics Tutor
[55] with its immediate feedback, helping students achieve significantly
better learning in five years’ repeated measurements. CBM has also proven to
be extremely effective and efficient on highly structured procedural tasks and
open-ended tasks such as programming. For instance, the feedback generated by
CBM in SQL-Tutor led to significantly higher learning outcomes in 4 studies
during 1998-2000 [32]. The learning curve analysis further grounded the
experiment result with sound psychological foundations aligning with the
smooth learning curve criterion [29].

###  2.2 Feedback generated from data-driven learner model

Regardless of their effectiveness, building expert models can be extremely
taxing, making them hard to scale up. Furthermore, these methods have inherent
limitations: experts may overlook common mistakes made by students, and both
strategies often yield less-optimal results in ill-defined domains [14].
Therefore, researchers have started to seek scalable solutions by applying
data-driven methods to aggregate previous students’ solutions and construct
the learner’s model. The automated feedback generation nature of the learner
model positions the data-driven feedback approach as an initial application of
generative AI in creating feedback.

The earliest work of generative AI on feedback generation can be traced back
to the DIAG system [12]. The system utilized the NLP model to aggregate system
messages in various structures and found the feedback aggregated by functions
led to higher learning gain in the classroom study. Another stream of data-
driven works built on the production rule approach automated the construction
of the learner’s cognitive model during problem-solving. The foundation work
of the data-driven cognitive model, regardless of its non-generative nature,
can be found in 1997 [11], where researchers initially applied Bayesian
Networks to students’ problem-solving data for plan recognition and action
prediction. This approach was further developed by the Hint Factory [52],
which employed Markov decision processes to analyze Logic Proof Intelligent
Tutor submission data [50], generating production rules and comparing student
submissions to these rules to tailor hints. This method of production-rule-
based feedback generation garnered attention across ITS research in more
disciplines [13],[14],[41]. The subsequent classroom studies and learning
factor analyses [7] confirmed this approach’s efficacy and versatility across
various domains, demonstrating its potential with minimal data requirements
[46].

###  2.3 Feedback generated from LLMs

Some major shortcomings of the data-driven approach are: 1) it relies on the
quantity and quality of the training data, and 2) the feedback in these
systems is in fixed templates with limited adaptation. The recent prevalence
of LLMs provides opportunities to advance the field of feedback generation by
generating adaptive, human-like feedback without training data. For the
feedback generation pipeline, most LLM-based work takes the student’s current
state together with certain prompts asking for feedback as input, treats the
LLMs as a black box to process the prompt, and directly uses the output as the
personalized feedback.

Indeed, LLMs enhance the scalability of adaptive feedback across various
domains [31, 34, 20, 25, 48], and help in bypassing the expert model or
cognitive model building process from scratch. However, there remains a
significant amount of work overlooked by many researchers in the pedagogical
design of feedback and the evaluation of its impact on learning. Few works are
backed by learning sciences principles such as learning-by-teaching [48] and
self-reflection [24], while others did not elaborate learning design
considerations in their design rationale. Moreover, most of the evaluations on
the LLM-based feedback systems only reported classroom usage data, and there
is a lack of theoretical support or evidence on learning for these emerging
systems. To guide better LLM-based feedback design and evaluation, in the next
section, we highlight theoretical and empirical evidence from previous ITS and
learning sciences work, hence suggesting implications for LLM-based feedback
accordingly.

##  3 Implications for LLM-based feedback

Prior research in ITSs has built strong groundwork for LLM-based feedback
generation. For instance, the left figure in Figure 1 illustrates the key
functions of a traditional intelligent tutoring system, showing how feedback
is triggered, generated, and delivered in an ITS [21]. However, methods proven
effective in traditional ITS have not yet been fully leveraged in LLM-based
feedback research. Additionally, technological advancements in GenAI now
enable scaling approaches previously limited by technological constraints.

This section discusses recommendations grounded in prior ITS research and new
scalable opportunities from GenAI advancements in the feedback design,
generation, delivery, and evaluation phases. The right figure in Figure 1
shows how new opportunities in LLM and GenAI could fit into and extend the
traditional key functions in ITS (the left one in Figure 1), particularly
around the feedback.

Figure 1: Key functions of Intelligent Tutoring Systems from Koedinger et al.
[21] (left) and Opportunities to Optimize LLM-based Feedback in ITS (right,
adapted from [21]): 1 - Trigger to deliver the feedback; 2 - Information
needed to communicate with LLMs as input; 3 - Content requested in the
generated LLM feedback output; 4 - Modality for delivering feedback to
students.

###  3.1 Trigger to deliver the feedback

Feedback in ITSs is often designed to be triggered either by the system or
initiated by the students [3, 33]. One special type of feedback is suggestions
or supportive materials to help students move forward. It is common to provide
such feedback based on students’ request actions [17, 18, 30, 57, 46], as
shown in A of Figure 1-left. However, in some other work, concerning that
novices might lack the metacognitive skills to identify when and what to ask
for help, researchers believed that the model-guided feedback delivery could
scaffold learners better. Therefore, Help Tutor was designed to provide
metacognitive feedback automatically after the system identifies learners’
misbehaviors [1]. While researchers found that having this did not lead to
higher learning gains, the concerns about abusing feedback can be more serious
when LLM is widely applied in educational settings. On the one hand, students
nowadays can access commercial LLM products easily for timely formative
feedback on their progress or even direct answers, so they are more likely to
abuse them by asking for feedback too frequently. On the other hand, to avoid
over-reliance on these LLM tools, some self-regulated learners might avoid
asking for formative feedback, even when they are struggling or unsure about
their answers. With those two new phenomena in mind, future research needs to
find a balanced timing and optimized trigger to deliver feedback and establish
a more effective learning experience (1 in Figure 1-right).

###  3.2 Information needed to communicate with LLM as input

Prompt engineering is an important step when using LLMs to generate feedback
in the existing learning systems. Prompt engineering refers to the practice of
creating and optimizing prompts to communicate with large language models
effectively. There are guidelines about how to generate effective prompts for
LLMs. For example, the CLEAR framework comprises five key principles to
achieve prompts for more effective AI-generated content creation [26]. Besides
these general guidelines, the required information in prompts can vary based
on the specific roles AI is expected to take. When AI takes on the role of
providing feedback to students’ answer inputs [34] [27], information resources
like the grading rubric, the student answers, and the task description, are
commonly included in the prompt. While current implications have already
integrated such basic related information to generate prompts, one future
direction could involve incorporating various types of information into prompt
engineering. For example, many traditional ITSs represent students’ current
understanding of the subject as a model and adapt instructions to students’
needs based on it [54] (B in Figure 1-left). Such student models play an
important role in understanding and identifying students’ needs before
offering appropriate adaptation [9]. Therefore, to enhance the quality of LLM
outputs in meeting individual student’s needs, different layers of information
from a student model, such as the estimations of the student’s knowledge
level, cognitive state, strengths or weaknesses, affective state, and meta-
cognitive skills, can be integrated when conducting prompt engineering in the
context of education [9] (2 in Figure 1-right).

###  3.3 Content requested in the generated LLM feedback output

One type of ITS feedback output is a suggestion for the next action (C in
Figure 1-left). When integrating LLM into learning systems, such output can
also be optimized using learning science theories (3 in Figure 1-right).
Particularly, the prevalent form of feedback in recent LLM-based learning
systems is a high-level natural language explanation without revealing the
answer. In certain systems, persistent student inquiries for the answer lead
the feedback to progressively reveal more comprehensive hints, culminating in
responses that closely resemble complete, bottom-out solutions. Although such
feedback can assist students in solving their problems, its effectiveness in
promoting long-term learning is uncertain. Should this feedback fail to
facilitate learning, the LLM-based Intelligent Tutoring System (ITS) might
merely become an ineffective variant or, in the best-case scenario, a
duplicate of ChatGPT. To better trigger learning, this section aims to
encourage future feedback implementation guided by learning sciences
frameworks such as Bloom’s Taxonomy [23] and Knowledge-Learning-Instruction
(KLI) framework [22], and we employ the KLI framework as a guiding example to
illustrate how to select feedback content based on the knowledge type to
enhance learner outcomes. The KLI framework allocates learning processes into
three types: memory and fluency, induction and refinement, understanding, and
sense-making, and lists seven instructional principles that are effectively
robust within each category, all of which are backed by substantial
experimental validation.

For enhancing memory and fluency, instructional principles such as spacing,
testing, and optimized scheduling are pivotal. They focus on the timing and
frequency of practice repetitions. Feedback mechanisms like flashcards, visual
cues [25], or multiple-choice questions, inspired by the testing principle,
offer repeated practice opportunities at short intervals, reinforcing
learning. While spacing and optimization extend beyond feedback’s scope, their
implementation in ITS is beneficial to effective instructional strategies in
memory and fluency processes.

For tasks involving induction and refinement processes, such as solving
programming or math problems, faded worked examples are effective in
demonstrating the desired process with the appropriate level of assistance
needed by fading the demonstration to ensure the scaffolding is within
Vygotsky’s Zone of Proximal Development [28], tailored to the learner’s
existing knowledge and areas for growth. The implementation of faded worked
examples into intelligent tutors also resulted in higher learning efficiency
and a deeper conceptual understanding of the problems in existing ITS works
[49].

For understanding and sense-making processes, self-explanation questions are
one of the most effective forms of feedback that elicit active learning and
deeper thinking [15]. Previous ITS works also support its effects on
consolidating learners’ understanding of fractions [44].

###  3.4 Modality for delivering feedback to students

Due to technology limitations, traditional ITS systems mainly deliver feedback
to students as text (D in Figure 1-left). Recent advancements in GenAI
techniques provide opportunities to expand the spectrum of feedback modalities
(4 in Figure 1-right) from text to images, audios, videos, and combinations of
these modalities. As the main focus of this paper is LLM-based feedback, we
look into how GenAI techniques could deliver such feedback to students in
diverse modalities. We first referred to classic multimedia learning
principles [10] and chose related principles that provide recommendations on
how feedback might be delivered. Then, we provided examples of recent GenAI
techniques and corresponding commercial applications that could be used to
achieve such feedback modalities. Finally, for each principle-based feedback
modality, we provided one example use scenario. We summarized these in Table
1. As new GenAI technologies are continuously growing, we believe it is
important for future work to look at both the principle and technology sides
to decide what feedback modalities should and could be provided in different
learning contexts.

###  3.5 Evaluate the quality of the generated feedback

Existing studies has tested the scope of LLMs’ feedback generation
capabilities with data-driven system evaluation (whether the system can
perform well on a comprehensive testing dataset) [16] and expert evaluation
(given an evaluation matrix, the expert(s) would rate the performance of each
feedback) [34, 47, 57] on mainly precision and coverage[39, 40]. Moreover, it
is important to recognize the contributions of GenAI-generated feedback as it
expands the array of metrics for assessing feedback quality beyond the
traditional ITS evaluation scope, with new metrics like appropriateness,
conciseness, and comprehensiveness. Compared to traditional feedback
generation approaches, LLMs’ advantages in natural language tasks enable the
generation of personalized feedback with an encouraging tone [47, 57]. Taking
a step further from examining the tone, studies have also assessed the
capability of GenAI to play specific roles (e.g., instructor [53],
student[48]) in the context of feedback generation. These initial assessments
illuminate the potential to scale both the implementation and evaluation of
specific agents and their behaviors that are crafted according to learning
sciences principles, such as facilitating a growth mindset as an instructor or
enhancing the dynamics of a collaborative learning environment as a helpful
peer.

In addition to system and expert evaluation, classroom deployment allows
researchers to gather feedback from real learners in authentic educational
settings. Under this context, student usage log data [43, 20, 24, 19] and
student self-reported survey data [20, 24, 38] are two commonly gathered data
types for LLM-generated material evaluation. With few existing LLM-generated
feedback works applying these approaches, the next steps for evaluating this
feedback could involve: 1) designing controlled experiments with pre-post
tests to assess learning outcomes [55, 42, 4], and 2) employing learning
analytics on log data to explore feedback’s effectiveness on help-seeking [57]
and learning [38] with greater detail and nuances. For instance, the impacts
of feedback on learning outcomes can be elucidated by performing a learning
curve analysis to compare the slopes, which represent varying learning rates
under different feedback conditions. [45]. Finally, ethical concerns such as
biases [56] and hallucination [8] associated with LLMs could jeopardize an
effective and equitable learning environment. Therefore, it is crucial to
incorporate relevant metrics into the evaluation of feedback quality and
mitigate these issues with automated approaches or human intervention.

##  4 Conclusion

To fully utilize the potential of generative AI in the educational context, it
is essential to approach its integration with pedagogical design. This paper
synthesized the progression of AIED focusing on feedback generation,
emphasized the importance of grounding the current LLM-based feedback
generation in theoretical frameworks and evidence-based approaches to prompt
its learning effectiveness, and suggested corresponding evidence-grounded
implications through four feedback generation stages. We aim to evoke the
awareness of AIED researchers and practitioners on the legacy of pre-LLM
feedback generation efforts, and offer a toolkit as a foundational resource
for designing pedagogical LLM-based feedback generation systems that foster
the advancement of the AIED field in the era of generative AI.

Table 1: Example feedback modalities supported by Generative AI techniques Principle (Selected from [10]) | Feedback modality |  Example GenAI Techniques Involved (Example GenAI Applications) | Example Feedback Scenario
---|---|---|---
Multimedia |  Images |  Text-to-image (OpenAI DALL·E [36]; Stable Diffusion 111https://stability.ai/stable-image; Runway 222https://runwayml.com/ai-tools/text-to-image/) |  Content-related images as visual cue for vocabulary memorization.
Personalization |  Text |  Text-to-text (OpenAI GPT 333https://openai.com/gpt-4; Anthropic Claude 444https://www.anthropic.com/news/claude-3-family; Meta Llama555https://llama.meta.com/) |  Text feedback in more informal and conversational styles.
Embodiment |  Human-like agent |  Text-to-image; Text-to-video (Runway666https://runwayml.com/ai-tools/gen-2-text-to-video/; OpenAI Sora [37]) Text-to-speech (Deepgram 777https://deepgram.com/; OpenAI TTS models 888https://platform.openai.com/docs/models/tts; WellSaid Labs 999https://wellsaidlabs.com/features/api/) |  Virtual teaching assistant avatar talking about the next-step hints.
Modality |  Audio |  Text-to-speech |  Add audio feedback as a new option to existing systems.
Segmentation |  Segmented Text |  Text-to-text |  Apply LLMs to segment one feedback into multi-levels of feedback.
Principle (Selected from [10]) | Feedback modality |  Example GenAI Techniques Involved (Example GenAI Applications) | Example Feedback Scenario
---|---|---|---
Redundancy |  Audio, Image, Video |  Text-to-speech; Text-to-image; Text-to-video |  When both audio and visual feedback is generated, allow users to turn off the text on screen.
Temporal Contiguity |  Audio, Image, Video |  Text-to-speech; Text-to-image; Text-to-video |  When both audio and visual feedback are generated, present them simultaneously.
Spatial Contiguity |  Text, Video |  Text-to-text; Text-to-video |  Place feedback close to the part that it elaborates on.
Coherence |  Text, Image |  Text-to-text; Text-to-image |  Evaluate whether existing content are on-topic or not.
Signaling |  Text |  Text-to-text |  Highlight the errors on the screen.

## References

  * [1] Aleven, V., Mclaren, B., Roll, I., Koedinger, K.: Toward meta-cognitive tutoring: A model of help seeking with a cognitive tutor. International Journal of Artificial Intelligence in Education 16(2), 101–128 (2006)
  * [2] Aleven, V., McLaren, B.M., Sewall, J., Koedinger, K.R.: The cognitive tutor authoring tools (ctat): Preliminary evaluation of efficiency gains. In: Intelligent Tutoring Systems: 8th International Conference, ITS 2006, Jhongli, Taiwan, June 26-30, 2006. Proceedings 8. pp. 61–70. Springer (2006)
  * [3] Aleven, V., Mclaren, B.M., Sewall, J., Koedinger, K.R.: A new paradigm for intelligent tutoring systems: Example-tracing tutors. International Journal of Artificial Intelligence in Education 19(2), 105–154 (2009)
  * [4] Alhazmi, S., Thevathayan, C., Hamilton, M.: Interactive pedagogical agents for learning sequence diagrams. In: Artificial Intelligence in Education: 21st International Conference, AIED 2020, Ifrane, Morocco, July 6–10, 2020, Proceedings, Part II 21. pp. 10–14. Springer (2020)
  * [5] Anderson, J.R.: Act: A simple theory of complex cognition. American psychologist 51(4), 355 (1996)
  * [6] Baidoo-Anu, D., Ansah, L.O.: Education in the era of generative artificial intelligence (ai): Understanding the potential benefits of chatgpt in promoting teaching and learning. Journal of AI 7(1), 52–62 (2023)
  * [7] Cen, H., Koedinger, K., Junker, B.: Learning factors analysis–a general method for cognitive model evaluation and improvement. In: International conference on intelligent tutoring systems. pp. 164–175. Springer (2006)
  * [8] Chen, Y., Fu, Q., Yuan, Y., Wen, Z., Fan, G., Liu, D., Zhang, D., Li, Z., Xiao, Y.: Hallucination detection: Robustly discerning reliable answers in large language models. In: Proceedings of the 32nd ACM International Conference on Information and Knowledge Management. pp. 245–255 (2023)
  * [9] Chrysafiadi, K., Virvou, M.: Student modeling approaches: A literature review for the last decade. Expert Systems with Applications 40(11), 4715–4729 (2013)
  * [10] Clark, R.C., Mayer, R.E.: E-learning and the science of instruction: Proven guidelines for consumers and designers of multimedia learning. john Wiley & sons (2023)
  * [11] Conati, C., Gertner, A.S., VanLehn, K., Druzdzel, M.J.: On-line student modeling for coached problem solving using bayesian networks. In: User Modeling: Proceedings of the Sixth International Conference UM97 Chia Laguna, Sardinia, Italy June 2–5 1997. pp. 231–242. Springer (1997)
  * [12] Di Eugenio, B., Fossati, D., Yu, D., Haller, S.M., Glass, M.: Natural language generation for intelligent tutoring systems: a case study. In: AIED. pp. 217–224 (2005)
  * [13] Fossati, D., Di Eugenio, B., Ohlsson, S., Brown, C., Chen, L.: Data driven automatic feedback generation in the ilist intelligent tutoring system. Technology, Instruction, Cognition and Learning 10(1), 5–26 (2015)
  * [14] Fournier-Viger, P., Nkambou, R., Nguifo, E.M.: Learning procedural knowledge from user solutions to ill-defined tasks in a simulated robotic manipulator. Romero, et al.(eds.) Handbook of Educational Data Mining pp. 451–465 (2010)
  * [15] Hausmann, R.G., VanLehn, K.: Explaining self-explaining: A contrast between content and generation. Frontiers in Artificial Intelligence and Applications 158, 417 (2007)
  * [16] Hellas, A., Leinonen, J., Sarsa, S., Koutcheme, C., Kujanpää, L., Sorva, J.: Exploring the responses of large language models to beginner programmers’ help requests. In: Proceedings of the 2023 ACM Conference on International Computing Education Research-Volume 1. pp. 93–105 (2023)
  * [17] Hou, X., Ericson, B.J., Wang, X.: Using adaptive parsons problems to scaffold write-code problems. In: Proceedings of the 2022 ACM Conference on International Computing Education Research-Volume 1. pp. 15–26 (2022)
  * [18] Hou, X., Ericson, B.J., Wang, X.: Understanding the effects of using parsons problems to scaffold code writing for students with varying cs self-efficacy levels. In: Proceedings of the 23rd Koli Calling International Conference on Computing Education Research. pp. 1–12 (2023)
  * [19] Kazemitabaar, M., Hou, X., Henley, A., Ericson, B.J., Weintrop, D., Grossman, T.: How novices use llm-based code generators to solve cs1 coding tasks in a self-paced learning environment. In: Proceedings of the 23rd Koli Calling International Conference on Computing Education Research. pp. 1–12 (2023)
  * [20] Kazemitabaar, M., Ye, R., Wang, X., Henley, A.Z., Denny, P., Craig, M., Grossman, T.: Codeaid: Evaluating a classroom deployment of an llm-based programming assistant that balances student and educator needs. arXiv preprint arXiv:2401.11314 (2024)
  * [21] Koedinger, K., Brunskill, E., Baker, R., Mclaughlin, E., Stamper, J.C.: New potentials for data-driven intelligent tutoring system development and optimization. AI Mag. 34, 27–41 (2013), https://api.semanticscholar.org/CorpusID:13189100
  * [22] Koedinger, K.R., Corbett, A.T., Perfetti, C.: The knowledge-learning-instruction framework: Bridging the science-practice chasm to enhance robust student learning. Cognitive science 36(5), 757–798 (2012)
  * [23] Krathwohl, D.R.: A revision of bloom’s taxonomy: An overview. Theory into practice 41(4), 212–218 (2002)
  * [24] Kumar, H., Musabirov, I., Williams, J.J., Liut, M.: Quickta: Exploring the design space of using large language models to provide support to students. In: Learning Analytics and Knowledge Conference. Learning Analytics and Knowledge Conference 2023 (LAK’23), ACM, Arlington, Texas (2023)
  * [25] Lee, J., Lan, A.: Smartphone: Exploring keyword mnemonic with auto-generated verbal and visual cues. In: International Conference on Artificial Intelligence in Education. pp. 16–27. Springer (2023)
  * [26] Lo, L.S.: The clear path: A framework for enhancing information literacy through prompt engineering. The Journal of Academic Librarianship 49(4), 102720 (2023)
  * [27] Lu, C., Cutumisu, M.: Integrating deep learning into an automated feedback generation system for automated essay scoring. International Educational Data Mining Society (2021)
  * [28] Malik, S.A.: Revisiting and re-representing scaffolding: The two gradient model. Cogent Education 4(1), 1331533 (2017)
  * [29] Martin, B., Koedinger, K.R., Mitrovic, A., Mathan, S.: On using learning curves to evaluate its. In: AIED. pp. 419–426 (2005)
  * [30] McLaren, B.M., Richey, J.E., Nguyen, H., Hou, X.: How instructional context can impact learning with educational technology: Lessons from a study with a digital learning game. Computers & education 178, 104366 (2022)
  * [31] McNichols, H., Zhang, M., Lan, A.: Algebra error classification with large language models. In: International Conference on Artificial Intelligence in Education. pp. 365–376. Springer (2023)
  * [32] Mitrovic, A., Mayo, M., Suraweera, P., Martin, B.: Constraint-based tutors: a success story. In: Engineering of Intelligent Systems: 14th International Conference on Industrial and Engineering Applications of Artificial Intelligence and Expert Systems, IEA/AIE 2001 Budapest, Hungary, June 4–7, 2001 Proceedings 14. pp. 931–940. Springer (2001)
  * [33] Mitrovic, A., Ohlsson, S., Barrow, D.K.: The effect of positive feedback in a constraint-based intelligent tutoring system. Computers & Education 60(1), 264–272 (2013)
  * [34] Nguyen, H.A., Stec, H., Hou, X., Di, S., McLaren, B.M.: Evaluating chatgpt’s decimal skills and feedback generation in a digital learning game. In: European Conference on Technology Enhanced Learning. pp. 278–293. Springer (2023)
  * [35] Ohlsson, S.: Learning from performance errors. Psychological review 103(2), 241 (1996)
  * [36] OpenAI: Dall·e 2. https://openai.com/dall-e-2/ (2023), accessed: 2024-03-12
  * [37] OpenAI: Sora. https://openai.com (2024), accessed: 2024-03-12
  * [38] Pankiewicz, M., Baker, R.S.: Navigating compiler errors with ai assistance–a study of gpt hints in an introductory programming course. arXiv preprint arXiv:2403.12737 (2024)
  * [39] Phung, T., Cambronero, J., Gulwani, S., Kohn, T., Majumdar, R., Singla, A., Soares, G.: Generating high-precision feedback for programming syntax errors using large language models. arXiv preprint arXiv:2302.04662 (2023)
  * [40] Phung, T., Pădurean, V.A., Singh, A., Brooks, C., Cambronero, J., Gulwani, S., Singla, A., Soares, G.: Automating human tutor-style programming feedback: Leveraging gpt-4 tutor model for hint generation and gpt-3.5 student model for hint validation. In: Proceedings of the 14th Learning Analytics and Knowledge Conference. pp. 12–23 (2024)
  * [41] Price, T.W., Dong, Y., Barnes, T.: Generating data-driven hints for open-ended programming. International Educational Data Mining Society (2016)
  * [42] Price, T.W., Zhi, R., Barnes, T.: Hint generation under uncertainty: The effect of hint quality on help-seeking behavior. In: Artificial Intelligence in Education: 18th International Conference, AIED 2017, Wuhan, China, June 28–July 1, 2017, Proceedings 18. pp. 311–322. Springer (2017)
  * [43] Qi, J.Z.P.L., Hartmann, B., Norouzi, J.D.N.: Conversational programming with llm-powered interactive support in an introductory computer science course. NeurIPS’23 Workshop on Generative AI for Education (GAIED) (2023)
  * [44] Rau, M.A., Aleven, V., Rummel, N.: Intelligent tutoring systems with multiple representations and self-explanation prompts support learning of fractions. In: AIED. pp. 441–448 (2009)
  * [45] Rivers, K., Harpstead, E., Koedinger, K.R.: Learning curve analysis for programming: Which concepts do students struggle with? In: ICER. vol. 16, pp. 143–151. ACM (2016)
  * [46] Rivers, K., Koedinger, K.R.: Data-driven hint generation in vast solution spaces: a self-improving python programming tutor. International Journal of Artificial Intelligence in Education 27, 37–64 (2017)
  * [47] Roest, L., Keuning, H., Jeuring, J.: Next-step hint generation for introductory programming using large language models. In: Proceedings of the 26th Australasian Computing Education Conference. pp. 144–153 (2024)
  * [48] Schmucker, R., Xia, M., Azaria, A., Mitchell, T.: Ruffle&riley: Towards the automated induction of conversational tutoring systems. arXiv preprint arXiv:2310.01420 (2023)
  * [49] Schwonke, R., Wittwer, J., Aleven, V., Salden, R., Krieg, C., Renkl, A.: Can tutored problem solving benefit from faded worked-out examples. In: European Cognitive Science Conference. pp. 23–27 (2007)
  * [50] Stamper, J.: Automating the generation of production rules for intelligent tutoring systems. In: Proc. 9th Int. Conf. Interact. Comput. Aided Learn (2006)
  * [51] Stamper, J., Barnes, T., Croy, M.: Enhancing the automatic generation of hints with expert seeding. In: Intelligent Tutoring Systems: 10th International Conference, ITS 2010, Pittsburgh, PA, USA, June 14-18, 2010, Proceedings, Part II 10. pp. 31–40. Springer (2010)
  * [52] Stamper, J., Barnes, T., Lehmann, L., Croy, M.: The hint factory: Automatic generation of contextualized help for existing computer aided instruction. In: Proceedings of the 9th International Conference on Intelligent Tutoring Systems Young Researchers Track. pp. 71–78 (2008)
  * [53] Tack, A., Piech, C.: The ai teacher test: Measuring the pedagogical ability of blender and gpt-3 in educational dialogues. arXiv preprint arXiv:2205.07540 (2022)
  * [54] VanLehn, K.: Student modeling. Foundations of intelligent tutoring systems pp. 55–78 (2013)
  * [55] VanLehn, K., Lynch, C.F., Schulze, K.G., Shapiro, J.A., Shelby, R., Taylor, L., Treacy, D., Weinstein, A., Wintersgill, M.: The andes physics tutoring system: Five years of evaluations. In: AIED. pp. 678–685 (2005)
  * [56] Wei, Y., Carvalho, P.F., Stamper, J.: Uncovering name-based biases in large language models through simulated trust game. arXiv preprint arXiv:2404.14682 (2024)
  * [57] Xiao, R., Hou, X., Stamper, J.: Exploring how multiple levels of gpt-generated programming hints support or disappoint novices. arXiv preprint arXiv:2404.02213 (2024)


# Emergence of the Gambier equation in cosmology

D. Batic<EMAIL_ADDRESS>Department of Mathematics,
Khalifa University of Science and Technology,
Main Campus, Abu Dhabi,
United Arab Emirates  A. Ghose Choudhury<EMAIL_ADDRESS>Department
of Physics
Diamond Harbour Women’s University
D.H. Road, Sarisha 743368, West Bengal, India  Partha Guha
<EMAIL_ADDRESS>Department of Mathematics,
Khalifa University of Science and Technology,
Main Campus, Abu Dhabi,
United Arab Emirates

###### Abstract

We show how the Gambier equation arises in connection to Friedmann-Lemaître-
Robertson-Walker (FLRW) cosmology and a Dark Matter equation of state.
Moreover, we provide a correspondence between the Friedmann equations and the
Gambier equations that possess the Painlev$\acute{\mbox{e}}$ property in $2+1$
dimensions. We also consider special cases of the Gambier G27 equation such as
the generalized Pinney equation. For an extended FLRW model with dynamic
scalar field as matter model, the Einstein equations correspond to the Milne-
Pinney equation which in turn can be mapped to the parametric Gambier equation
of second order.

FLRW cosmology, Ermakov-Pinney equation, Gambier equation, Ermakov-Painlevé II
equation, generalized Pinney equations.

###### pacs:

02.30.Ik, 04.60.Kz, 95.30.Sf, 98.80.-k

##  I Introduction

Since Witten’ seminal paper in 1988 Witten , where he showed that
$2+1$-gravity is an integrable system, there has been a continuous interest on
this topic in the scientific community. Even though three-dimensional gravity
exhibits some serious shortcomings such as the absence of gravitational waves,
lack of a Newtonian limit and no dynamical degrees of freedom Giddings , it
represents a useful arena because despite its simplicity it displays non-
trivial features such as singularities Barrow  and black holes Tit1 ; Tit2 .
Moreover, toy models formulated in $2+1$-gravity may be also relevant to four-
dimensional gravity, its quantization problem and cosmology. It was already
observed by Giddings et al. Giddings  that such models can be used to probe
into quantization in the presence of gravity because one can add an external
field with its own degrees of freedom that can be quantized. In addition, it
was shown in Giddings  that the solution of the Friedmann equations for a
radiation-dominated universe in three-dimensions behaves like that for dust in
one higher dimension. It is worth to mention along this line that Barrow et
al. Barrow  proved that certain static and non-static solutions of
$2+1$-gravity generated by a source modelled in terms of a scalar field,
perfect fluid or a magnetic field exhibit a correspondence with the usual
$3+1$-theory of gravitation by means of a Kaluza-Klein type reduction. He also
showed therein that $2+1$-cosmological models involving self-interacting
scalar fields can be relevant to probe into the production mechanisms of
inflationary behaviour. The mantra emerging from these examples is that
results obtained in $2+1$-gravity should not be dismissed on physical grounds
because they may have a history in the standard theory of general relativity.
For this reason, we will consider cosmologies in $3+1$-dimensions as well as
in $2+1$-dimensions.

The study of Einstein’s field equations in scalar field cosmologies are
essentially motivated from high energy physics and quantum gravity theories
although the observational discovery of the field is still lacking Barrow ;
Cornish ; Cruz ; CGHKPW ; WK ; Krit . Such cosmologies (both for the isotropic
and anisotropic models) may be mapped to equations of the generalized Ermakov-
Milne-Pinney (EMP) type CGHKPW ; WK ; HL ; Lidsey ; Cariglia . Hawkins and
Lidsey HL  developed an analytical approach to models of this type by
expressing the cosmological field equations in terms of an Ermakov-Pinney
system, such system often arises in studies of nonlinear optics, nonlinear
elasticity, fluid dynamics, Bose-Enstein condensation and various other areas
in physics (For further references, see, e.g. Leach ). In general, an Ermakov
system is a pair of coupled, second-order, nonlinear ordinary differential
equations (ODEs) but in the one-dimensional case, the two equations decouple
and the system reduces to a single equation known as the Ermakov-Pinney
equation Erma ; Pinney

$\ddot{x}+\omega^{2}(t)x=\frac{1}{x^{3}}.$ (1.1)

The solution of this equation is of the form

$x(t)=\sqrt{Au^{2}+2Buv+Cv^{2}}$ (1.2)

where $u$ and $v$ are any two linearly independent solutions of

$\ddot{x}+\omega^{2}(t)x=0$ (1.3)

and the constants $A,B$ and $C$ are related by $B^{2}-AC=1/W^{2}$, where $W$
is the constant Wronskian of the two linearly independent solutions of (1.3).
The Ermakov-Pinney equation appears in diverse areas of physics such as
nonlinear optics, hydrodynamics and has been extensively studied in the
context of FLRW cosmology Lidsey ; HK . Pinney’s fundamental contribution
consisted in presenting the solution of (1.1) as a first integral of the
third-order equation

$\dddot{x}+4\omega^{2}\dot{x}+4\omega\dot{\omega}x=0.$

The general properties of (1.1) together with its invariants are well known
Guenther ; LL .

In the early years of the twentieth century Gambier listed a minimal set of 24
equations of the second-order which possessed the Painlevé property Gam ; Ince
. The Gambier equations have however found comparatively little application in
the applied sciences, though equation G15 of Gambier’s list Gam

$Y^{{}^{\prime\prime}}=\frac{(Y^{{}^{\prime}})^{2}}{Y}+\frac{Y^{{}^{\prime}}}{Y}+\xi(X)Y^{2}-Y\frac{d}{dX}\left(\frac{\xi^{{}^{\prime}}}{\xi}\right)$
(1.4)

with $\xi$ some differentiable function is known to be related to the family
of generalized Ermakov-Pinney equations. In special cases, this can be
transformed into a Hamiltonian system and at times even into a conjugate
Hamiltonian system which may be solved explicitly GGCG ; GGC .

An alternative (non-EMP) formulation of a homogeneous, isotropic scalar field
cosmology has been studied in WK ; DW . In this case the mapping between the
FLRW cosmology Weinberg  and the Ermakov-Pinney fails. The same is also true
when the scalar field is time-dependent. The purpose of the present article is
to explore the possibility of applications of the equations of Gambier’s
classification in the domain of FLRW cosmology. The Gambier equation which we
obtain from the reduction of $2+1$-FLRW cosmology is hyperbolic in nature, as
a result all the reductions of the cosmological Gambier equation are
hyperbolic in nature. If we take the scalar field of the Williams-Kevrekidis
model to be time-dependent, then the reduced $2+1$-FLRW cosmology contains a
time-dependent drag term. The simplified model of this cosmological equation
is the Milne-Pinney equation. In this context, we show that the generalized
FLRW equation is a reduction of the time-dependent extension of the Gambier
equation G15. A brief note on this time-dependent extension of equation G15
which is also sometimes referred to as the parametric Gambier equation is
given in an appendix. Furthermore we also indicate how equations of the
Ermakov-Painlevé II type arise in the extended FLRW cosmological equation with
a scalar field and perfect fluid matter source. The extended FLRW cosmological
equation with such a scalar field and perfect fluid matter has been the object
of previous analysis by DW .

In recent times, a hybrid Ermakov-Painlevé II system was derived by Rogers
Rogers  in a pioneering work as a reduction of a coupled $N+1$-dimensional
Manakov-type nonlinear Schrödinger system. He showed that the Ermakov
invariants admitted by the hybrid system were key to its systematic reduction
in terms of a single component Ermakov-Painlevé II equation which, in turn,
may be linked to the integrable Painlevé II equation. Rogers Rogers1  further
extended the hybrid family to derive Ermakov-Painlevé IV equation and
investigated the connection between the FLRW cosmology of DW  and the
generalized Pinney equations derived by Rogers, Schief and Winternitz RSW . We
may exploit the underlying Ermakov type invariants of these equations to
obtain solutions of the reduced FLRW cosmological equation with scalar field
and perfect fluid matter source. In summary therefore, the chief objective of
the present paper is to bridge the connection between various Gambier
equations, generalized Pinney equations and the extended FLRW cosmological
equation. In particular, we develop an analytical approach to generalized FLRW
models by expressing the cosmological field equations in terms of the Gambier
equations and generalized Pinney equations.

##  II $3+1$-FLRW cosmology and the linearizable Gambier equations

As mentioned in the introduction a possible arena in which the equations of
Gambier’s classification can find applications is in the domain of FLRW
cosmology. Several papers have been devoted to the issue of various ordinary
differential equations appearing in FLRW cosmologies Lidsey ; CGHKPW ; HL ; HK
; Myrzakulov . In such cosmologies one starts with the standard gravitational
action

$S=\frac{1}{16\pi}\int(R+L_{m})\sqrt{-g}\;d^{4}x,$ (2.1)

where $R$ is the scalar curvature of the space-time described by the metric
tensor $g_{\mu\nu}$ with signature $(-,+,+,+)$ and $g=\mbox{det}(g_{\mu\nu})$,
$L_{m}$ represents the Lagrangian in the matter sector with the FLRW space-
time being characterized by the scale factor $a$ and the metric in geometrized
units ($c=\hbar=G=1$)

$ds^{2}=-dt^{2}+a^{2}(t)\left(\frac{dr^{2}}{1-kr^{2}}+r^{2}d\vartheta^{2}+r^{2}\sin^{2}{\vartheta}d\varphi^{2}\right).$
(2.2)

Here, $k=-1,0,1$ describe a manifold with constant negative curvature (open
universe), no curvature (flat universe) and positive curvature (closed
universe), respectively. Out of the $16$ coefficients of the metric tensor
only four are non-vanishing in the FLRW metric and they include only one
unknown function, the scaling factor $a$. After substituting these expressions
into the Einstein equations

$R_{\mu\nu}-\frac{1}{2}g_{\mu\nu}R=8\pi T_{\mu\nu},$ (2.3)

where $R_{\mu\nu}$ denotes the Ricci tensor and
$T^{\mu\nu}=\mbox{diag}(\rho,p,p,p)$ is the energy-momentum tensor of an
isotropic fluid with energy density $\rho$ and pressure $p$, it turns out that
only two equations are independent, namely

$\left(\frac{\dot{a}}{a}\right)^{2}+\frac{k}{a^{2}}=\frac{8}{3}\pi\rho,\qquad
2\frac{\ddot{a}}{a}+\left(\frac{\dot{a}}{a}\right)^{2}+\frac{k}{a^{2}}=-{8\pi}p,$
(2.4)

where $\rho$ is the mass-energy density and $p$ is the pressure. The first
equation is known as the Friedmann equation. If we subtract the first equation
from the second one, we obtain the so-called acceleration equation, and from
these equations one may obtain the conservation equation

$\dot{\rho}+3H(\rho+p)=0,$ (2.5)

where $H=\dot{a}/a$ is the Hubble parameter. The overdot here denotes
differentiation with respect to $t$. It is not difficult to verify that the
equations (2.4) and (2.5) can be expressed in terms of $N=\ln{a}$ as

$\displaystyle p$ $\displaystyle=$
$\displaystyle-\frac{1}{8\pi}\left(2\ddot{N}+3\dot{N}^{2}+ke^{-2N}\right),$
(2.6) $\displaystyle\rho$ $\displaystyle=$
$\displaystyle\frac{3}{8\pi}\left(\dot{N}^{2}+ke^{-2N}\right),$ (2.7)

while the conservation equation becomes

$\dot{\rho}=-3\dot{N}(p+\rho).$ (2.8)

It is noteworthy that the equations (2.4) and (2.5) exhibit a relationship. To
illustrate this aspect, it can be observed that the second equation in (2.4)
is redundant. This can be easily seen if we express the pressure $p$ using
(2.4) as follows

$p=-\frac{1}{8\pi}\left[2\frac{\ddot{a}}{a}+\left(\frac{\dot{a}}{a}\right)^{2}+\frac{k}{a^{2}}\right].$
(2.9)

Furthermore, by isolating $p$ from (2.5), we can obtain

$p=-\frac{\dot{\rho}}{3H}-\rho.$ (2.10)

At this stage, we can solve the first equation in (2.4) for $\rho$, which
enables us to compute $\dot{\rho}$ and replace $\rho$ and $\dot{\rho}$ into
(2.9). A straightforward computation reveals that the right-hand side of
(2.10) is identical to that of (2.9).  In Myrzakulov ; Dark  the authors
considered several FLRW cosmologies in connection with Dark Matter (DM) models
in which the equations of state (EOS) are a special case of the more general
EOS

$p=f_{1}(\dot{N},N,t)\rho+f_{2}(\dot{N},N,t)\rho^{\beta}+f_{3}(\dot{N},N,t),$
(2.11)

where $\beta\neq 1$ does not need to be an integer and $f_{i}$ with $i=1,2,3$
are some functions of $\dot{N},N$ and $t$. If we replace (2.11) into the
conservation equation and use (2.7), we end up with a new master equation for
$N$ given by

$\ddot{N}=-\frac{3}{2}\left[1+f_{1}(\dot{N},N,t)\right]\left(\dot{N}^{2}+ke^{-2N}\right)-\frac{3^{\beta}f_{2}(\dot{N},N,t)}{2^{3\beta-2}\pi^{\beta-1}}\left(\dot{N}^{2}+ke^{-2N}\right)^{\beta}-4\pi
f_{3}(\dot{N},N,t)+ke^{-2N}.$ (2.12)

At this point we are free to choose the functions $f_{i}$ and the parameters
$k$ and $\beta$ so that the above equation reduces to some known ODE. In
particular, by setting $k=0$ in (2.12) we come up with the following
cosmologies which have been partially discussed in Myrzakulov ; Dark .

  * •

The Pinney’s cosmology represented by G15 in (1.4) with $Y=N$, $X=t$ and
${}^{{}^{\prime}}$ replaced by $\dot{}=d/dt$ is a special case of (2.12) with
$k=0$, $\beta=1/2$ and

$f_{1}=-\frac{2+3N}{N},\quad f_{2}=-\frac{1}{\sqrt{6\pi}N},\quad
f_{3}=-\frac{1}{4\pi}\left[\xi(t)N^{2}-N\frac{d}{dt}\left(\frac{\dot{\xi}}{\xi}\right)\right]$
(2.13)

with $\xi$ some differentiable function. This is a generalization of the
Pinney cosmology discussed in Myrzakulov ; Dark .

  * •

Schrödinger’s cosmology described by $\ddot{N}=\xi(t)N+\sigma N$ considered by
Dark  is recovered by choosing

$f_{1}=-1,\quad f_{2}=0,\quad f_{3}=-\frac{N}{4\pi}\left[\sigma+\xi(t)\right]$
(2.14)

with $\xi$ some differentiable function and $\sigma\in\mathbb{R}$ a free
parameter. Note that since $f_{2}$ vanishes, the parameter $\beta$ in (2.12)
does not need to be fixed.

  * •

Hypergeometric cosmology controlled by the differential equation Dark

$\ddot{N}=\frac{(a+b+1)t-c}{t(1-t)}\dot{N}+\frac{ab}{t(1-t)}N,\quad
a,b,c\in\mathbb{R}$ (2.15)

is a special case of (2.12) with $\beta=1/2$

$f_{1}=-1,\quad f_{2}=-\frac{(a+b+1)t-c}{\sqrt{6\pi}t(t-1)},\quad
f_{3}=-\frac{abN}{4\pi t(1-t)}.$ (2.16)

  * •

Painlev$\acute{\mbox{e}}$ cosmologies of the type (see corresponding
Painlev$\acute{\mbox{e}}$ equations in Dark )

    * –

P1: we have the following possible choices

$f_{1}=-1,\quad f_{2}=0,\quad f_{3}=-\frac{6N^{2}+t}{4\pi},$ (2.17)

with any $\beta\in\mathbb{R}$ or

$\widehat{f}_{1}=-1,\quad\beta=0,\quad\widehat{f}_{2}+\widehat{f}_{3}=-\frac{6N^{2}+t}{4\pi}.$
(2.18)

    * –

P2: we find

$f_{1}=-1,\quad f_{2}=0,\quad f_{3}=-\frac{2N^{3}+(t-t_{0})N+\alpha}{4\pi},$
(2.19)

with any $\beta\in\mathbb{R}$ or

$\widehat{f}_{1}=-1,\quad\beta=0,\quad\widehat{f}_{2}+\widehat{f}_{3}=-\frac{2N^{3}+(t-t_{0})N+\alpha}{4\pi},\quad
t_{0}\in\mathbb{R}.$ (2.20)

    * –

P3: we have

$f_{1}=-\left(1+\frac{2}{3N}\right),\quad\beta=\frac{1}{2},\quad
f_{2}=\frac{1}{\sqrt{6\pi}t},\quad f_{3}=\frac{1}{4\pi
t}\left(\widehat{\alpha}N^{2}+\widehat{\beta}\right)-\frac{\widehat{\gamma}}{4\pi}N^{3}-\frac{\widehat{\delta}}{4\pi
N}$ (2.21)

with $\widehat{\alpha}$, $\widehat{\beta}$, $\widehat{\gamma}$ and
$\widehat{\delta}$ real parameters entering in P3. Another more general choice
is

$\widetilde{f}_{1}+\widetilde{f}_{2}=-\left(1+\frac{2}{3N}\right),\quad\beta=1,\quad\widetilde{f}_{3}=f_{3}.$
(2.22)

    * –

P4: we obtain

$f_{1}+f_{2}=-\left(1+\frac{1}{3N}\right),\quad\beta=-1,\quad
f_{3}=-\frac{1}{4\pi
N}\left[\frac{3}{2}N^{4}+4tN^{3}+2(t-\widehat{\alpha})N^{2}+\widehat{\delta}\right].$
(2.23)

    * –

P5: if we consider $\beta=1/2$, then

$f_{1}=-\left[1+\frac{1}{3N}+\frac{2}{3(N-1)}\right],\quad
f_{2}=\frac{1}{\sqrt{6\pi}t},\quad
f_{3}=-\frac{1}{4\pi}\left[\frac{\widehat{\gamma}}{t}N+\frac{(N-1)^{2}}{t^{2}}\left(\widehat{\alpha}N+\frac{\widehat{\beta}}{N}\right)+\widehat{\delta}\frac{N(N+1)}{N-1}\right].$
(2.24)

If we instead pick $\beta=1$, we end up with

$\widetilde{f}_{1}+\widetilde{f}_{2}=-\left[1+\frac{1}{3N}+\frac{2}{3(N-1)}\right],\quad\widetilde{f}_{3}=-\frac{1}{4\pi}\left[-\frac{1}{t}\left(\dot{N}-\widehat{\gamma}N\right)+\frac{(N-1)^{2}}{t^{2}}\left(\widehat{\alpha}N+\frac{\widehat{\beta}}{N}\right)+\widehat{\delta}\frac{N(N+1)}{N-1}\right].$
(2.25)

    * –

P6: for $\beta=1/2$ we have

$\displaystyle f_{1}$ $\displaystyle=$
$\displaystyle-1-\frac{1}{3}\left(\frac{1}{N}+\frac{1}{N-1}+\frac{1}{N-t}\right),\quad
f_{2}=\frac{1}{\sqrt{6\pi}}\left(\frac{1}{t}+\frac{1}{t-1}+\frac{1}{N-t}\right),$
(2.26) $\displaystyle f_{3}$ $\displaystyle=$
$\displaystyle-\frac{N(N-1)(N-t)}{4\pi
t^{2}(t-1)^{2}}\left[\widehat{\alpha}+\widehat{\beta}\frac{t}{N^{2}}+\widehat{\gamma}\frac{t-1}{(N-1)^{2}}+\widehat{\delta}\frac{t(t-1)}{(N-t)^{2}}\right],$
(2.27)

while for $\beta=1$ we find

$\widetilde{f}_{1}+\widetilde{f}_{2}=-1-\frac{1}{3}\left(\frac{1}{N}+\frac{1}{N-1}+\frac{1}{N-t}\right),$
(2.28)
$\widetilde{f}_{3}=\frac{1}{4\pi}\left(\frac{1}{t}+\frac{1}{t-1}+\frac{1}{N-t}\right)\dot{N}-\frac{N(N-1)(N-t)}{4\pi
t^{2}(t-1)^{2}}\left[\widehat{\alpha}+\widehat{\beta}\frac{t}{N^{2}}+\widehat{\gamma}\frac{t-1}{(N-1)^{2}}+\widehat{\delta}\frac{t(t-1)}{(N-t)^{2}}\right].$
(2.29)

Equation (2.12) allows to construct further FLRW cosmological models not
covered in the work of Myrzakulov ; Dark . For instance, by setting $k=0$ in
(2.12) and choosing

$f_{1}=-1,\quad f_{2}=0,\quad
f_{3}=\frac{1}{4\pi}\left(\frac{\gamma}{t}+\frac{\delta}{t-1}+\frac{\epsilon}{t-a}\right)\dot{N}+\frac{\alpha\beta
t-q}{4\pi t(t-1)(t-a)}N$ (2.30)

with $\alpha,\beta,\gamma,\delta,\epsilon,a,q\in\mathbb{R}$ such that
$\epsilon=\alpha+\beta-\gamma-\delta+1$ ensures that the regular singularity
at infinity has exponents $\alpha$ and $\beta$, one may derive a Heun
cosmology. For a detailed study on the Heun functions we refer to Ronveaux .
It is interesting to observe that equation (2.12) permits to construct a FLRW
cosmological model such that $N$, i.e. the logarithm of the scale factor,
satisfies a certain Gambier equation Gam . For instance, if we let

$k=0,\quad\beta=\frac{1}{2},\quad f_{1}=-\frac{2+3N}{N},\quad
f_{2}=-\frac{1}{\sqrt{6\pi}N},\quad
f_{3}=-\frac{1}{4\pi}\left[\xi(t)N^{2}-N\frac{d}{dt}\left(\frac{\dot{\xi}}{\xi}\right)\right]$
(2.31)

in (2.12) where $\xi$ is some differentiable function, then (2.12) reduces to
the Gambier G15 equation (1.4). The canonical list of second-order ordinary
differential equations with the Painlevé property remains till date a rich
area of research and contains certain outstanding problems. The minimal list
of twenty four equations given by Gambier are fundamental in the sense that
the remaining ones can be obtained through Miura transformations LGR . Even
though the Gambier equations were classified more than a hundred years ago Gam
; Ince  they have led a somewhat forgotten existence compared to the Painlevé
equations which have received a great deal of attention not only because of
their inherent structures but also on account of their crucial role in
defining the very notion of integrability of nonlinear partial differential
equations appearing in various branches of the physical sciences. Among the
equations of Gambier’s list some are linearizable, and equation G27 when
written as a system has the form

$\dot{y}=-y^{2}+by+c,\;\;\dot{x}=a_{g}x^{2}+nxy+s$ (2.32)

where $a_{g},b$ and $c$ are functions of the independent variable $t$, $s$ is
a constant and $n$ is an integer. Eqn. (2.32) is generally referred to as the
Gambier equation and may be expressed as a second-order equation GGCG

$\ddot{x}=\left(1-\frac{1}{n}\right)\frac{\dot{x}^{2}}{x}+a_{g}\frac{n+2}{n}x\dot{x}+b\dot{x}-s\left(1-\frac{2}{n}\right)\frac{\dot{x}}{x}-\frac{a_{g}^{2}}{n}x^{3}+(\dot{a}_{g}-a_{g}b)x^{2}+\left(cn-\frac{2a_{g}s}{n}\right)x-bs-\frac{s^{2}}{nx}.$
(2.33)

It was shown in GGCG  how almost all the linearizable equations G1-G26 of the
Gambier list can be obtained from G27 by taking appropriate limits.

##  III Reductions of the $2+1$-FLRW cosmology model to the Gambier equations

In WK  Williams and Kevrekidis examined the reduction of models of the FLRW
type in $2+1$ dimensions and analysed the resulting ODEs. In the following, we
briefly outline their derivation of the Ermakov-Pinney equation. The
Einstein’s equation for the metric given by

$ds^{2}=-dt^{2}+a^{2}(t)\left(\frac{dr^{2}}{1-kr^{2}}+r^{2}d\varphi^{2}\right),$
(3.1)

are

$\displaystyle\frac{\dot{a}^{2}+k}{a^{2}}$
$\displaystyle=\widehat{G}(\rho_{m}+\rho_{\phi}),$ (3.2)
$\displaystyle\frac{\ddot{a}}{a}$
$\displaystyle=-\widehat{G}(p_{m}+p_{\phi}),$ (3.3)
$\displaystyle\ddot{\phi}+2\frac{\dot{a}}{a}\dot{\phi}$
$\displaystyle=-\frac{\partial V}{\partial\phi}.$ (3.4)

Here, $\widehat{G}$ is the Newton gravitational constant in $2+1$-dimensions
while $\rho$ and $p$ represent the density and pressure, respectively. The
subscript $m$ refers to the matter (fluid) and $\phi$ to the homogeneous
scalar field whose density and pressure are given by
$\rho_{\phi}=\dot{\phi}^{2}/2+V(\phi)$ and
$p_{\phi}=\dot{\phi}^{2}/2-V(\phi)$, respectively, and the scalar field $\phi$
can be viewed as a kind of perfect fluid with equation of state
$p_{\phi}=w_{\phi}\rho_{\phi}$ where

$w_{\phi}=\frac{\dot{\phi}^{2}-2V(\phi)}{\dot{\phi}^{2}+2V(\phi)}.$ (3.5)

Furthermore, by assuming an equation of state for the matter
$p_{m}=w_{m}\rho_{m}$ with $0<w_{m}\leq 1$, the authors in WK  derived the
following expression for the matter density

$\rho_{m}=\xi a^{-2(1+w_{m})},$ (3.6)

where $\xi=\rho_{m}(0)a(0)^{2(1+w_{m})}$ is a constant. From (3.2) and the
forms of $\rho_{\phi}$ and $p_{\phi}$ stated above one can derive the equation

$\frac{\ddot{a}}{a}-\frac{\dot{a}^{2}}{a^{2}}=-\widehat{G}\left[\dot{\phi}^{2}+\frac{\xi(1+w_{m})}{a^{2(1+w_{m})}}\right]+\frac{k}{a^{2}}.$
(3.7)

Introducing a new temporal variable $\tau=\tau(t)$ and $Y=Y(\tau)$ such that

$Y(\tau(t))=a^{(1+w_{m})}\quad\mbox{with}\quad\frac{dt}{d\tau}=\frac{1}{Y(\tau)}$
(3.8)

we find that (3.7) may be expressed in the form

$Y^{\prime\prime}(\tau)+\widehat{G}(1+w_{m})(\phi^{{}^{\prime}})^{2}Y=-\frac{\widehat{G}\xi(1+w_{m})^{2}}{Y^{3}}+\frac{k(1+w_{m})}{Y^{1+\frac{2}{1+w_{m}}}}.$
(3.9)

with ${}^{{}^{\prime}}=d/d\tau$. In the case of flat universes ($k=0$), this
equation reduces to the Ermakov-Pinney equation with potential
$Q(\tau)=\widehat{G}(1+w_{m})(\phi^{{}^{\prime}})^{2}$ according to the
notation used in WK ; HL . The authors of WK  then go on to derive explicit
solutions of the original cosmological models by assuming a solution of (3.9).
In particular, they consider the special case when $\xi=0$ (corresponding to
either a vanishing initial density or a vanishing initial scale factor, the
latter provided that $w_{m}<-1$) and employ a specific ansatz for the
potential term in order to derive some solutions of (3.9) under the condition
that $\rho_{m}(0)=0$. At this point a remark is in order. Such an initial
constraint coupled with (3.6) implies that at all times there is no matter
content in the cosmological models developed by WK . Moreover, the equation of
state $p_{m}=w_{m}\rho_{m}$ leads to a vanishing pressure. This is equivalent
to have a vanishing energy-momentum tensor for the matter component and
therefore, the choice of taking $\gamma=1$ (or equivalently $w_{m}=0$), i.e. a
cold dust scenario, in the models studied by WK  is shaky from a physics-based
perspective.

While most papers on FLRW cosmology exploit the Ermakov-Pinney equation, our
motivation here is to show that (3.9) is mappable to certain reductions of the
Gambier equation. According to existing observational data, it is not yet
possible to distinguish between phantom ($w_{m}<-1$) and non-phantom
cosmological scenarios. Hence, it is physically reasonable to consider a
phantom energy case with $w_{m}<-1$. This usually leads to a Big Rip. In fact,
in the reminder of this paper we relax the previous restrictions on the
parameter $\gamma=w_{m}+1$ WK  and allow it to be even negative, i.e.
$w_{m}<0$. Then, under the transformation $Y\rightarrow X=Y^{\sigma}$ with
$\sigma\in\mathbb{R}$, (3.9) becomes

$X^{\prime\prime}=\left(1-\frac{1}{\sigma}\right)\frac{{X^{{}^{\prime}}}^{2}}{X}-\widehat{G}\sigma(1+w_{m})(\phi^{{}^{\prime}})^{2}X-\widehat{G}\xi\sigma(1+w_{m})^{2}X^{1-\frac{4}{\sigma}}+k\sigma(1+w_{m})X^{1-\frac{2}{\sigma}\left(1+\frac{1}{1+w_{m}}\right)}.$
(3.10)

If $k\neq 0$, we can set $\sigma=-4/k$ and $1+w_{m}=-k/2l$ with $l\neq 0$, and
(3.10) assumes the following form

$X^{\prime\prime}=\left(1+\frac{k}{4}\right)\frac{{X^{{}^{\prime}}}^{2}}{X}-\frac{2\widehat{G}}{l}(\phi^{{}^{\prime}})^{2}X+\widehat{G}\xi\frac{k}{l^{2}}X^{1+k}+\frac{2k}{l}X^{1+\frac{k}{2}-l},$
(3.11)

which is a reduction of the Gambier equation. It is worth to note that this
reduced Gambier equation is obtained from the $2+1$-FLRW cosmology model as
proposed by WK . Since it follows from the cosmology equation so the signs of
the coefficients are fixed by physics.

###  III.1 Generalized Pinney Equation

Let us set $\lambda(\tau)=\widetilde{G}(d\phi/d\tau)^{2}$ and
$\mu=\widetilde{G}\xi=2\pi G\rho_{m}(0)(a(0))^{2(1+w_{m})}$ in (3.11) and
introduce the transformation $X=(z/v)^{1/\alpha}$ with $\alpha\neq 0$ where
$v=$constant. Under such a transformation (3.11) reduces to

$z^{\prime\prime}=\left(1+\frac{k}{4\alpha}\right)\frac{\dot{z}^{2}}{z}-\frac{2\alpha}{l}\lambda(\tau)z+\frac{\alpha
k}{l^{2}}\mu v^{-\frac{k}{\alpha}}z^{1+\frac{k}{\alpha}}+\frac{2\alpha
k}{l}v^{-\frac{1}{\alpha}\left(\frac{k}{2}-l\right)}z^{1+\frac{1}{\alpha}\left(\frac{k}{2}-l\right)}.$
(3.12)

Demanding that the coefficient of $\dot{z}^{2}$ vanishes leads to
$\alpha=-k/4=\pm 1/4$ and setting

$\omega(\tau)=\frac{\lambda(\tau)}{2}=\frac{1}{2}\widetilde{G}(\phi^{{}^{\prime}})^{2}$
(3.13)

allows to cast (3.12) into the form

$z^{\prime\prime}=\frac{k}{l}\omega(\tau)z-\frac{\mu
k^{2}}{4l^{2}}\frac{v^{4}}{z^{3}}-\frac{k^{2}}{2l}v^{2-4l/k}z^{-1+4l/k}.$
(3.14)

Finally, writing $n=-l/k$ gives rise to

$z^{\prime\prime}+\frac{1}{n}\omega(\tau)z=-\frac{\mu
v^{4}}{4n^{2}}\frac{1}{z^{3}}+\frac{k}{2n}v^{2(2n+1)}z^{-(4n+1)}.$ (3.15)

We now distinguish the following cases.

  * •

Case 1: Let $n=1$ which in view of $\gamma=-k/2l$ implies that $\gamma=1/2$ or
equivalently $w_{m}=-1/2$ and causes (3.15) to appear as

$z^{\prime\prime}+\omega(\tau)z=-\frac{\mu
v^{4}}{4z^{3}}-\frac{kv^{6}}{2z^{5}}.$ (3.16)

  * •

Case 2: Let $n=1/2$ so that $\gamma=1$, i.e. $w_{m}=0$. For this we find that
(3.15) becomes

$z^{\prime\prime}+2\omega(\tau)z=\frac{(k-\mu)v^{4}}{z^{3}}.$ (3.17)

As a consistency check, we observe that for $\gamma=1$ the pressure vanishes,
i.e. $p_{m}=0$, which is in line with what we expect for a cold dust scenario
in a $(2+1)$-FLRW cosmological model. It is interesting to observe that in the
case $\phi(\tau)$ is a constant scalar field, i.e. the potential $V$ is
constant, then $\omega(\tau)=0$ in virtue of (3.13) and the above equation
admits the solution

$z(\tau)=\sqrt{c_{1}\tau^{2}+2c_{1}c_{2}\tau+c_{1}c_{2}^{2}+\frac{(k-\mu)v^{4}}{c_{1}}}$
(3.18)

with $c_{1}$ and $c_{2}$ arbitrary integration constants and $c_{1}\neq 0$.
The corresponding solution with a minus sign in front of the root has been
neglected because it would lead to a negative scale factor. Since
$\alpha=-k/4$ simple algebra gives that $Y=z/v$ and by construction it is a
solution to (3.9) for $k=-1$ (open universe) or $k=1$ (closed universe). At
this point a remark is in order. It is gratifying to observe that despite the
assertion in WK  according to which equation (3.9) cannot be solved
explicitly, we were able to provide a nontrivial solution. If we recall that
$w_{m}=0$, the first equation in (3.8) implies that $Y=a$ and we have

$a(\tau)=\frac{1}{v}\sqrt{c_{1}\tau^{2}+2c_{1}c_{2}\tau+c_{1}c_{2}^{2}+\frac{(k-\mu)v^{4}}{c_{1}}}.$
(3.19)

In order to switch back to the time variable $t$, we need to integrate the ODE

$\frac{dt}{d\tau}=\frac{v}{z(\tau)}.$ (3.20)

Let us consider for simplicity the case $c_{2}=0$ and $c_{1}>0$ and break down
the analysis as follows

    * –

Case $k=-1$: Then, we have

$\frac{dt}{d\tau}=\frac{v}{\sqrt{c_{1}}\sqrt{\tau^{2}-A}},\quad
A=\frac{(1+\mu)v^{4}}{c_{1}^{2}}>0.$ (3.21)

A trivial integration gives

$t=\frac{v}{\sqrt{c_{1}}}\ln{(\tau+\sqrt{\tau^{2}-A})}.$ (3.22)

Since $v$ is a free parameter, we can exploit this degree of freedom in order
to choose $v=\sqrt{c_{1}}$ and we end up with

$t=\ln{(\tau+\sqrt{\tau^{2}-(1+\mu)})}.$ (3.23)

Solving for $\tau$ gives

$\tau=\frac{e^{2t}+1+\mu}{2e^{t}}$ (3.24)

and by means of (3.19) the scale factor reads

$a(t)=\sqrt{\left(\frac{e^{2t}+1+\mu}{2e^{t}}\right)^{2}-(1+\mu)}.$ (3.25)

It can be immediately seen that such a universe will collapse at the time
$t_{c}=\ln{\sqrt{1+\mu}}$.

    * –

Case $k=+1$: Fixing $v=\sqrt{c_{1}}$ yields

$\frac{dt}{d\tau}=\frac{1}{\sqrt{\tau^{2}+1-\mu}}.$ (3.26)

If $\mu<1$, a trivial integration gives $t=\sinh^{-1}{(\tau/\sqrt{1-\mu})}$
and hence, $\tau=\sqrt{1-\mu}\sinh{t}$. The scale factor is represented by

$a(t)=\sqrt{1-\mu}\cosh{t}.$ (3.27)

In the special case $\mu=1$, we get $a(t)=e^{t}$.

  * •

Case 3: Let $n=3/8$. Then, $\gamma=4/3$ or equivalently, $w_{m}=1/3$. This
corresponds to the case of relativistic matter and (3.15) reads

$z^{\prime\prime}+\frac{8}{3}\omega(\tau)z=-\frac{16\mu
v^{4}}{9z^{3}}+\frac{4kv^{7/2}}{3z^{5/2}}.$ (3.28)

  * •

Case 4: Let $n=1/3$ (so that $\gamma=3/2$) whence (3.15) becomes

$z^{\prime\prime}+3\omega(\tau)z=-\frac{9\mu
v^{4}}{4z^{3}}-+\frac{3kv^{10/3}}{2z^{7/3}}.$ (3.29)

However, as $\gamma=3/2$ one has $p_{m}=\rho_{m}/2$ and this obviously
conforms to the original assumption made in WK , namely $1\leq\gamma<2$ which
implies $1/4\leq n<1/2$.

  * •

Case 5: Let $n=1/4$ (so that $\gamma=2$ or equivalently $w_{m}=1$) whence
(3.15) becomes

$z^{\prime\prime}+4\omega(\tau)z=-\frac{4\mu
v^{4}}{z^{3}}+\frac{2kv^{3}}{z^{2}}.$ (3.30)

This corresponds to $p_{m}=\rho_{m}$, i.e. a stiff equation of state.

  * •

Case 6:(Ermakov-Painlevé II equation) Let $n=-1$ which implies $\gamma=-1/2$
and set $\delta=k/2v^{2}$. Then, (3.15) becomes

$z^{\prime\prime}-\omega(\tau)z+\delta
z^{3}=-\frac{1}{4z^{3}}\left(\frac{\sqrt{\mu}k}{2\delta}\right)^{2}.$ (3.31)

This nonlinear equation is somewhat similar in appearance to the (single
component) Ermakov-Painlevé II equation

${z}^{\prime\prime}+\frac{\tau}{2}z+\delta
z^{3}=-\frac{1}{4z^{3}}\left(\nu-\frac{\delta}{2}\right)^{2}$ (3.32)

which has been derived by Conte ; Rogers . Gromak  showed that (3.32) is
related to the Painlevé II equation. Furthermore, Rogers  proved that the
canonical single component Ermakov-Painlevé II equation can be related to a
particular Ermakov-Ray-Reid system ( for details, see Rogers ) whose
characteristic invariant may be exploited systematically to construct the
solutions. We will not further elaborate on this aspect because we leave it
for future investigation.

Finally, it is worth noting that all the generalized Pinney equations as
obtained in this section follow from the cosmological Gambier equation (3.11)
or (3.12) where the signs of the coefficients are fixed by the underlying
physical problem.

##  IV The Milne-Pinney system and the generalized FLRW cosmology equation
with time dependent drag term

In the previous section, we have mapped the reduced $2+1$-FLRW cosmology
equation (3.11) to various equations of the Pinney type. In the present
section, we address instead the question of what happens when the cosmological
equation (3.11) is modified by adding a time-dependent drag term. This can
happen when the scalar field exhibits a time-dependent behavior. In this case,
even though it is not possible to map the generalized FLRW cosmology equation
to the regular Gambier equation G27, it turns out that it can be mapped to a
generalization of the parametric Gambier equation G27 (see appendix). When the
Pinney cosmology equation is modified with a time-dependent drag term the
resulting second-order nonlinear differential equation becomes

$\ddot{q}+w(t)^{2}\dot{q}+Kq^{-3}=0,\qquad\dot{q}=\frac{dq}{dt},$ (4.1)

and describes the time evolution of a damped oscillator with inverse quadratic
potential. This is the Milne-Pinney equation and in this context, it may be
regarded as the Milne-Pinney cosmology equation. It is possible once again to
map the Milne-Pinney equation to the Gambier equation. We list here below the
most important cases under the assumption that $q$ satisfies the Milne-Pinney
equation (4.1).

  * •

Case I: Let $x=a(t)/q^{2}(t)$. Then, $x$ satisfies the Gambier equation

$\ddot{x}=\frac{3}{2}\frac{{\dot{x}}^{2}}{x}-\frac{\dot{a}}{a}\dot{x}+\frac{2K}{a^{2}}x^{3}+\left[\frac{\ddot{a}}{a}-\frac{1}{2}\left(\frac{\dot{a}}{a}\right)^{2}+2w^{2}(t)\right]x.$
(4.2)

  * •

Case II: Let $x=a(t)/q^{4}(t)$. Then, $x$ satisfies the Gambier equation

$\ddot{x}=\frac{5}{4}\frac{{\dot{x}}^{2}}{x}-\frac{1}{2}\frac{\dot{a}}{a}\dot{x}+\frac{4K}{a}x^{2}+\left[\frac{\ddot{a}}{a}-\frac{3}{4}\left(\frac{\dot{a}}{a}\right)^{2}+4w^{2}(t)\right]x.$
(4.3)

  * •

Case III: Let $x=a(t)q^{4}(t)$. Then, $x$ satisfies the Gambier equation

$\ddot{x}=\frac{3}{4}\frac{{\dot{x}}^{2}}{x}+\frac{1}{2}\frac{\dot{a}}{a}\dot{x}+\left[\frac{\ddot{a}}{a}-\frac{5}{4}\left(\frac{\dot{a}}{a}\right)^{2}-4w^{2}(t)\right]x-4Ka.$
(4.4)

  * •

Case IV: Let $x=a(t)q^{2}(t)$. Then, $x$ satisfies the Gambier equation

$\ddot{x}=\frac{1}{2}\frac{{\dot{x}}^{2}}{x}+\frac{\dot{a}}{a}\dot{x}+\left[\frac{\ddot{a}}{a}-\frac{3}{2}\left(\frac{\dot{a}}{a}\right)^{2}-2w^{2}(t)\right]x-\frac{2Ka^{2}}{x}.$
(4.5)

It is clear that the equations (3.11) and (4.2)-(4.5) are the reductions of
the parametric equation (6.4) drived in the appendix. In other words, the
generalized FLRW equation is not the reduction of the Gambier equation but of
its parametric generalization.

##  V Conclusions

In this work, we have shown how the Gambier equations emerge in $3+1$\- and
$2+1$-FLRW cosmologies. This was done by deriving a master equation for the
logarithm of the scale factor under the assumption of an EOS generalizing a
family of EOS widely used to describe DM Lopez ; N1 ; N2 . Our findings
reveals the importance of future studies devoted to construct
analytical/approximated solutions of the Gambier equations in order to better
understand the behaviour of Gambier inspired cosmological models. Even though,
the role of the Ermakov-Pinney equation in FLRW cosmology is well known in the
literature, here we have explored the role of various generalizations of
Pinney equation, as formulated by Rogers ; Rogers1 ; RSW , in 2+1-dimensional
FLRW cosmology. This raises an important issue regarding the existence of a
systematic relation between integrable class of 1+1-ODEs and FLRW cosmology
and clearly, demands further investigation.

##  VI Appendix: The generalized parametric Gambier equation

Let us consider the following Riccati differential operator

$\mathbb{R}=\frac{d}{dt}+H(x,t),\quad H(x,t)=h(t)x+c(t)+\frac{\sigma}{x},$
(6.1)

with $\sigma$ being a constant. Then, $\mathbb{R}x=0$ implies that

$\dot{x}+H(x,t)x=0,$ (6.2)

and requiring that $\mathbb{R}^{2}x=0$ yields

$\mathbb{R}(\dot{x}+h(t)x^{2}+c(t)x+\sigma)=0$ (6.3)

which can be written as

$\ddot{x}+3h(t)x\dot{x}+2c(t)\dot{x}+\sigma\frac{\dot{x}}{x}+h^{2}(t)x^{3}+\left[2h(t)c(t)+\dot{h}\right]x^{2}+\left[c^{2}(t)+\dot{c}+2\sigma
h(t)\right]x+2\sigma c(t)+\frac{\sigma^{2}}{x}=0.$ (6.4)

This equation bears a remarkable similarity with the Gambier equation, which
is given by

$\ddot{x}=\frac{n-1}{n}\frac{\dot{x}^{2}}{x}+\alpha(t)\frac{n+2}{n}x\dot{x}+\beta(t)\dot{x}-\frac{n-2}{n}\frac{\dot{x}}{x}\sigma(t)+\frac{\alpha^{2}(t)}{n}x^{3}+$
$\left(\dot{\alpha}-\alpha(t)\beta(t)\right)x^{2}+\left[\gamma(t)n-2\alpha(t)\frac{\sigma(t)}{n}\right]x-\beta(t)\sigma(t)-\frac{\sigma^{2}(t)}{nx}.$
(6.5)

For $n=1$ under the scaling transformation $t\longrightarrow-t$ this equations
becomes

$\ddot{x}+3\alpha(t)x\dot{x}+\beta(t)\dot{x}+\frac{\dot{x}}{x}\sigma(t)+\alpha^{2}(t)x^{3}+(\alpha^{\prime}(t)+\alpha\beta)x^{2}+(2\alpha\sigma(t)-\gamma(t))x+\beta\sigma(t)+\frac{\sigma^{2}(t)}{x}=0.$
(6.6)

Clearly if we assume $\sigma$ to be independent of $t$ in (6.6) then its
comparison with (6.4) shows that

$h(t)=\alpha(t),\;\;\;2c(t)=\beta(t)$

while $c(t)$ must satisfy the equation

$c^{\prime}(t)+c^{2}(t)+\gamma(t)=0.$ (6.7)

Eqn. (6.7) is the generalized Riccati-I equation and under the transformation
$c(t)=\frac{u^{\prime}(t)}{u}$ becomes

$u^{\prime\prime}+\gamma(t)u=0,$ (6.8)

which is a linear equation. In fact if $\gamma(t)>0$ for all $t$ then it
becomes a harmonic oscillator equation with variable frequency. In general
(6.5) also contains a term involving $\dot{x}^{2}/x$. Such a term may also be
included into the previous sequence of equations if we make the following
observation. Define an operator

$\mathbb{T}=\left(\frac{d}{dt}+\frac{\dot{x}}{x}\right)$ (6.9)

and consider the following sequence of differential equations
$\mathbb{T}^{m}x=0$:

$\mathbb{T}x=2\dot{x}=0,\;\;\mathbb{T}^{2}x=\left(\frac{d}{dt}+\frac{\dot{x}}{x}\right)2\dot{x}=2\ddot{x}+2\frac{\dot{x}^{2}}{x}=0,\;\mbox{etc.}$

This suggests that we consider a combination of the two operators $\mathbb{R}$
and $\mathbb{T}$, namely $\mathbb{R}+\lambda\mathbb{T}$, where $\lambda$ is a
parameter. Then we have

$(\mathbb{R}+\lambda\mathbb{T})x=\dot{x}+h(t)x^{2}+c(t)x+\sigma+2\lambda\dot{x}=0,$

or in other words

$(1+2\lambda)\dot{x}+h(t)x^{2}+c(t)x+\sigma=0,$

which is once again a generalized Riccati-I equation. Next consider the
equation

$(\mathbb{R}^{2}+\lambda\mathbb{T}^{2})x=0$

which implies

$(1+2\lambda)\ddot{x}+2\lambda\frac{\dot{x}^{2}}{x}+3h(t)x\dot{x}+2c(t)\dot{x}+\sigma\frac{\dot{x}}{x}+h^{2}(t)x^{3}$
$+\left(h^{\prime}(t)2h(t)c(t)\right)x^{2}+\left(c^{\prime}(t)+c^{2}(t)+2\sigma
h(t)\right)x+2\sigma c(t)+\frac{\sigma^{2}}{x}=0.$

## Acknowledgement

PG is profoundly grateful to Professors Basil Grammaticos and Alfred Ramani
for discussing various things regarding the Gambier XXVII equation. Work by
the author PG was supported by the Khalifa University of Science and
Technology under grant number FSU-2021-014. Last but not least, we would like
to thank the anonymous referee for his/her valuable suggestions which
definitely improved the present work.

Data accessibility  This article does not use data.

## References

  * (1) E. Witten, 2 + 1 dimensional gravity as an exactly soluble system, Nucl. Phys. B 311, 46 (1988).
  * (2) S. Giddings, J. Abbott and K. Kuchar, Einstein’s Theory in a Three-Dimensional Space-Time, Gen. Rel. Grav. 16, 751 (1984).
  * (3) J. D. Barrow, A. B. Burd and D. Lancaster, Three-dimensional classical spacetimes, Class. Quantum Grav. 3, 551 (1986).
  * (4) M. Ba$\tilde{\mbox{n}}$ados, C. Teitelboim and J. Zanelli, Black Hole in Three-Dimensional Spacetime, Phys. Rev. Lett. 69, 1849 (1992).
  * (5) M. Ba$\tilde{\mbox{n}}$ados, M. Hennaux, C. Teitelboim and J. Zanelli, Geometry of the 2+ 1 black hole, Phys. Rev. D 48, 1506 (1993).
  * (6) N.J. Cornish and N.E. Frankel, Gravitation in 2fl dimensions, Phys. Rev. D 43, 2555 (1991).
  * (7) N. Cruz and Cristian Martinez, Cosmological scaling solutions of minimally coupled scalar fields in three dimensions, Class. Quantum Grav. 17, 2867 (2000).
  * (8) T. Christodoulakis, T. Grammenos, C. Helias, P. Kevrekidis, G. Papadopoulos and F. Williams, On 3+1-dimensional scalar field cosmologies, from Progress in General Relativity and Quantum Cosmology Research, Nova Science Pub. (2005).
  * (9) F. Williams and P. Kevrekidis, On 2+1-dimensional Friedmann-Robertson-Walker universes: an Ermakov-Pinney equation approach, Class. Quan. Gravity 20, L177 (2003).
  * (10) C. Kritpetch, J. Sanongkhun, P. Vanichchapongjaroen and B. Gumjudpai, Nonlinear Schrödinger-type formulation of scalar field cosmology: Two barotropic fluids and exact solutions, Mod. Phys. Lett. A 35, 2050157 (2020).
  * (11) R. Hawkins and J. Lidsey, The Ermakov-Pinney equation in scalar field cosmologies, Physical Review D 66, 023523 (2002).
  * (12) J. Lidsey, Cosmic dynamics of Bose-Einstein Condensates, Class. Quantum Grav. 21, 777 (2004).
  * (13) M. Cariglia, A. Galajinsky, G.W. Gibbons, and P.A. Horvathy, Cosmological aspects of the Eisenhart–Duval lift, Eur. Phys. J. C 78 , 314 (2018).
  * (14) P. G. L. Leach and K. Andriopoulos, The Ermakov equation: a commentary, Appl. Anal. Discrete Math. 2, 146 (2008).
  * (15) V. Ermakov, Second order differential equations. Conditions of complete integrability, Universita Izvestia Kiev Series III 9, 1 (1880) (Translator: A. O. Harin, Redactor: P. G. L. Leach, Appl. Anal. Discrete Math. 2, 123 (2008).
  * (16) E. Pinney, The nonlinear differential equation $y^{{}^{\prime\prime}}(x)+p(x)y+cy^{-3}=0$, Proc. Am. Math. Soc. 1, 681 (1950).
  * (17) G. Herring, P.G. Kevrekidis, F. Williams, T. Christodoulakis and D.J. Frantzeskakis, From Feshbach-Resonance Managed Bose-Einstein Condensates to Anisotropic Universes: Some Applications of the Ermakov-Pinney equation with Time-Dependent Nonlinearity, Phys. Lett. A 367, 140 (2007).
  * (18) N. J. Güunther and P. G. L. Leach, Generalized invariants for the time- dependent harmonic oscillator, J. Math. Phys. 18, 572 (1977).
  * (19) P. G. L. Leach, An exact invariant for a class of time-dependent anharmonic oscillators with cubic anharmonicity, J. Math. Phys. 22, 465 (1981).
  * (20) B. Gambier, Sur les équations différentielles du second ordre et du premier degré dont l’intégrale générale est á points critique fixés, Acta Math. 33, 51 (1910).
  * (21) E.L. Ince, Ordinary Differential Equations, Dover, New York (1956).
  * (22) P. Guha, A. Ghose Choudhury and B. Grammaticos, Dynamical studies of equations from the Gambier family, SIGMA 7, 028 (2011).
  * (23) P. Guha and A. Ghose Choudhury, Folding transformations of equations from the Gambier family, Commun. Nonlinear Sci. Numer. Simul. 22, 1028 (2015).
  * (24) J. D’Ambroise, F. L. Williams, A non-linear Schrödinger type formulation of FLRW scalar field cosmology, Int. J. Pure Appl. Math. 34, 117 (2007).
  * (25) S. Weinberg, Gravitation and Cosmology: Principles and applications of the general theory of relativity, John Wiley & Sons (1972).
  * (26) C. Rogers, A novel Ermakov-Pinalevé II system, $N+1$-dimensional coupled NLS and elastodynamic reductions, Stud. Appl. Math. 133, 214 (2014).
  * (27) C. Rogers, Hybrid Ermakov-Painlevé IV systems, J. Nonlinear Math. Phys. 21, 628 (2014).
  * (28) C. Rogers, W. K. Schief and P. Winternitz, Lie-Theoretical Generalization and Discretization of the Pinney Equation, J. Math. Anal. and Appl. 216, 246 (1997).
  * (29) K. Esmakhanova, N. Myrzakulov, G. Nugmanova, L. Chechin and R. Myrzakulov, Integrable and nonintegrable FRW cosmological models induced by some second-order ordinary differential equations, arXiv:1104.3705v1
  * (30) K. Esmakhanova, N. Myrzakulov, G. Nugmanova, Y. Myrzakulov, L. Chechin and R. Myrzakulov, Dark energy in some integrable and nonintegrable FRW cosmological models, Int. J. Mod. Phys. D 20, 2419 (2011)
  * (31) A. Ronveaux, Heun’s differential equations, Oxford Science Publications, The Clarendon Press, Oxford University Press, New York (1995)
  * (32) S. Lafortune, B. Grammaticos and A. Ramani, Constructing integrable third-order systems: the Gambier approach, Inverse Probl. 14, 287 (1998); S. Lafortune, B. Grammaticos and A. Ramani, Linearisable systems and the Gambier approach. SIDE III—symmetries and integrability of difference equations, CRM Proc. Lecture Notes 25, Amer. Math. Soc., Providence, RI, 255 (2000).
  * (33) R. Conte, C. Rogers and W.K. Schief, Painlevé structure of a multi-ion electrodiffusion system, J. Phys. A: Math. & Theor. 40 (2007) F1031–F1040.
  * (34) Gromak V.I., “Bäcklund transformations of the higher-order Painlevé equations”, in: Bäcklund and Darboux transformations. The geometry of solitons, CRM Proc. Lecture Notes 29, 3–28, Amer. Math. Soc., Providence, RI, 2001.
  * (35) A. J. L$\acute{\mbox{o}}$pez-Revelles and E. Elizalde, Universal procedure to cure future singularities of dark energy models, Gen. Relativ. Gravit. 44,751 (2012).
  * (36) S. Nojiri and S. D. Odintsov, Is the future universe singular: Dark Matter versus modified gravity?, Phys. Lett. B 686, 44 (2010).
  * (37) S. Nojiri and S. D. Odintsov, Inhomogeneous Equation of State of the Universe: Phantom Era, Future Singularity and Crossing the Phantom Barrier, Phys. Rev. D 72, 023003 (2005).