The lemniscate of Gerono is given by the equation $x^4-x^2+y^2= 0$. Draw a

picture of it to see how this plane curve looks. Using YALMIP give an approximate

2-sos decomposition of $x + 1$ modulo the equation of the curve. Can you ﬁnd an

exact one?

Use reduced moment matrices to write down the spectrahedral representation

of $TH_2 (I)$ where $I = <x^4-x^2+y^2>$. What can you say about $TH_1(I)$? Can you

decide whether $TH_2(I)$ coincides with the convex hull of the lemniscate?

## Solution

Let $f = x^4-x^2+y^2$.

**Draw the real variety $\mathcal{V}_{\mathbb{R}}(f)$:**

(Thank you, Wolfram Alpha!)

**Using Yalmip to approximate 2-sos decomposition of $x + 1$ modulo the equation of the curve:**

We are looking for a decomposition of the following form:

$x+1 = \sum_i s_i(x)^2 + h(x) f(x)$

where $g(x)$ is a polynomial of degree $\leq2$.

This is equivalent to $x+1 - h(x) f(x)$ being a sum of squares.

Let us check if this is true using YALMIP. To make things easy, we choose $h(x)$ to be a constant and hope that it suffices:

```
sdpvar x y h
f=x^4-x^2+y^2
q=x+1
p=q+h*f
F=sos(p)
solvesos(F,h)
double(h)
sdisplay(sosd(F))
```

The solver reports numerical problems, but we still get an approximate decomposition that is indeed of degree 2:

```
ans =
0.5000
ans =
'-0.9999999999-0.500009021*x+0.4999639732*x^2'
'1.804270243e-05-0.499982016*x-0.4999909773*x^2'
'0.7070749267*y'
'2.637194987e-06-2.63724226e-06*x+2.637290158e-06*x^2'
```

**Can you find an exact one?**

Now we do some rounding and "guess" the following 2-sos decomposition:

Being lazy, we check with M2 if this is really a decomposition:

```
R=QQ[x,y]
f=x+1+1/2*(x^4-x^2+y^2)
s1=(-1-1/2*x+1/2*x^2)^2
s2=(-1/2*x-1/2*x^2)^2
s3=1/2*y^2
f==s1+s2+s3
```

TRUE!

**Spectrahedral representation of $TH_1(I)$ and $TH_2(I)$**

To write down the moment matrix, first choose a (theta-)basis $\mathcal{B}$ of $\mathbb{R}[x]/I$.

Since we are only interested in $TH_1(I)$ and $TH_2(I)$, we only have to consider basis elements of degree two and less. For any degree-respecting monomial ordering, the monomial $x^4$ will be the initial term, therefore all monomials of degree two and less are standard monomials. Let us choose $\mathcal{B}_2 = \{1, \ x, \ y, \ x^2, \ xy, \ y^2\}.$

The multiplication matrix indexed by $\mathcal{B}_2$ is the following matrix (remember, we have to reduce by $I$):

Linearizing with new variables $z_{ij}$ this yields the following moment matrix:

(3)Using the moment matrix, we can now describe the theta bodies of the lemniscate:

(4)To see what $TH_1(I)$ looks like, let us translate the psd condition to conditions on the minors. we get the following inequalities:

(5)By making the natural choice

(6)we see that there is a solution to these inequalities for every choice of $(z_{1,0}, z_{0,1})$.

For the second theta body, we have:

(7)