Applies a bounded set of exact transformations to one equation in one variable. Polynomial equations through degree four use closed-form formulas. Other recognized forms are solved by isolating and inverting elementary functions, exponentials, logarithmic sums, or a single square-root term. Unsupported input is reported by solve as

`unsolved`

so a caller can select a different strategy.

remarks

This class is the symbolic strategy used by the ordinary solver; it is not a general proof procedure. Inverse-function results follow the symbolic forms implemented here, including parameterized families for direct trigonometric functions. The supplied Expression is retained, while Polynomial input is converted to its Expression representation.

Members

cubic(coeffs: Expression[]): Expression[]Method

Solves

`coeffs[3]x^3 + coeffs[2]x^2 + coeffs[1]x + coeffs[0] = 0`

with Cardano's formula.

Parameters

NameTypeDescription
coeffsExpression[]Four coefficients in ascending-power order.

Returns

Expression[] — Three symbolic root expressions.

inputContainsFunction(): booleanMethod

Returns whether any node in the configured input is a function call.

Returns

boolean

quadratic(coeffs: Expression[]): Expression[]Method

Solves

`coeffs[2]x^2 + coeffs[1]x + coeffs[0] = 0`

symbolically.

Parameters

NameTypeDescription
coeffsExpression[]Three coefficients in ascending-power order.

Returns

Expression[] — The two quadratic-formula roots.

quartic(coeffs: Expression[]): Expression[]Method

Solves a quartic from five ascending-power coefficients with Ferrari's method.

Parameters

NameTypeDescription
coeffsExpression[]Coefficients from the constant through fourth-degree term.

Returns

Expression[] — Four symbolic root expressions.

solve(): { … }Method

Attempts polynomial formulas and then supported function transformations.

Returns

{ … } — An object containing `solutions` and, when the strategy cannot solve the equation, the original `unsolved` expression.