Finds real solutions to systems of equations using numerical methods. For certain systems involving sine and cosine, the equations show that exactly one real solution exists. The solver first tries a starting point derived from those equations. Otherwise, or if that attempt fails, it tries several starting points and collects the distinct solutions it finds.

Details

A numerical search may miss solutions. An empty result does not prove there are none. Searching from a grid becomes more expensive as the number of variables increases, and starts that fail to converge are ignored. The solver is intended for systems with as many equations as variables. Calculations use the current decimal.js precision. The supplied equation and variable arrays are retained rather than copied.

Members

roots(): Map<string, Expression>[]Method

Finds distinct real solutions using either an inferred start or the grid.

Returns

Map<string, Expression>[] — One variable-to-value map per solution. An empty result means no root was found, not that the system has no real roots.