$9$. Consider the parametric curve $K\subset R^3$ given by $$x = (2 + \cos(2s)) \cos(3s)$$ $$y = (2 + \cos(2s)) \sin(3s)$$ $$z = \sin(2s)$$ a) Express the equations of K as polynomial equations in $x,\ y,\ z,\ a = \cos(s),\ b = \sin(s)$. Hint: Trig identities.
b) By computing a Groebner basis for the ideal generated by the equations from part $a$ and $a^2 + b^2 - 1$ as in Exercise 8, show that K is (a subset of) an affine algebraic curve. Find implicit equations for a curve containing K.
c) Show that the equation of the surface from Exercise 8 is contained in the ideal generated by the equations from part b. What does this result mean geometrically? (You can actually reach the same conclusion by comparing the parametrizations of T and K, without calculations.)
I try to solve this problem, on page 102 of Cox's "Ideal, varieties and algorithms: an introduction to computational algebraic geometry and commutative algebra".
On the first question, I get $$x=(2+2\cos^2s-1)(4\cos^3s-3\cos s)=(1+2a^2)(4a^3-3a),$$ $$y=(1+2a^2)(3\sin s-4\sin^3 s)=(1+2a^2)(3b-4b^3),$$ $$z=2ab.$$
I was wondering whether they are right, since the Groebner basis given by them is extremely bad,

Any comments? Thanks.
For what it's worth: you could try easing things a bit for your Gröbner basis computations by using the Weierstrass substitutions
$$\begin{align*}\cos\,s&=\frac{1-u^2}{1+u^2}\\\sin\,s&=\frac{2u}{1+u^2}\end{align*}$$
after of course using multiple angle identities to expand out the trigonometric functions. Since it seems you're using Mathematica, here's how I'd do it if I were in your shoes:
On the other hand, it does seem that Cox/Little/O'Shea is asking you to do it the long way, so here's the "painful" route:
It's not too hard to do a sanity check of the results of
GroebnerBasis[]. Here's one way (to be done after executing the previous snippet):If everything went well, you should be getting a list containing a bunch of zeroes.
As I am writing this, I don't have Mathematica installed on the computer I'm using. It can happen that one of the the two options I gave might give a longer list of ideals, but it's guaranteed that one would be a subset of the other.