The discovery of first integrals is of profound scientific significance for understanding physical conservation laws in dynamical systems. However, existing symbolic computation systems and Large Language Models (LLMs) struggle with this task due to the scarcity of high-quality training data and the reliance on mathematical intuition for finding solutions. This paper introduces FISolver, an LLM-based solver designed to bridge this gap. First, we propose a novel "Backward Generation" algorithm that systematically constructs large-scale datasets of (differential equations, first integrals) pairs by deriving equations from sampled integrals, effectively overcoming the data scarcity bottleneck. Second, we perform supervised fine-tuning on a compact mathematical model and further enhance its capabilities using reinforcement learning with a Levenshtein Distance-based shaped reward function. Additionally, we introduce data synthesis and blending techniques that enable effective adaptation to specific hard instances with sparse examples. Experiments demonstrate that FISolver, with significantly lower computational cost, substantially outperforms larger mathematical LLMs and commercial solvers like Mathematica on complex benchmarks, establishing a new data-driven paradigm for automated mathematical discovery.
翻译:暂无翻译