Mathematica Asked on May 17, 2021
This code produces the image below (a set of points that I am then using as a pattern for FindRoot
):
IIges[x_, y_] := Sin[x]^2 + Sin[y]^2;
xm = 4;
{dx[x_, y_], dy[x_, y_]} = D[IIges[x, y], {{x, y}}];
ContourPlot[dx[x, y] == 0, {x, -xm, xm}, {y, -xm, xm},
ContourStyle -> None, Mesh -> {{0}},
MeshFunctions -> Function[{x, y, z}, dy[x, y]]]
The same code produces nothing ! Why??
Try this:
IIges[x_, y_] := Sin[x]^2 + Sin[y]^2;
xm = 4; {dx[x_, y_], dy[x_, y_]} = D[IIges[x, y], {{x, y}}];
ContourPlot[{dx[x, y], dy[x, y]} == 0, {x, -xm, xm}, {y, -xm, xm},
ContourStyle -> None, Mesh -> {{0.}}, MeshFunctions -> {dx[#, #] &, dy[#, #]
&}, MeshStyle -> Directive[PointSize[0.009], GrayLevel[0.5]],
LabelStyle -> Directive[Black, Small]]
Another way:
IIges[x_, y_] := Sin[x]^2 + Sin[y]^2;
xm = 4; {dx[x_, y_], dy[x_, y_]} = D[IIges[x, y], {{x, y}}];
ContourPlot[{dx[x, y], dy[x, y]} == 0, {x, -xm, xm}, {y, -xm, xm},
ContourStyle -> None, Mesh -> {{0}}, MeshFunctions -> {#1 &, #2 &, dy[#1, #2] &},
MeshStyle -> Directive[PointSize[0.009], GrayLevel[0.5]],
LabelStyle -> Directive[Black, Small]]
In the next page MeshFunctions. Also try changing MeshFunctions -> {#1 &, #2 &, dy[#1, #2] &}
to MeshFunctions -> {x, y, z, dy[x, y]}
and see the warning message it sends you.
Correct answer by E. Chan-López on May 17, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP