Mathematica Asked on July 4, 2021
I’ve been working on some simple scripts to find critical points. I’ve been using this one.
Where the red script is the particular function I’m interested in.
But I am struggling to find a way to calculate the critical points when the domain and/or range is limited.
For example, I’m interested in finding the critical points of f(x,y) = sin(x)sin(y) ,f[x_,y_]=Sin[x] Sin[y]
, where -pi =< x =< pi
, and -pi =< y =< pi
. Here’s the code I use, and, absent the limits on x and y, it gives a wild unusable answer. But I get errors when I try to mess around with limiting x and y to their respective range and domain. Here’s the basic function, sans limits on x and y.
ResourceFunction["StationaryPoints"][Sin[x] Sin [y], {x, y}]
Any thoughts?
ResourceFunction[
"StationaryPoints"][{Sin[x]*
Sin[y], -π <= x <= π && -π <= y <= π}, {x, y}]
<|"Saddle" -> {{0, {x -> 0, y -> 0}}, {0, {x -> 0, y -> -π}}, {0, {x -> 0, y -> π}}, {0, {x -> -π, y -> 0}}, {0, {x -> -π, y -> -π}}, {0, {x -> -π, y -> π}}, {0, {x -> π, y -> 0}}, {0, {x -> π, y -> -π}}, {0, {x -> π, y -> π}}}, "Maxima" -> {{1, {x -> -(π/2), y -> -(π/2)}}, {1, {x -> π/2, y -> π/2}}}, "Minima" -> {{-1, {x -> -(π/2), y -> π/2}}, {-1, {x -> π/2, y -> -(π/2)}}}|>
Answered by cvgmt on July 4, 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