simsym 0.1.0

A simple symbolic computation library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use simsym::prelude::*;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let x = symbol("x");
    let f = sin(x.pow(2)); // no elementary antiderivative
    let a = 0.0;
    let b = 1.0;
    match f.clone().integrate(x) {
        Ok(fx) => println!("symbolic: {fx}"),
        Err(e) => println!("symbolic integrate failed: {e}"),
    }
    let num = integrate_numeric(&f, x, a, b, &[], NumericOptions::default())?;
    println!("∫_0^1 sin(x^2) dx ≈ {num}");
    Ok(())
}