# Minimize with Interval restriction [closed]

If for instance I have a problem of this sort:

\[ScriptCapitalR]1 = Interval[{0, 1}];
gigi[a_, b_, c_, d_, e_, f_] := With[{go = 2},
dfe=a + b^2 + b + d^2 + e + f^2;
a + dfe+go
]

FindMinimum[{gigi[a, b, c, d, e, f], a \[Element] \[ScriptCapitalR]1},
{a, b, c, d, e, f},
StepMonitor :> Print["Step to x = ", a]
]


Why doesn't it accept that "a" must belong to the region defined as an interval?

• A few things are unclear to me in your code: 1) is dfe supposed to be the product of d,f and e? Or is it a single variable, in which case is it defined elsewhere in your code? FindMinimum is a numerical function, so it can't deal with symbols with undefined value. 2) What is go supposed to do in your definition of gigi? Perhaps you could clean up your code to show only what is relevant to your current problem, I.e. a minimal working example. – MarcoB May 7 '16 at 14:40
• Ok, I'll clean it up quick. – Mirko Aveta May 7 '16 at 14:51
• Anyhow this is just an example. I had to write it down as I can't post my real problem because it is uselessly too complicated. – Mirko Aveta May 7 '16 at 14:59
• Mirko, I think the long and short of it is that FindMinimum only appears to work with constraints expressed as equations or inequalities (KKT conditions); for instance, in your simplified case 0 <= a <= 1 works fine. – MarcoB May 7 '16 at 22:37
• Does NMinimize work only with Karush Kun Tacker conditions too? – Mirko Aveta May 8 '16 at 8:40