How to find parametric equation of the intersection $x²+y²+z²=2$ and $y=x$? I know that if I substitute $y=x$ into
$x²+y²+z²=2$
I get
$$2x²+z²=2$$
which in some way gives me 
$$x²+\frac{z²}{2} = 1$$
which is an ellipse.
My parametric equation goes from $(0,0,\sqrt{2})$ to $(1,1,0)$, so I need to find an equation that follows this path.
My idea was to take $x=t$ as a paremeter, and then I'd have:
$\frac{z²}{2} = 1-x² \implies z² = 2(1-x²) \implies z = \sqrt{2}\sqrt{1-x²}$
(since $x\ge 0, y\ge 0, z\ge 0$ in my exercise)
So I end up with the parametrization
$$(t,t,\sqrt{2}\sqrt{1-t²})$$
But $t$ goes from what to what? Also, this will only work if $z\ge 0$. My teacher made something in the class that used $\sin(t)$ and $\cos(t)$ in the equation, how do I get this? Do I need to use spherical coordinates? Because she didn't use and I don't know how to do it.
 A: That parameterization will never get negative $z$. Your $t$ can be as least $-1$ and at most $1$, but it only parameterizes half of the intersection.
To get a complete parameterization, note that $\left(x,\frac{z}{\sqrt{2}}\right)$ is on the unit circle, so write $x=\cos\theta, z=\sqrt{2}\sin\theta$. Then $y=x$. Now what is the range of $\theta$ to parameterize the circle?
A: The intersection is a planar ellipse in the plane $y=x$. Note that $x^2+y+^2+z^2=2$ is the equation of a sphere in $3$-space. Try the normal parametrization by spherical coordinates.
A: Parametric equations of an ellipse 
$$
\left(\frac{x}{a}\right)^2+\left(\frac{y}{b}\right)^2=1
$$
are given by
$$
x=a\cos t, \quad y=b\sin t, \quad 0\le t \le 2\pi
$$
In your case, the projection of your curve in the $xz$ plane is the ellipse 
$$
{x}^2+\left(\frac{z}{\sqrt{2}}\right)^2=1,
$$
so you can write
$$
x=\sin t, \quad z=\sqrt{2}\cos t, \quad 0\le t \le 2\pi
$$
And for $y$, you can use the fact that $y=x=\sin t$.
Since you only want to go from $(0,0,\sqrt{2})$ to $(1,1,0)$, you can restrict $t$ from $0$ to $\pi/2$.
