Surface integral of a sphere inside a cylinder 
Find the surface area of the portion of the origin-centred sphere of radius $R=4$ that lies inside the cylinder $x^2 +y^2=12$ and above the $xy$ plane.

Does this question make sense? How can surface area lie inside the cylinder given that the radius of sphere is greater than radius of cylinder?
 A: When the sphere is cut by the cylinder you have two spherical caps remaining. The figure below shows the 2D representation.
Now, the basics are
$$
\theta=\sin^{-1}\frac{r}{R}\\
d=R\cos\theta\\
h=R-d\\
$$
The surface area of each spherical cap is
$$S=2\pi Rh$$
For your case I find that the surface area above the $x-y$ plane is $S=16\pi$.
I have verified this calculation numerically by calculating the surface area of of surface of revolution (of the red line).

A: HINT: Well,  you have these equations :
\begin{equation}
x^2+y^2+z^2 = 4 
\end{equation}
\begin{equation}
x^2+y^2= 12
\end{equation}
With the variable $z$ free for the second equation.
Then you can parametrize with spheric coordinates:
\begin{equation}
x= 2 cos\theta sin\phi
\end{equation}
\begin{equation}
y= 2 sin\theta sin\phi
\end{equation}
\begin{equation}
z= 2 cos\phi
\end{equation}
How the surface has to be above the $xy$ plane, $\phi$ must be defined as $\phi \in [0,\frac{\pi}{2}]$ and $\theta$ staying with the typical range ,$\theta \in [0,2\pi]$. Now you wanna intersect our new surface (semi-sphere) with the cylinder. The $z$ restriction will be defined by the top of the sphere restriction. Hope this helps you dude.
