Migrating from Symbolica 2.0 to 2.2
Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.
This guide covers the main user-facing changes between Symbolica 2.0 and Symbolica 2.2.
Changed to exp and sqrt
The exp and sqrt functions are now immediately rewritten to power expressions. This means that exp(x) is now equivalent to e^x and sqrt(x) is equivalent to x^(1/2). This change allows for more efficient simplification and evaluation of expressions involving exponentials and square roots.
However, this means that pattern matching based on exp and sqrt will no longer work as expected: the pattern sqrt(x)^n_ will not match to sqrt(x)^3 as the pattern is normalized to x^(1/2)^n_, whereas sqrt(x)^3 is rewritten as x^(3/2). To avoid this, write patterns in the powered form, e.g., x^(n_) with conditions.
Notable changes
- Symbolic integration with step-by-step derivation (see here)
- Optional wildcards and pattern alternatives (see here)
- Option to factor over the complex numbers
- Algebraic dependency extraction when converting to polynomials (improves functions such as
togetherwithexpand roots) - Add specification of a minimum probability density to continuous grids
- Term iterator for Python API
- Improved n-th root rendering for LaTeX and Typst
- Performance improvements for pattern matching