This entry is now part of the unified function reference. Open the unified page →
nerdamer.solve
nerdamer.solve(input: ExpressionInput | Equation, variable?: ExpressionInput, _options?: FunctionSolverOptions): SolutionSetSolves an equation or finds the zeros of an expression in one variable. The solver normalizes the input to
`expression = 0`, tries direct symbolic transformations, factors numerator and denominator, and then applies symbolic, polynomial-numeric, and bounded function-numeric strategies to the factors. Zeros of denominator factors are excluded from the result.
Numerical fallback is heuristic and bounded, so an empty result does not in general prove that no solution exists. Strategy and input errors are absorbed by this convenience entry point and produce the solutions collected before the failure. Decimal input marks returned solutions for decimal formatting. The
`options`parameter is currently reserved and is not forwarded to the numerical strategies.
Parameters
| Name | Type | Description |
|---|---|---|
input | ExpressionInput | Equation | Expression or equation to solve. |
variable | ExpressionInput | Variable to solve for. When omitted, input preparation infers it where possible. |
_options | FunctionSolverOptions | Reserved numerical-solver options. |
Returns
SolutionSet — A SolutionSet. The special `all` expression represents an identity that is true for every value of the variable.
Examples
const roots = solve('x^2-1', 'x');