This repository implements an algorithm presented by Moulay Barkatou (link) to solve a homogeneous linear differential system around either an analytic point or a regular singularity.
The program uses ginac as its frontend, while exploits either flint or ginac as its backend. One must have libraries flint and ginac installed on the computer.
Run make to build the program. Please check example.cpp and symexample.cpp to see example usage.
A homogeneous linear differential system can be written as
It is proved that an analytic point of the equation must be an analytic point of the solution. Therefore, around an analytic point
If
However, determining
When one tries to use the recurrence relation to determine
If the coefficient matrix
From the introduction, one already sees that computing Jordan decomposition is a necessary step when trying to solve an equation around its regular singularities. However, Jordan decomposition is known to be numerically unstable. Therefore, our program prefers performing Jordan decompositions symbolically.
Actually, we provide two implementations of the solver. The main difference between the two implementations is in how they do Jordan decompositions. One version uses library functions provided by flint to do Jordan decomposition. Those library functions are faster, and are guaranteed to give accurate symbolic results when the leading coefficient matrix
Another implementation is purely based on ginac to do Jordan decomposition. This has the advantage of always producing accurate symbolic results, and being able to generalize to cases in which the differential equation relies on an additional parameter. However, since it is generally impossible to solve polynomial equations symbolically, this implementation does not guarantee to return a result successfully. Specifically speaking, it will fail and throw an error when at least one eigenvalue of flint version.