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

# sosdecTernary -- sum of squares decomposition for ternary forms

## Synopsis

• Usage:
(p,q) = sosdecTernary(f)
• Inputs:
• f, , a homogeneous polynomial in 3 variables
• Optional inputs:
• RoundTol => ..., default value 3, tolerance for rational rounding
• Solver => ..., default value "CSDP", picking a semidefinite programming solver
• Verbosity => ..., default value 0, control the level of information printed
• Outputs:

## Description

Given a nonnegative ternary form $f$, this method uses Hilbert's algorithm to compute a decomposition of $f$ as $f=\frac{\prod_ip_i}{\prod_iq_i}$ where each factor $p_i$ and $q_i$ is a sum of squares. The method returns null if $f$ is not nonnegative. As an example, consider the homogeneous Motzkin polynomial.

 i1 : R = RR[x,y,z]; i2 : f = library ("Motzkin", {x,y,z}); i3 : (p,q) = sosdecTernary (f); -- warning: experimental computation over inexact field begun -- results not reliable (one warning given per session)

The result, in this case, is a quotient of two sums of squares.

 i4 : (#p, #q) o4 = (1, 1) o4 : Sequence i5 : clean(1e-4, f * value q#0 - value p#0) o5 = 0 o5 : R

References: Products of positive forms, linear matrix inequalities, and Hilbert 17th problem for ternary forms, E. de Klerk, and D.V. Pasechnik, European J. Oper. Res. (2004), pp. 39-45.

## Caveat

$\bullet$ This implementation only works with the solvers "CSDP" and "MOSEK".

$\bullet$ Due to the iterative nature of the algorithm, it could happen that some of the output sums of squares are rational while some are real.

## Ways to use sosdecTernary :

• sosdecTernary(RingElement)

## For the programmer

The object sosdecTernary is .