# Package in julia for solving optimization problems with cubic objective function

**URL:** <https://discourse.julialang.org/t/package-in-julia-for-solving-optimization-problems-with-cubic-objective-function/113055>\
**Category:** Optimization (Mathematical)\
**Created:** [April 17, 2024, 9:47am UTC](https://discourse.julialang.org/t/package-in-julia-for-solving-optimization-problems-with-cubic-objective-function/113055 "2024-04-17T09:47:46Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)\
**Post date:** [April 18, 2024, 12:46am UTC](https://discourse.julialang.org/t/package-in-julia-for-solving-optimization-problems-with-cubic-objective-function/113055/15 "2024-04-18T00:46:09Z")

</div>

Just to weigh in here, if you have access to Gurobi as a solver, then you can solve problems to global optimality provided they are [quadratic constraints](https://www.gurobi.com/documentation/11.0/refman/quadratic_constraints.html) with the [NonConvex](https://www.gurobi.com/documentation/11.0/refman/nonconvex.html) settings. In JuMP, this would be set as

> [@Calling Mathematica into Julia to symbolically solve a system of non-linear equations](https://discourse.julialang.org/t/calling-mathematica-into-julia-to-symbolically-solve-a-system-of-non-linear-equations/80518/4):
>
> ```julia
> model = JuMP.Model(Gurobi.Optimizer)
> JuMP.set_optimizer_attribute(model, "NonConvex", 2)
> 
> ```

Of course, the issue is having cubic / trilinear terms. A reformulation to quadratic / bilinear form is possible, such as rewriting z = x\_1 x\_2 x\_3 as y = x\_1 x\_2 and z = y x\_3.

---

_[View the full topic](https://discourse.julialang.org/t/package-in-julia-for-solving-optimization-problems-with-cubic-objective-function/113055)._
