# Unconstrained optimization problem?

**URL:** <https://discourse.julialang.org/t/unconstrained-optimization-problem/84140>\
**Category:** Optimization (Mathematical)\
**Created:** [July 13, 2022, 1:14am UTC](https://discourse.julialang.org/t/unconstrained-optimization-problem/84140 "2022-07-13T01:14:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivzktch99](https://avatars.discourse-cdn.com/v4/letter/i/b19c9b/32.png) [@ivzktch99](https://discourse.julialang.org/u/ivzktch99)\
**Post date:** [July 13, 2022, 1:14am UTC](https://discourse.julialang.org/t/unconstrained-optimization-problem/84140/1 "2022-07-13T01:14:51Z")

</div>

I have a control problem that requires (in addition to other linear constraints) finding optimal coefficients M (n \times n matrix) and a nth dimensional vector b such that

\det(I + xub^T - xM) \geq 0

for all x \in \mathbb{R}, where u = [1,1,\dots,1]^T

Is there any solver in Jump that accepts this sort of problems and solve it numerically? fmincon in MATLAB was able to accept it but the performance is poor. Plus, I couldn’t impose it for all x \in \mathbb{R} which I am not sure is or is not possible with any other solver. Any idea or suggestion?

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [July 13, 2022, 4:39am UTC](https://discourse.julialang.org/t/unconstrained-optimization-problem/84140/2 "2022-07-13T04:39:28Z")

</div>

Imposing a constraint for all x \in \mathbb{R} is not possible with a standard mathematical programming solver. Perhaps there is a linear algebra trick that would let you reformulate the constraint?

---

<div class="post-metadata">

**Author:** ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Post date:** [July 13, 2022, 5:17am UTC](https://discourse.julialang.org/t/unconstrained-optimization-problem/84140/3 "2022-07-13T05:17:51Z")

</div>

What do you mean by “optimal” in your question? As you present the problem, I’d just pick any b and M such that ub’=M and call it a day.

---

<div class="post-metadata">

**Author:** ![ivzktch99](https://avatars.discourse-cdn.com/v4/letter/i/b19c9b/32.png) [@ivzktch99](https://discourse.julialang.org/u/ivzktch99)\
**Post date:** [July 13, 2022, 5:29am UTC](https://discourse.julialang.org/t/unconstrained-optimization-problem/84140/4 "2022-07-13T05:29:20Z")

</div>

yes but as I said in the post this is not the only constraint. There are other 50 linear constraints in terms of M and b.

I guess the problem that I am facing is what solver accept det in a constraint. Is there any way to optimize over an interval with fine grid like x = [-1000:0.0001:1000]. How to add that in JuMP?

---

<div class="post-metadata">

**Author:** ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Post date:** [July 13, 2022, 5:43am UTC](https://discourse.julialang.org/t/unconstrained-optimization-problem/84140/5 "2022-07-13T05:43:49Z")

</div>

Got it. Sorry I missed that. Let’s see if I understand you correctly now:

Let me call y the variables you have to optimise (b and M). Your problem is of the form

min\_y f(y)  
s.t. h\_i(y) = 0  
s.t. min\_x g(x,y) \ge 0

(How do you do Latex here? - edited with Latex, now)

Interesting question. It turns out the general problem is of interest for my own work. So the dual problem will have a Lagrange multiplier _function_ of x. I’ll have to think.

I am not knowledgeable about JuMP so I can’t help there.

---

<div class="post-metadata">

**Author:** ![ivzktch99](https://avatars.discourse-cdn.com/v4/letter/i/b19c9b/32.png) [@ivzktch99](https://discourse.julialang.org/u/ivzktch99)\
**Post date:** [July 13, 2022, 6:43am UTC](https://discourse.julialang.org/t/unconstrained-optimization-problem/84140/6 "2022-07-13T06:43:11Z")

</div>

Yes thank you. I should’ve been clearer in my post. You could latex by writing inside two dollar signs $like this$
