Line Integral of Sphere Intersected with Cylinder The question:
Compute $\int_{C}(y^2+z^2)dx+(z^2+x^2)dy+(x^2+y^2)dz$ where C is given by:
$
x^2+y^2+z^2=2Rx \\
x^2+y^2=2rx \\
z \geq 0 \\
0 < r \leq R
$
This is a problem I found on the interet, sadly there was no solution provided. I have a hard time understanding how to solve this. I know that the equations given are a sphere and a cylinder, but does that help me in any way? I think usually one has to turn this into a parametric equation to change this to an integral with only 1 variable. However I do not know how to do that. I do no think any of my work is in any way significant for the actual solution, but here it is:
$
x^2 + y^2 + z^2 = 2Rx \implies z^2 = 2Rx - x^2 - y^2 \implies z = \sqrt{2Rx - x^2 - y^2}\\
x^2 + y^2 + z^2 = 2Rx \implies y^2 = 2Rx - x^2 - z^2 \implies y = \sqrt{2Rx - x^2 - z^2}\\
x^2 + y^2 + z^2 = 2Rx \implies x^2-2Rx+y^2+z^2=0 \implies x_{1,2} = R \pm \sqrt{R^2-y^2-z^2}
$

There are two ways to go about this. Parametrize the intersection curve and do the line integral or applying Stokes' theorem, choose a surface which has the intersection curve as its boundary and do surface integral of the curl of the given vector field. To parametrize the intersection curve,
The given surfaces are $ \ x^2+y^2 = 2 r x, x^2+y^2+z^2 = 2Rx$. At intersection, $x^2+y^2 = 2 rx, z^2 = 2 (R-r)x$. Using polar coordinates,
$x = \rho \cos t, y = \rho \sin t \implies \rho^2 = 2 r \rho \cos t \ $ i.e. $\rho = 2r \cos t$. So we can parametrize the intersection curve as,
$\gamma (t) = (2r\cos^2 t, 2 r \cos t \sin t, 2 \sqrt{R r-r^2} \ \cos t), -\pi/2 \leq t \leq \pi / 2$
Or you can parametrize as,
$\gamma (t) = (r + r \cos t, r \sin t, 2 \sqrt{R r-r^2} \cos \frac{t}{2} \ ), 0 \leq t \leq 2\pi$
The line integral will be $\displaystyle \int_C \vec F(\gamma(t)) \cdot \gamma'(t) \ dt$.
