# Alpine+JuMP gives error for quadratic functions

**URL:** <https://discourse.julialang.org/t/alpine-jump-gives-error-for-quadratic-functions/70321>\
**Category:** Optimization (Mathematical)\
**Created:** [October 25, 2021, 9:13am UTC](https://discourse.julialang.org/t/alpine-jump-gives-error-for-quadratic-functions/70321 "2021-10-25T09:13:02Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![harsha.nagarajan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/harsha.nagarajan/32/29776_2.png) [@harsha.nagarajan](https://discourse.julialang.org/u/harsha.nagarajan)\
**Post date:** [September 7, 2022, 5:54pm UTC](https://discourse.julialang.org/t/alpine-jump-gives-error-for-quadratic-functions/70321/5 "2022-09-07T17:54:54Z")

</div>

@mzagorowska Interestingly, I just looked at this issue. This isn’t an issue/bug in Alpine. Since you have created a quadratic monomial in `x[1]*x[1]`, this automatically gets reformulated as `x[1]^2` within Alpine. Once this is a quadratic function, you can use Gurobi as the underlying `mip_solver` and it runs without any issue. Although not the best, if you still prefer to use an open-source `mip_solver`, note that Cbc/HiGHS solver does not support quadratic functions. Instead, you will need to use [Pavito.jl](https://github.com/jump-dev/Pavito.jl) solver and then use Cbc/HiGHS and Ipopt as the underlying `mip_solver` and `cont_solver`, respectively. Similar to the way it is invoked here: [Alpine.jl/runtests.jl at 22c44020fe3c56c4e11bafaebf9c86b313da0714 · lanl-ansi/Alpine.jl · GitHub](https://github.com/lanl-ansi/Alpine.jl/blob/22c44020fe3c56c4e11bafaebf9c86b313da0714/test/runtests.jl#L35) I tested this and it works fine.

---

_[View the full topic](https://discourse.julialang.org/t/alpine-jump-gives-error-for-quadratic-functions/70321)._
