# Mosek returns Unknown status

**URL:** https://discourse.julialang.org/t/mosek-returns-unknown-status/15189
**Category:** Optimization (Mathematical)
**Created:** [September 19, 2018, 6:27pm UTC](https://discourse.julialang.org/t/mosek-returns-unknown-status/15189 "2018-09-19T18:27:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Rasoul](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@Rasoul](https://discourse.julialang.org/u/Rasoul)
#### Post date: [September 19, 2018, 6:27pm UTC](https://discourse.julialang.org/t/mosek-returns-unknown-status/15189/1 "2018-09-19T18:27:42Z")

</div>

I got “unknown status” when I run the following code

```julia
using MultivariatePolynomials
using JuMP
using PolyJuMP
using SumOfSquares
using DynamicPolynomials
using Mosek
using SemialgebraicSets

@polyvar x
m = SOSModel(solver = MosekSolver(MSK_IPAR_INTPNT_MAX_ITERATIONS=1000, MSK_DPAR_ANA_SOL_INFEAS_TOL=1e-14))
@variable m a
@variable m b
@variable m c

epsilon = 2.520204237306060e-5
x_min = -3*pi/2
x_max = -pi/2

p = -1 + (x+pi)^2/factorial(2) - (x+pi)^4/factorial(4) + (x+pi)^6/factorial(6) - (x+pi)^8/factorial(8) + (x+pi)^10/factorial(10) -(x+pi)^12/factorial(12) +(x+pi)^14/factorial(14) - epsilon - a*x^2 - b*x - c
s = @set x >= x_min && x <= x_max

@objective m Min (sin(x_max) - 1/3*a*x_max^3 - 1/2*b*x_max^2 - c*x_max - sin(x_min) + 1/3*a*x_min^3 + 1/2*b*x_min^2 + c*x_min )
@constraint( m, p >= 0, domain = s)

solve(m)

println("a =", getvalue(a))
println("b =", getvalue(b))
println("c =", getvalue(c))

```

However, Mosek could solve the problem optimally when I reduced the polynomial degree in the Taylor series to “6”. Can you please let me know what should I do to avoid this kind of problems. Thanks in advance!

---

<div class="post-metadata">

### Author: ![blegat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blegat/32/217090_2.png) [@blegat](https://discourse.julialang.org/u/blegat)
#### Post date: [September 20, 2018, 4:45pm UTC](https://discourse.julialang.org/t/mosek-returns-unknown-status/15189/2 "2018-09-20T16:45:50Z")

</div>

You can try to [change the polynomial basis](http://www.juliaopt.org/SumOfSquares.jl/latest/constraints.html#Changing-the-polynomial-basis-1).  
Changing the basis gives another SDP formulation that while being mathematically equivalent can have better (or worse) numerical properties.
