next | previous | forward | backward | up | index | toc

# sosPoly -- make an SOS polynomial

## Synopsis

• Usage:
s = sosPoly (SDPR)
s = sosPoly (mon,Q)
s = sosPoly (R,polys,coeffs)
• Inputs:
• SDPR, an instance of the type SDPResult, the result of an SDP computation
• Q, , positive semidefinite (Gram matrix)
• mon, , a vector of monomials
• R, a ring,
• polys, a list, of polynomials
• coeffs, a list, of scalars
• Outputs:
• s, an instance of the type SOSPoly,

## Description

This method creates an object of type SOSPoly. Very often this is applied to an object of type SDPResult, the result of a semidefinite programming computation.

 i1 : R = QQ[x,y]; i2 : f = 2*x^4+5*y^4-2*x^2*y^2+2*x^3*y; i3 : sosPoly solveSOS f 83 2 2 2 43 20 2 2 231773 2 2 o3 = (5)(- ---x + y ) + (--)(--x + x*y) + (------)(x ) 200 20 43 344000 o3 : SOSPoly

One can also input a Gram matrix $Q$ and a vector of monomials $mon$.

 i4 : Q = matrix(QQ,{{1,1,1},{1,1,1},{1,1,1}}); 3 3 o4 : Matrix QQ <-- QQ i5 : mon = matrix{{1},{x},{y}}; 3 1 o5 : Matrix R <-- R i6 : sosPoly(mon,Q) 2 o6 = (1)(x + y + 1) o6 : SOSPoly

Alternatively, a sum-of-squares polynomial can be created from a list of generators and weights.

 i7 : s = sosPoly(R, {x+1,y}, {2,3} ) 2 2 o7 = 2*(x + 1) + 3*(y) o7 : SOSPoly

• solveSOS -- solve a sum-of-squares problem
• Solver -- picking a semidefinite programming solver

## Ways to use sosPoly :

• sosPoly(List,List)
• sosPoly(Matrix,Matrix)
• sosPoly(Ring,List,List)
• sosPoly(SDPResult)

## For the programmer

The object sosPoly is .