Skip to main content

Tau Toolbox

PyPI version Python Versions License: LGPL v3

Tau Toolbox is a high-performance Python library for solving complex linear and non-linear integro-differential equations using Lanczos' Tau method. Designed for precision and ease of use, it transforms tough differential, integral, and fractional boundary value problems into fast, accurate algebraic systems—delivering spectral-level precision with minimal computational overhead.

Tau Toolbox is free software released under the GNU Lesser General Public License version 3 (LGPLv3). A copy of the License is enclosed in the project.

The project site documents the Matlab/Octave version of the package.

The Python documentation is based on the code and documentation content of the project.


✨ Key Features

  • Expressive Symbolic-Like Syntax: Define differential equations and boundary conditions directly as Python functions using intuitive operators.
  • Spectral Precision: Achieve exponential convergence rates for smooth functions with automatic residual tracking.
  • Flexible Bases: Native support for standard orthogonal bases including Jacobi, Gegenbauer, Legendre, and Chebyshev (the four kinds) polynomials.
  • Comprehensive Operator Support: Seamlessly handle differential, integral, fractional, and boundary value conditions using matrix operator representations. This applies both for single equations and systems of equations.
  • Built-in Visualization: Evaluate and plot solution approximations and error residuals out of the box.

📦 Installation

Install the latest release via PyPI:

pip install tautoolbox

Or install the development version directly from Bitbucket:

git clone [https://bitbucket.org/tautoolbox/taupy.git](https://bitbucket.org/tautoolbox/taupy.git)
cd taupy
pip install -e .

🚀 Quick Start

Solving a boundary value problem in Tau Toolbox is completely expressive.

Here is how to solve $y''(x) + y(x) = 0$ on $[0, 2\pi]$ subject to $y(0) = 1$ and $y'(2\pi) = 0$:

from tautoolbox import tau
from tautoolbox.functions import diff, linspace

import numpy as np
from numpy import pi as π
import matplotlib.pyplot as plt

# 1. Define the problem, domain, and conditions
problem = tau.problem(
    lambda x, y: diff(y, 2) + y,            # Differential equation
    [0, 2 * π],                             # Problem domain
    lambda y: [y(0) - 1, y.diff(1, 2 * π)]  # Boundary conditions: y(0)=1, y'(2π)=0
)

# 2. Solve the problem
yn, info = tau.solve(problem)

# 3. Evaluate and plot the solution
x = linspace(yn)
plt.plot(x, yn(x))
plt.title("Tau Method Solution")
plt.xlabel("x")
plt.ylabel("y(x)")
plt.show()


# 4. Plot the error in the solution
plt.plot(x, np.abs(np.cos(x) - yn(x)))
plt.title("Absolute error in the approximated solution")
plt.xlabel("x")
plt.ylabel("$|y(x)-y_n(x)|$")
plt.show()

# 5. Plot the residual error directly
info.residual.plot()
plt.title("Solution Residual")
plt.show()

🏛️ Orthogonal Polynomial Bases

Tau Toolbox supports various standard orthogonal polynomial families and allows flexible basis switching.

The solution are expressed as a Polynomial that is associated with one the previous bases.


📚 Documentation & Examples

Full documentation, tutorial notebooks, and API references are available at (for the moment only in the source - work is in progress to make it available autonomously).

Check out the examples/ directory for scripts on:

  • Solving fractional differential equations.
  • Non-linear boundary value problems via Newton-Tau iterations.
  • Systems of coupled integro-differential equations.

🤝 Contributing

Contributions are welcome!


📄 License

Tau Toolbox is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPLv3) as published by the Free Software Foundation. See the LICENSE file for full details.


Notice that we refer sometimes to taupy, this is not to be confused with the taupy package. This reference, that we have used internally since 2021, refers to the Python implementation of the Matlab/Octave Tautoolbox. There are some small differences between both implementations but the general structure is the same, and as long as possible, the syntax is also the same adapted to the syntax of each language.


AUTHORS:

Paulo B. Vasconcelos
Centro de Matemática - Universidade do Porto
Email: pjv@fep.up.pt

José M. A. Matos
Centro de Matemática - Universidade do Porto
Email: jma@isep.ipp.pt

José A. O. Matos
Centro de Matemática - Universidade do Porto
Email: jamatos@fep.up.pt

Nilson Lima

Marcelo Trindade

REFERENCE:

Solving differential eigenproblems via the spectral Tau method
NUMERICAL ALGORITHMS
DOI: https://doi.org/10.1007/s11075-022-01366-z

Metadata

Release files for tautoolbox 0.96.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tautoolbox 0.96.0
File Size Uploaded Provenance Actions
tautoolbox-0.96.0.tar.gz 157.3 kB Without provenance Details for tautoolbox-0.96.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tautoolbox 0.96.0
File Interpreter ABI Platform Actions
tautoolbox-0.96.0-py3-none-any.whl Python 3 none any Details for tautoolbox-0.96.0-py3-none-any.whl

Total release size: 320.2 kB

Release files / tautoolbox-0.96.0.tar.gz

Download URL tautoolbox-0.96.0.tar.gz
Size 157.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b11aac4d1edeb6a328919bc86d05acd782f450f15739a10183c0b99c3cdba3d2
BLAKE2b-256 checksum
How to use checksums
95ad3fc039db5d94f32a754ad903fab30af1bef63809c24c9df11b766071e829
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0rc1

Release files / tautoolbox-0.96.0-py3-none-any.whl

Download URL tautoolbox-0.96.0-py3-none-any.whl
Size 162.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1278125a57b9cb1a9c9355baf114343e9c064acc9b51ff250923d483e4b2deda
BLAKE2b-256 checksum
How to use checksums
2d8f24ba8e58fe8479707848b9cfcd68fc8ddfd1bb5a147ebeb811bdcd9cee5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0rc1

Security for tautoolbox 0.96.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page