The curve of surface's self-intersection Given a self-intersecting parametric surface how to find the curve of its self-intersection (mathematically)? For example given this surface (in Wolfram Language):
surface[u_,v_]:={Cos[u],Sin[u]+Cos[v],Sin[v]};

ParametricPlot3D[surface[u,v],{u,0,2π},{v,-π,π}]


 A: Let the parametric equations of the surface be
$$\begin{cases}x=x(u,v),\\
y=y(u,v),\\
z=z(u,v).\end{cases}$$
The double points (self-intersections) are the solutions of a system of three equations in four unknowns.
$$\begin{cases}x(u,v)=x(u',v'),\\
y(u,v)=y(u',v'),\\
z(u,v)=z(u',v').\end{cases}$$
If you also have the implicit equation $f(x,y,z)=0$, you need to solve a single equation in two unknowns.
$$f(x(u,v),y(u,v),z(u,v))=0.$$

With your example,
$$\begin{cases}\cos u=\cos u',\\
\sin u+\cos v=\sin u'+\cos v',\\
\sin v=\sin v'.\end{cases}$$
giving
$$\begin{cases}u=2k\pi\pm u',\\
v=2k\pi+v'\lor v=(2k+1)\pi-v',\\
\sin u+\cos v=\pm\sin u\pm\cos v.\end{cases}
$$
There are four solutions, corresponding to (from the third equation)
$$0=0,\\
\cos u=0,\\
\sin v=0,\\
\sin u+\cos v=0.
$$
The first identity represents the whole surface while the next three are curves.


*

*$(0,\pm1+\cos v,\sin v)$ is a pair of tangent circles,

*$(\cos u,\sin u\pm1,0)$ is also a pair of tangent circles,

*$(\cos u, 0, \pm\cos u)$ is a pair of orthogonal line segments.
You can see the line segments on the left picture and a pair of circles on the right.

