Let $g:\mathbb{R}^2\to \mathbb{R}^4,\ (x,y)\mapsto ((2+3\cos(2\pi x))\cos(4\pi y),\ (2+3\cos(2\pi x))\sin (4\pi x),\ 3\sin(2\pi x)\cos(2\pi y),\ 3\sin(2\pi x)\sin(2\pi y))$
I have to prove that for all $x,y$, the map $g$ is an immersion and $g(\mathbb{R}^2)$ is a compact submanifold of $\mathbb{R}^4$.
For the first part I have :
$Dg(x,y)=\begin{pmatrix}-6\sin(2\pi x)\cos(4\pi y) &-8\sin(4\pi y)-12\sin(4\pi y)\cos(2\pi x)\\ -6\sin(2\pi x)\sin(4\pi y) &8\sin(4\pi y)+12\cos(4\pi y)\cos(2\pi x)\\ 6\cos(2\pi x)\sin(2\pi y) &-6\sin(2\pi x)\sin(2\pi y)\\ 6\cos(2\pi x)\sin(2\pi y) &-6\sin(2\pi x)\cos(2\pi y) \end{pmatrix} $
I want to prove that for all $(x,y)\in \mathbb{R}^2$ we have $Dg(x,y)\ne 0$.
I don't have an efficient method.
My point is to watch when you have $\cos=0$ so $\sin=0$.
I have for $[0,1]$: $\sin(2\pi x)=0$ if $x=0,\frac{1}{2},1$.
$\cos(2\pi x)=0$ if $x=\frac{1}{4},\frac{3}{4}$.
$\sin(4\pi x)=0$ if $x=0,\frac{1}{4},\frac{1}{2},\frac{3}{4},1$.
$\cos(4\pi x)=0$ if $x=\frac{1}{8},\frac{3}{8},\frac{5}{8},\frac{7}{8}$.
It's the same values for $y$.
Let's try for $x=0$ and $y=\frac{1}{4}$. I obtain : $Dg(0,\frac{1}{4})=\begin{pmatrix}0 &0\\ 0 &-12\\ 0 &0\\ 6 &0 \end{pmatrix} \ne 0 $
I hope that it works for the other values and by cases it's injective and $g$ is an immersion for all $x,y$.
For the second part I don't know how to start.
Thanks in advance !