Basic Examples (2)
Numerically solve a univariate polynomial equation in x:
Numerically solve a multivariate system of polynomial equations:
Scope (7)
Create a real-valued polynomial objective function f in three variables x, y, z using random coefficient parameters:
Find stationary points of the objective f:
Select the real valued ones:
Function values at these critical points:
Sorted critical points according to the function value:
Two of these (namely, #1 and #3) are local minima with all positive eigenvalues of the local Hessian, while the rest are saddle points:
Local minima and saddle points can be also discerned via the following ContourPlot3D visualization:
Options (3)
Default execution may not find all isolated roots:
All the roots may be obtained by increasing or decreasing "Radius" parameter:
"MaxRoots" can be used to compute a subset of the total roots for unwieldy polynomial systems:
Generate a random large polynomial system of dimension 5 and total degree 100,000:
Compute 50 roots:
In some cases transcendental functions can be minimized using "MaxRoots" termination criterion:
Visualize the real valued stationary points:
Properties and Relations (5)
NSolveByMonodromy can find many or all of the isolated roots with or without an initial point, e.g., a bifurcation problem:
FindRoot attempts to find one root at a time based on an initial point:
NSolveByMonodromy compares favorably against NSolve in some large systems, e.g., 6R inverse position kinematics:
NSolve default execution is 4 times slower and returns duplicate instances requiring an additional filtration step to remove them:
NSolve execution in high-precision takes even longer than the default execution:
Another example, a reduced 8-dimensional system arising in economics:
NSolve default execution misses two isolated roots and returns some duplicate instances instead:
NSolve in high-precision returns the correct set of roots in a comparable time with NSolveByMonodromy:
NSolveByMonodromy does not accept a search range as input, unlike NSolve:
Select the real valued ones:
NSolve solves this system if a search range is provided:
NSolveByMonodromy can only solve square systems:
NSolve computes some witness points for such under-determined systems:
Possible Issues (2)
NSolveByMonodromy cannot solve non-analytic systems:
NSolve solves this system using inverse functions:
NSolveByMonodromy may fail to proceed beyond initial point in systems with special monomial structures and/or parameters:
NSolve finds the approximation of all the 20 roots for the Wilkinson's polynomial:
Neat Examples (6)
Static equilibria of a weight suspended by two massless cables, each of different given lengths, in a plane:
This 10-dimensional system admits 12 nonsingular isolated roots in a generic case, as found by NSolveByMonodromy:
NSolve default execution takes a long time:
The presence of singular and positive-dimensional sets impacts the results of NSolve:
Select the real valued ones in x, y:
Visualize the real equilibria, in which Configuration 1 is the only stable one with both cables under tension: