Answer by J. M.'s eventual burnout for Finding all maxima and minima of a...
Here is my modest contribution. The idea is to use the MeshFunctions option of ContourPlot[] (as previously shown here) to extract the critical points for polishing with FindRoot[]. The Hessian is then...
View ArticleAnswer by ubpdqn for Finding all maxima and minima of a function
Not ideal but just for fun. fun[a_, b_] := {x, y} /. FindRoot[D[terrain[x, y], {{x, y}}] == {0, 0}, {{x, a}, {y, b}}]h[a_, b_] := D[terrain[x, y], {{x, y}, 2}] /. {x -> a, y -> b};pts =...
View ArticleAnswer by Apple for Finding all maxima and minima of a function
Clear["Global`*"]n = 2.;terrain[x_, y_] := 2 (2 - x)^2 Exp[-(x^2) - (y + 1)^2] - 15 (x/5 - x^3 - y^3) Exp[-x^2 - y^2] - 1/3 Exp[-(x + 1)^2 - y^2];sol[x0_, y0_] := {x, y} /. FindRoot[...
View ArticleFinding all maxima and minima of a function
To find all (global and local) extrema of a function in $\mathbb R^3$, I have written the following.Example function:n = 2.;terrain[x_, y_] := 2 (2 - x)^2 Exp[-(x^2) - (y + 1)^2] - 15 (x/5 - x^3 - y^3)...
View Article
More Pages to Explore .....