1
$\begingroup$

How do I plot a sampling of gradient vectors for fby using the vectorplot command? I’m confused how to use both these commands. enter image description here

$\endgroup$
2
$\begingroup$
f[x_, y_] := (4 x^2 + y^2) Exp[-x^2 - y^2]
VectorPlot[Evaluate@Grad[f[x, y], {x, y}], {x, -2, 2}, {y, -2, 2}]
Show[ContourPlot[f[x, y], {x, -2, 2}, {y, -2, 2}], %]

enter image description here

$\endgroup$
  • $\begingroup$ How would you find the exact critical points? $\endgroup$ – calculusbuff39 Oct 18 '18 at 3:09
  • $\begingroup$ @calculusbuff39 Try FindRoot with initial guess read of from the plots. $\endgroup$ – Henrik Schumacher Oct 18 '18 at 6:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.