2
$\begingroup$

As suggested here, a system of equations can be seen as constraints in a minimization procedure with a zero cost function.

For instance:

f[x_, y_] := {x + 3 y^3, Sin[x^2 - y + 1]}
FindRoot[f[x, y], {{x, -1}, {y, -1}}]
(* {x -> -1.72425, y -> 0.831431} *)

FindMinimum[{0, Thread[f[x, y] == 0]}, {x, y}]
(* {0., {x -> -1.72425, y -> 0.831431}} *)

Questions

  1. How does FindMinimum work in that case?
  2. Are there cases where this approach would be more efficient that FindRoot?
$\endgroup$
1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.