Last class of July 15th

Elimination: 2-2 system (Resultant)

A=Collect[1+(x/2)-((x^2)/2)+7 y-8 x y+2 (x^2) y-3 (y^3)+4 x (y^3)-(x^2) (y^3),y]

1+(x/2)-((x^2)/2)+(7-8 x+2 (x^2)) y+(-3+4 x-(x^2)) (y^3)

B=Collect[x+((x^2)/2)-((x^3)/2)-y-((11 x y)/2)+((29 (x^2) y)/2)-10 (x^3) y+2 (x^4) y-7 (y^2)+8 x (y^2)-2 (x^2) (y^2)-3 x (y^3)+4 (x^2) (y^3)-(x^3) (y^3)+3 (y^4)-4 x (y^4)+(x^2) (y^4),y]

Compute the resultant of A and B that eliminates y

R=Resultant[A,B,y]

Plot the graph of the 2 curves of A and B

ContourPlot[{A==0,B==0,R==0},{x,-2,5},{y,-4,3}]

For each root x of the resultant, check if it is extendable to a solution (x,y) of the system ⟨A,B⟩

Factor[R]

Check the extension theorem (for the resultant)

5 roots for the resultant: 3 2 1 0 -1. We have (Subscript[a, 3])(x) = -3 + 4 x - (x^2)=-(Subscript[b, 4])(x)

3 (multiplicity 6)--> (Subscript[a, 3])(3)=(Subscript[b, 4])(3)=0  1 solution at ∞, 5 others correspond to interstion of A and B in the complex plane (ℂ^2)

2 (multiplicity 4) --> there are 3 intersection points in (ℝ^2), no point at ∞, so 1 intersection point in (ℂ^2)

1 (multiplicity 6) -->  1 intersection point in (ℝ^2), (Subscript[a, 3])(1) =(Subscript[b, 4])(1)=0 -> 1 solution at ∞ and 4 other intersection points in the complex plane (ℂ^2)

0 (multiplicity 3) --> 3 intersection points in (ℝ^2)

-1 (multiplicity 1) --> 1 intersection point in (ℝ^2)

Solving a 3-3 polynomial system by elimination

We want to find the solutions of  the following polynomial system F over ℂ, by the elimination method.
What is the first step to do ? Do it (and choose lex(x,y,z) for that).

F={f1=x^2+y^2+z^2-4 ,f2=x^2+2 y^2-5,f3= x z-1}

G=GroebnerBasis[F,{x,y,z},MonomialOrder->Lexicographic]

We get a basis of the 1st and 2nd elimination ideal (Subscript[Ε, 1])(I) and (Subscript[Ε, 2])(I).
Use the Solve function to find the set (Subscript[𝕍, ℂ])((Subscript[Ε, 2])(I))⊂ℂ.

(Subscript[Ε, 1])(I)=⟨1-3 z^2 + 2 z^4 , -1+y^2-z^2 ⟩  (NO x )
(Subscript[Ε, 2])(I)=⟨1-3 z^2 + 2 z^4 ⟩  (NO x and y)

sz=Solve[G[[1]]==0,z]

G[[1]]

G[[2]]

Make the substitution in the other equations.
(this is not very easy in Mathematica. Try "Table" or "Thread" the documentation).--> [the variable z is eliminated]

ty=G[[2]]/.sz

tty=Table[{ty[[i]]==0},{i,4}]

Table[Solve[tty[[i]]],{i,4}]

From the points in (Subscript[𝕍, ℂ])((Subscript[Ε, 1])(I))⊂ℂ, "extend" them to points
in (Subscript[𝕍, ℂ])((Subscript[E, 2])(I))⊂(ℂ^2) .

Make the substitutions in the equations in x (the variables z and y are eliminated).

Finally, find all the solutions in (ℂ^3)of the system.

Extension theorem fails over ℝ

Consider the ideal I=⟨sys5⟩⊂ℚ[x,y,z], with:

sys5={x^2+y^2+z^2+2,3*x^2+4*y^2+4*z^2+5}

The variables are ordered like this: x>y>z.
Compute the 1st elim. ideal (Subscript[Ε, 1])(I)=I⋂ℚ[y,z].

Let V = (Subscript[𝕍, ℂ])(I)⊂(ℂ^3). Show that 𝕍((Subscript[Ε, 1])(I))=(Subscript[π, 1])(V).

Let W=(Subscript[𝕍, ℝ])(I)⊂(ℝ^3). Show that W is empty.
But (Subscript[W, 1])=(Subscript[𝕍, ℝ])((Subscript[Ε, 1])(I))⊂(ℝ^2) is infinite.

Deduce that the extension theorem fails over ℝ
(Advice: Compare (Subscript[W, 1 ])and (Subscript[π, 1])(W))

Numerical solving with multivariate equations....be careful.

(* NSolve -> Numerical Solver *)

Consider the following system of 3 equations

F={f1=y+2 x y+(x^2) y,f2=3+8 x+8 (x^2)+4 (x^3)+(x^4),f3=3+2 x+(x^2)-y+(y^5)}

First use the elimination theorem
(compute a GB for lex(x,y))

Use the commane NSolve to find the points of 𝕍((Subscript[Ε, 1])(I)).

There is ONE REAL solution ≠0. Let (Subscript[y, 0]) this solution.

Substitute (Subscript[y, 0 ])in the other equation of the Groebner basis.
Use NSolve again to find the roots of this polynomial.

How many DISTINCT solutions do you find ?
Do you think it is correct ?

Radical membership (Nullstellensatz)

Consider the system F hereunder:
Let I=⟨F⟩⊂ℂ[x,y] the ideal it generates over ℂ

F={f1=x^3,f2=y^3,f3=x y (x+y)}

G=GroebnerBasis[F,{x,y},MonomialOrder->DegreeReverseLexicographic]

f=x+y

PolynomialReduce[f,G,{x,y}]

Show that f=x+y ⊂I  but  f∈√I