In[]:=
The root is returned in the form of a substitution rule. We can define rx and ry to be the x and y coordinates of the root, and then we plug into the given functions as a check (% refers to the preceding output).In[]:=
In[]:=
Good. We now have the five curves as lists in contourData. Let us now focus on the central curve, given by contourData[[5]]. We apply g and look at the signs of the result.In[]:=
Multiplying this vector by a shift of it causes the sign-changes to show up as -1s. There are six of them.In[]:=
We now find the places in the plane where these sign-changes occurred.In[]:=
This gives us six approximations. We define a function, root, that feeds a single seed to the rootfinder; mapping this function to the set of seeds produces six fairly exact roots.In[]:=
The following figure, which shows the contours together with circles around the data we just found, shows that the approach has worked beautifully and we have found all six solutions on the central contour.In[]:=
As mentioned, Equilibria implements this in general. It finds all 16 equilibria points for our example in short order.In[]:=
There are some options to Equilibria. Setting SeedsOnly to True causes just the seeds to be returned. The EquilibriaPlotPoints option controls the number of plot points in the contour plots that get the algorithm started; for difficult examples this might have to be increased from the default of 49. And there is a ShowEigenvalues option that produces a table of the equilibrium points together with the eigenvalues of the Jacobian at the points.