# How do I use FindMinimum with the LevenbergMarquardt method?

Below is my program. I don't know how to define the function f to make it work.

Another question:

When I define f as a vector of the form {x, x*y} and use

FindMinimum[Norm[f], {{x, 1}, {y, 1}}, Method -> "LevenbergMarquardt"]


it works. But is FindMinimum handling both problems the same way? I mean the norm and the sum? I ask because the solution that I get with Norm[f] is {x -> 3.95915*10^-9, y -> 1.}, which is not the local minimum obviously.

f[x_, y_] := {x, x*y}
FindMinimum[
Sum[f[x, y][[i]]^2, {i, 1, 2}], {{x, 1}, {y, 1}},
Method -> "LevenbergMarquardt"]


FindMinimum::notlm: The objective function for the method LevenbergMarquardt must be in a least-squares form: Sum[f[i][x]^2, {i, 1, n}] or Sum[w[i] f[i][x]^2, {i, 1, n}] with positive w[i].

• Try Minimize[Norm[f[x, y]], {x, y}]? – MarcoB Jul 3 '18 at 19:51
• @MarcoB I want to use the method "LevenbergMarquardt", and with this method, mathematica wants the function to minimize to be a sum of squares – Salma Jul 3 '18 at 22:58

FindMinimum[x^2 + x^2 y^2, {{x, 1}, {y, 1}},