# Mosek returns Unknown status

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

``````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!

You can try to change the polynomial basis.
Changing the basis gives another SDP formulation that while being mathematically equivalent can have better (or worse) numerical properties.