A Python implementation replicating the power series differential equation solving functionality of FriCAS's seriesSolve function, built on top of SymPy.
This project provides tools for solving ordinary differential equations using power series methods, similar to the capabilities found in the FriCAS computer algebra system. The implementation focuses on finding series solutions around specified points with given initial conditions.
- Solve first and higher-order ordinary differential equations
- Power series expansion around arbitrary points
- Support for initial value problems
- Integration with SymPy's symbolic computation capabilities
- Educational examples demonstrating various ODE types
- Python 3.7+
- SymPy
git clone https://github.com/Foadsf/fricas-seriessolve
cd fricas_seriessolve
pip install sympyfrom seriessolve import solve_ode_series
import sympy as sp
x = sp.symbols('x')
y = sp.Function('y')
# Solve dy/dx + y = 0 with y(0) = 1
equation = sp.Eq(sp.diff(y(x), x) + y(x), 0)
solution = solve_ode_series(equation, y(x), x, 0, [1], precision=10)
print(solution)python examples/000_basic_ode.pyfricas_seriessolve/
├── seriessolve.py # Main library implementation
├── examples/ # Example scripts
│ └── 000_basic_ode.py # Basic ODE examples
├── README.md # This file
├── lessons_learned.md # Development notes and lessons
└── .gitignore # Git ignore patterns
- Exponential Decay: First-order linear ODE
- Harmonic Oscillator: Second-order ODE with cosine solution
- Sine Solution: Harmonic oscillator with different initial conditions
- Airy's Equation: Advanced example showing current limitations
- Airy's equation and similar cases require enhancement of the undetermined coefficients method
- Complex differential equations may not always reduce to simple polynomial series
- Limited to ODEs that SymPy can handle or simple recurrence relations
This project is educational and focuses on replicating FriCAS functionality. Contributions should maintain compatibility with the original FriCAS seriesSolve behavior.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
- FriCAS computer algebra system for the original
seriesSolveimplementation - SymPy project for providing the symbolic computation foundation