Coordinates of tilted circle. The original question is as follows:
Imagine a wire located at the intersection of $x^2+y^2+z^2=1$ and $x+y+z=0$, whose density depends on position according to $\rho({\bf x})=x^2$ per unit length. Show that the mass of the wire is $\frac{2}{3}\pi$.
I am thinking to parametrize the intersection first and do line integral over the curve. However, I can not properly write out the intersection.  Anybody has any thought on how to tackle this?
 A: If you really want to do it the hard way, you could use the knowledge that the intersection is a circle and points on it are orthogonal to the unit vector $\hat{\eta} = (\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}})$. 
To find a parametrization of the circle, you need a point on the circle as a starting point.
One way to do that is pick a random vector, not in the direction
of $\pm \vec{\eta}$, project it to its components orthogonal to $\hat{\eta}$ and then
normalize it to a unit vector.
If you do this to the unit vector $\hat{x} = (1,0,0)$ in the $x$-direction, you end up
with the point $\vec{p} = (\frac{2}{\sqrt{6}},-\frac{1}{\sqrt{6}}, -\frac{1}{\sqrt{6}} )$ lying on the circle. 
To generate the whole circle, you rotate $\vec{p}$ for some angle $\theta \in [0,2\pi)$ along the axis corresponds to $\hat{\eta}$. Let $\vec{q} = \vec{\eta} \times \vec{p} = ( 0, \frac{1}{\sqrt{2}},-\frac{1}{\sqrt{2}} )$. The resulting locus has the
form:
$$\vec{r}(\theta) 
= \vec{p} \cos\theta + \vec{q}\sin\theta = 
\left(\frac{2\cos\theta}{\sqrt{6}}, 
-\frac{\cos\theta}{\sqrt{6}} + \frac{\sin\theta}{\sqrt{2}},
-\frac{\cos\theta}{\sqrt{6}} - \frac{\sin\theta}{\sqrt{2}} \right)$$
This is a parametrization of the circle you want. Using this, one can calculate the desired mass as
$$\int_0^{2\pi} ( \vec{r}(\theta) \cdot \hat{x} )^2 d\theta
= \int_0^{2\pi} \frac23\cos^2\theta d\theta
= \frac23\times\frac12\times 2\pi = \frac23\pi$$
