The LinApart routine can be used for efficiently performing the univariate partial fraction decomposition of large symbolic expressions, when the denominators are fully factorized. The routine is described in the following paper: arXiv:2405.20130.
Wolfram Mathematica and C language implementations of the routine are provided. The latter includes both a standalone version and a library suitable for linking with other software (e.g. FORM).
Example files for the Mathematica routine are also provided.
If you find this routine useful in your research please consider citing the article.
- Clone the repository:
git clone https://github.com/your-username/LinApart.git
- Navigate to the project directory:
cd LinApart
-
Copy the
LinApart.m
file from theLinApart/Mathematica
directory to your Mathematica package directory. -
The routine can be loaded with:
Needs["LinApart`"]
- C compiler (e.g., GCC)
- GNU Make
- GMP library
- Navigate to the C directory:
cd LinApart/C
- Compile the library and standalone executable:
make
The command LinApart[expr, var] returns the partial fraction decomposition of expr with respect to the variable var. The head of var must be Symbol.
For more detailed usage instructions and examples, refer to the paper and the LinApart/Examples
directory.
The standalone executable performs the partial fraction decomposition of the function
-
Run the standalone executable from the command line:
./LinApart <exponents> <roots>
- <exponents>: Comma-separated list of
$(n+1)$ exponents$l,m_1,\ldots, m_n$ (e.g., "1,2,3,4") - <roots>: Comma-separated list of
$n$ roots$a_1,\ldots,a_n$ (e.g., "a,b,c")
Example: to perform the partial fraction decomposition of
$\frac{x^3}{(x-a1)^5(x-a2)^7(x-a3)^{11}}$ , use./LinApart "3,5,7,11" "a1,a2,a3"
- <exponents>: Comma-separated list of
Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request on the GitHub repository.
This project is licensed under the MIT License.