Skip to main content

solve

Function solve 

Source
pub fn solve(expr: &Expr, var: &str) -> Vec<Expr>
👎Deprecated since 0.1.19:

This module is deprecated and please use numrical/solve instead.

Expand description

Main entry point for solving equations.

This function attempts to solve a single equation for a given variable. It first tries to solve it as a polynomial equation (up to quartic degree). If that fails, it falls back to a numerical method for transcendental equations.

§Arguments

  • expr - The equation to solve (e.g., Expr::Eq(lhs, rhs) or lhs - rhs).
  • var - The variable to solve for.

§Returns

A Vec<Expr> containing the symbolic or numerical solutions.